VirtualBox

Ignore:
Timestamp:
Nov 20, 2007 6:20:00 PM (17 years ago)
Author:
vboxsync
Message:

Main: Fixed: Always save values of unused attributes of serial ports to preserve user's settings for later use.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/ParallelPortImpl.cpp

    r5659 r5806  
    275275}
    276276
     277/**
     278 *  Saves the port settings to the given <Port> node.
     279 *
     280 *  Note that the given node is always empty so it is not necessary to delete
     281 *  old values.
     282 *
     283 *  @param aNode Node to save the settings to.
     284 *
     285 *  @return
     286 */
    277287HRESULT ParallelPort::saveSettings (CFGNODE aNode)
    278288{
     
    292302    CFGLDRSetUInt32Ex (portNode, "IOBase",  mData->mIOBase, 16);
    293303    CFGLDRSetUInt32   (portNode, "IRQ",     mData->mIRQ);
    294     CFGLDRSetBSTR     (portNode, "path",    mData->mPath);
     304
     305    /* 'path' is optional in XML */
     306    if (!mData->mPath.isEmpty())
     307        CFGLDRSetBSTR (portNode, "path", mData->mPath);
    295308
    296309    return S_OK;
     
    378391    if (aIRQ > 255)
    379392        return setError (E_INVALIDARG,
    380             tr ("Invalid IRQ number: %lu (must be in range [0, %lu])"),
    381                 aIRQ, 255);
     393            tr ("Invalid IRQ number of the parallel port %d: "
     394                "%lu (must be in range [0, %lu])"),
     395            mData->mSlot, aIRQ, 255);
    382396
    383397    AutoCaller autoCaller (this);
     
    432446    if (aIOBase > 0xFFFF)
    433447        return setError (E_INVALIDARG,
    434             tr ("Invalid I/O port base address: %lu (must be in range [0, 0x%X])"),
    435                 aIOBase, 0, 0xFFFF);
     448            tr ("Invalid I/O port base address of the parallel port %d: "
     449                "%lu (must be in range [0, 0x%X])"),
     450            mData->mSlot, aIOBase, 0, 0xFFFF);
    436451
    437452    AutoCaller autoCaller (this);
     
    487502    if (!*aPath)
    488503        return setError (E_INVALIDARG,
    489             tr ("Parallel port path cannot be empty"));
     504            tr ("Path of the parallel port %d may not be empty"),
     505            mData->mSlot);
    490506
    491507    AutoCaller autoCaller (this);
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