VirtualBox

Changeset 41483 in vbox for trunk/src/VBox/Devices/PC


Ignore:
Timestamp:
May 29, 2012 2:58:25 PM (13 years ago)
Author:
vboxsync
Message:

...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/BIOS-new/MakeDebianBiosAssembly.cpp

    r41482 r41483  
    4747/** Pointer to a BIOS segment. */
    4848typedef BIOSSEG *PBIOSSEG;
     49
     50
     51/**
     52 * Pointer to a BIOS map parser handle.
     53 */
     54typedef 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. */
     70typedef BIOSMAP *PBIOSMAP;
    4971
    5072
     
    442464
    443465
    444 static RTEXITCODE ParseMapFileInner(const char *pszBiosMap, PRTSTREAM hStrm)
     466static RTEXITCODE ParseMapFileInner(PBIOSMAP pMap)
    445467{
    446468    uint32_t    iLine = 1;
    447469    char        szLine[16384];
    448470    const char *psz;
     471    PRTSTREAM   hStrm = pMap->hStrm; /** @todo rewrite the rest. */
     472    const char *pszBiosMap = pMap->pszMapFile; /** @todo rewrite the rest. */
    449473
    450474    /*
     
    496520static RTEXITCODE ParseMapFile(const char *pszBiosMap)
    497521{
    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);
    500529    if (RT_FAILURE(rc))
    501530        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);
    504533    return rcExit;
    505534}
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette