Changeset 259 in xtideuniversalbios for trunk/Serial_Server/library/FlatImage.h


Ignore:
Timestamp:
Feb 23, 2012, 7:14:06 AM (12 years ago)
Author:
gregli@…
google:author:
gregli@hotmail.com
Message:

For function int13/0h, restored the code to only reset the floppy drives if a floppy drive was passed in for reset. Other minor optimizations. Better create new floppy support in Serial Server.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Serial_Server/library/FlatImage.h

    r225 r259  
    2424            double sizef;
    2525            FileAccess cf;
     26            char sizeChar;
    2627
    2728            size = (unsigned long) p_cyl * (unsigned long) p_sect * (unsigned long) p_head;
     
    2930                log( -1, "'%s', can't create flat file with size greater than %lu 512-byte sectors", name, cf.MaxSectors );
    3031            sizef = size / 2048.0;   // 512 byte sectors -> MB
     32            sizeChar = 'M';
     33            if( sizef < 1 )
     34            {
     35                sizef *= 1024;
     36                sizeChar = 'K';
     37            }
    3138
    3239            if( cf.Create( name ) )
     
    3744               
    3845                if( p_cyl > 1024 )
    39                     log( 0, "Created file '%s', size %.1lf MB", name, sizef );
     46                    log( 0, "Created file '%s', size %.2lf %cB", name, sizef, sizeChar );
    4047                else
    41                     log( 0, "Created file '%s', geometry %u:%u:%u, size %.1lf MB", name, p_cyl, p_sect, p_head, sizef );
     48                    log( 0, "Created file '%s', geometry %u:%u:%u, size %.2lf %cB", name, p_cyl, p_head, p_sect, sizef, sizeChar );
    4249                cf.Close();
    4350            }
Note: See TracChangeset for help on using the changeset viewer.