Changeset 211 in xtideuniversalbios for trunk/Serial_Server/library/Process.cpp


Ignore:
Timestamp:
Jan 16, 2012, 7:23:11 PM (12 years ago)
Author:
gregli@…
google:author:
gregli@hotmail.com
Message:

More minor changes, improved usage message

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Serial_Server/library/Process.cpp

    r210 r211  
    6868            sprintf( &logBuff[logCount*9], "... " );
    6969
    70         log( 4, "%s%s", message, logBuff );
     70        log( 3, "%s%s", message, logBuff );
    7171    }
    7272}
     
    118118            len = 1;
    119119            workCount = 0;
    120             log( 2, "Timeout waiting on command" );
     120            log( 1, "Timeout waiting on command" );
    121121            continue;
    122122        }
     
    149149                {
    150150                    if( buff.b[0] >= 0x20 && buff.b[0] <= 0x7e )
    151                         log( 3, "Spurious: [%d:%c]", buff.b[0], buff.b[0] );
     151                        log( 2, "Spurious: [%d:%c]", buff.b[0], buff.b[0] );
    152152                    else
    153                         log( 3, "Spurious: [%d]", buff.b[0] );
     153                        log( 2, "Spurious: [%d]", buff.b[0] );
    154154                }
    155155                buffoffset = 0;
     
    172172            if( (crc = checksum( &buff.w[0], 256 )) != buff.w[256] )
    173173            {
    174                 log( 1, "Bad Write Sector Checksum" );
     174                log( 0, "Bad Write Sector Checksum" );
    175175                continue;
    176176            }
     
    178178            if( img->readOnly )
    179179            {
    180                 log( 2, "Attempt to write to read-only image" );
     180                log( 1, "Attempt to write to read-only image" );
    181181                continue;
    182182            }
     
    189189            //
    190190            if( serial->writeCharacters( &buff.w[256], 2 ) != 2 )
    191                 log( 1, "Serial Port Write Error" );
     191                log( 0, "Serial Port Write Error" );
    192192
    193193            workOffset++;
     
    209209                if( buff.b[0] != (workCount-0) )
    210210                {
    211                     log( 1, "Continue Fault: Received=%d, Expected=%d", buff.b[0], workCount );
     211                    log( 0, "Continue Fault: Received=%d, Expected=%d", buff.b[0], workCount );
    212212                    workCount = 0;
    213213                    continue;
     
    221221                if( (crc = checksum( &buff.w[0], 3 )) != buff.w[3] )
    222222                {
    223                     log( 1, "Bad Command Checksum: %02x %02x %02x %02x %02x %02x %02x %02x, Checksum=%02x",
     223                    log( 0, "Bad Command Checksum: %02x %02x %02x %02x %02x %02x %02x %02x, Checksum=%02x",
    224224                         buff.b[0], buff.b[1], buff.b[2], buff.b[3], buff.b[4], buff.b[5], buff.b[6], buff.b[7], crc);
    225225                    continue;
     
    230230                    if( !image1 )
    231231                    {
    232                         log( 2, "Slave drive selected when not supplied" );
     232                        log( 1, "Slave drive selected when not supplied" );
    233233                        img = NULL;
    234234                        continue;
     
    261261                if( (workCommand & SERIAL_COMMAND_WRITE) && img->readOnly )
    262262                {
    263                     log( 2, "Write attempt to Read Only disk" );
     263                    log( 1, "Write attempt to Read Only disk" );
    264264                    continue;
    265265                }
     
    293293
    294294                        if( br )
    295                             log( 2, "    Ignoring Inquire with Baud Rate=%d", br->rate );
     295                            log( 1, "    Ignoring Inquire with Baud Rate=%d", br->rate );
    296296                        else
    297                             log( 2, "    Ignoring Inquire with Unknown Baud Rate (portAndBaud=%d)", buff.inquire.portAndBaud );
     297                            log( 1, "    Ignoring Inquire with Unknown Baud Rate (portAndBaud=%d)", buff.inquire.portAndBaud );
    298298                        workCount = 0;
    299299                        continue;
     
    314314
    315315                if( serial->writeCharacters( &buff.w[0], 514 ) != 514 )
    316                     log( 1, "Serial Port Write Error" );
     316                    log( 0, "Serial Port Write Error" );
    317317
    318318                workCount--;
     
    327327
    328328            if( vtype == 1 )
    329                 log( 2, "%s %d: LBA=%u, Count=%u", comStr, img == image0 ? 0 : 1,
     329                log( 1, "%s %d: LBA=%u, Count=%u", comStr, img == image0 ? 0 : 1,
    330330                     mylba, workCount );
    331331            else if( vtype == 2 )
    332                 log( 2, "%s %d: Cylinder=%u, Sector=%u, Head=%u, Count=%u, LBA=%u", comStr, img == image0 ? 0 : 1,
     332                log( 1, "%s %d: Cylinder=%u, Sector=%u, Head=%u, Count=%u, LBA=%u", comStr, img == image0 ? 0 : 1,
    333333                     cyl, sect, head, workCount+1, mylba );
    334334
     
    336336
    337337            if( workOffset > 1 )
    338                 log( 3, "    Continuation: Offset=%u, Checksum=%04x", workOffset-1, buff.w[256] );
     338                log( 2, "    Continuation: Offset=%u, Checksum=%04x", workOffset-1, buff.w[256] );
    339339
    340340            if( !(workCommand & SERIAL_COMMAND_WRITE) && verboseLevel >= 4 )
     
    342342
    343343            if( workCount == 0 && workOffset > 100 )
    344                 log( 2, "    Block Complete: %.2lf bytes per second", (512.0 * workOffset) / (GetTime() - perfTimer) * 1000.0 );
     344                log( 1, "    Block Complete: %.2lf bytes per second", (512.0 * workOffset) / (GetTime() - perfTimer) * 1000.0 );
    345345        }
    346346    }
Note: See TracChangeset for help on using the changeset viewer.