Changeset 211 in xtideuniversalbios for trunk/Serial_Server/library
- Timestamp:
- Jan 16, 2012, 7:23:11 PM (13 years ago)
- google:author:
- gregli@hotmail.com
- Location:
- trunk/Serial_Server/library
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Serial_Server/library/FlatImage.cpp
r209 r211 25 25 fp = fopen( name, "r" ); 26 26 if( fp ) 27 log( 0, "Create Failure: '%s' already exists", name );27 log( -1, "Create Failure: '%s' already exists", name ); 28 28 29 29 if( !(fp = fopen( name, "w" )) ) 30 log( 0, "Could not create file '%s'", name );30 log( -1, "Could not create file '%s'", name ); 31 31 32 32 memset( &buff[0], 0, 512 ); … … 35 35 { 36 36 if( fwrite( &buff[0], 1, 512, fp ) != 512 ) 37 log( 0, "Create write black sector error" );37 log( -1, "Create write black sector error" ); 38 38 } 39 39 fclose( fp ); 40 40 41 41 sizef = size2/2048.0; 42 log( 1, "Created file '%s' with geometry %u:%u:%u, size %.1lf megabytes\n", name, p_cyl, p_sect, p_head, sizef );42 log( 0, "Created file '%s' with geometry %u:%u:%u, size %.1lf megabytes\n", name, p_cyl, p_sect, p_head, sizef ); 43 43 } 44 44 45 45 fp = fopen( name, "r+" ); 46 46 if( !fp ) 47 log( 0, "Could not Open %s", name ); 48 49 log( 1, "Opening disk image '%s'", name ); 47 log( -1, "Could not Open '%s'", name ); 50 48 51 49 fseek( fp, 0, SEEK_END ); … … 53 51 54 52 if( !totallba ) 55 log( 0, "Could not get file size");53 log( -1, "Could not get file size for '%s'", name ); 56 54 57 55 if( totallba & 0x1ff ) 58 log( 0, "File not made up of 512 byte sectors");56 log( -1, "'%s' not made up of 512 byte sectors", name ); 59 57 60 58 totallba >>= 9; … … 62 60 { 63 61 if( p_sect || p_head || p_cyl ) 64 log( 0, "File size does not match geometry");62 log( -1, "'%s', file size does not match geometry", name ); 65 63 else if( (totallba % 16) != 0 || ((totallba/16) % 63) != 0 ) 66 log( 0, "File size does not match standard geometry (x:16:63), please give explicitly with -g");64 log( -1, "'%s', file size does not match standard geometry (x:16:63), please geometry explicitly with -g", name ); 67 65 else 68 66 { … … 80 78 81 79 sizef = totallba/2048.0; 82 log( 1, "Using geometry %u:%u:%u, total size %.1lf megabytes", cyl, sect, head, sizef );80 log( 0, "Opening disk image '%s', geometry %u:%u:%u, total size %.1lf MB", name, cyl, sect, head, sizef ); 83 81 } 84 82 -
trunk/Serial_Server/library/Image.cpp
r209 r211 33 33 34 34 if( *(shortFileName) == 0 ) 35 log( 0, "Can't parse %s\n\n", name ); 35 { 36 log( 1, "Can't parse '%s' for short file name\n\n", name ); 37 shortFileName = "SerDrive"; 38 } 36 39 37 40 readOnly = p_readOnly; -
trunk/Serial_Server/library/Process.cpp
r210 r211 68 68 sprintf( &logBuff[logCount*9], "... " ); 69 69 70 log( 4, "%s%s", message, logBuff );70 log( 3, "%s%s", message, logBuff ); 71 71 } 72 72 } … … 118 118 len = 1; 119 119 workCount = 0; 120 log( 2, "Timeout waiting on command" );120 log( 1, "Timeout waiting on command" ); 121 121 continue; 122 122 } … … 149 149 { 150 150 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] ); 152 152 else 153 log( 3, "Spurious: [%d]", buff.b[0] );153 log( 2, "Spurious: [%d]", buff.b[0] ); 154 154 } 155 155 buffoffset = 0; … … 172 172 if( (crc = checksum( &buff.w[0], 256 )) != buff.w[256] ) 173 173 { 174 log( 1, "Bad Write Sector Checksum" );174 log( 0, "Bad Write Sector Checksum" ); 175 175 continue; 176 176 } … … 178 178 if( img->readOnly ) 179 179 { 180 log( 2, "Attempt to write to read-only image" );180 log( 1, "Attempt to write to read-only image" ); 181 181 continue; 182 182 } … … 189 189 // 190 190 if( serial->writeCharacters( &buff.w[256], 2 ) != 2 ) 191 log( 1, "Serial Port Write Error" );191 log( 0, "Serial Port Write Error" ); 192 192 193 193 workOffset++; … … 209 209 if( buff.b[0] != (workCount-0) ) 210 210 { 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 ); 212 212 workCount = 0; 213 213 continue; … … 221 221 if( (crc = checksum( &buff.w[0], 3 )) != buff.w[3] ) 222 222 { 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", 224 224 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); 225 225 continue; … … 230 230 if( !image1 ) 231 231 { 232 log( 2, "Slave drive selected when not supplied" );232 log( 1, "Slave drive selected when not supplied" ); 233 233 img = NULL; 234 234 continue; … … 261 261 if( (workCommand & SERIAL_COMMAND_WRITE) && img->readOnly ) 262 262 { 263 log( 2, "Write attempt to Read Only disk" );263 log( 1, "Write attempt to Read Only disk" ); 264 264 continue; 265 265 } … … 293 293 294 294 if( br ) 295 log( 2, " Ignoring Inquire with Baud Rate=%d", br->rate );295 log( 1, " Ignoring Inquire with Baud Rate=%d", br->rate ); 296 296 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 ); 298 298 workCount = 0; 299 299 continue; … … 314 314 315 315 if( serial->writeCharacters( &buff.w[0], 514 ) != 514 ) 316 log( 1, "Serial Port Write Error" );316 log( 0, "Serial Port Write Error" ); 317 317 318 318 workCount--; … … 327 327 328 328 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, 330 330 mylba, workCount ); 331 331 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, 333 333 cyl, sect, head, workCount+1, mylba ); 334 334 … … 336 336 337 337 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] ); 339 339 340 340 if( !(workCommand & SERIAL_COMMAND_WRITE) && verboseLevel >= 4 ) … … 342 342 343 343 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 ); 345 345 } 346 346 }
Note:
See TracChangeset
for help on using the changeset viewer.