Changeset 41483 in vbox for trunk/src/VBox/Devices/PC
- Timestamp:
- May 29, 2012 2:58:25 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/BIOS-new/MakeDebianBiosAssembly.cpp
r41482 r41483 47 47 /** Pointer to a BIOS segment. */ 48 48 typedef BIOSSEG *PBIOSSEG; 49 50 51 /** 52 * Pointer to a BIOS map parser handle. 53 */ 54 typedef struct BIOSMAP 55 { 56 /** The stream pointer. */ 57 PRTSTREAM hStrm; 58 /** The file name. */ 59 const char *pszMapFile; 60 /** The current line number (0 based).*/ 61 uint32_t iLine; 62 /** The length of the current line. */ 63 uint32_t cch; 64 /** The offset of the first non-white character on the line. */ 65 uint32_t offNW; 66 /** The line buffer. */ 67 char szLine[16384]; 68 } BIOSMAP; 69 /** Pointer to a BIOS map parser handle. */ 70 typedef BIOSMAP *PBIOSMAP; 49 71 50 72 … … 442 464 443 465 444 static RTEXITCODE ParseMapFileInner( const char *pszBiosMap, PRTSTREAM hStrm)466 static RTEXITCODE ParseMapFileInner(PBIOSMAP pMap) 445 467 { 446 468 uint32_t iLine = 1; 447 469 char szLine[16384]; 448 470 const char *psz; 471 PRTSTREAM hStrm = pMap->hStrm; /** @todo rewrite the rest. */ 472 const char *pszBiosMap = pMap->pszMapFile; /** @todo rewrite the rest. */ 449 473 450 474 /* … … 496 520 static RTEXITCODE ParseMapFile(const char *pszBiosMap) 497 521 { 498 PRTSTREAM hStrm; 499 int rc = RTStrmOpen(pszBiosMap, "rt", &hStrm); 522 BIOSMAP Map; 523 Map.pszMapFile = pszBiosMap; 524 Map.hStrm = NULL; 525 Map.iLine = 0; 526 Map.cch = 0; 527 Map.offNW = 0; 528 int rc = RTStrmOpen(pszBiosMap, "rt", &Map.hStrm); 500 529 if (RT_FAILURE(rc)) 501 530 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Error opening '%s': %Rrc", pszBiosMap, rc); 502 RTEXITCODE rcExit = ParseMapFileInner( pszBiosMap, hStrm);503 RTStrmClose( hStrm);531 RTEXITCODE rcExit = ParseMapFileInner(&Map); 532 RTStrmClose(Map.hStrm); 504 533 return rcExit; 505 534 }
Note:
See TracChangeset
for help on using the changeset viewer.