VirtualBox

Changeset 18275 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Mar 25, 2009 7:18:22 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
45025
Message:

Main: fix borkage introduced by r44866 which caused all hard disk to have 0 byte sizes in instance data (stupid C++ overloading)

Location:
trunk/src/VBox/Main
Files:
3 edited

Legend:

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

    r16867 r18275  
    115115        case MediaState_LockedWrite:
    116116        {
    117             rc = queryInfo();
     117            rc = queryInfo(true /* fWrite */);
    118118            break;
    119119        }
     
    715715 * size and description will be updated with the current information.
    716716 *
     717 * The fWrite parameter is ignored in this variant, since this always opens
     718 * the medium read-only; it is however acknowledged by HardDisk::queryInfo(),
     719 * which overrides this implementation for hard disk media.
     720 *
    717721 * @note This method may block during a system I/O call that checks image file
    718722 *       accessibility.
     
    720724 * @note Locks this object for writing.
    721725 */
    722 HRESULT MediumBase::queryInfo()
     726HRESULT MediumBase::queryInfo(bool fWrite)
    723727{
    724728    AutoWriteLock alock (this);
     
    962966
    963967    /* get all the information about the medium from the file */
    964     rc = queryInfo();
     968    rc = queryInfo(true);
    965969    if (SUCCEEDED (rc))
    966970    {
  • trunk/src/VBox/Main/include/HardDiskImpl.h

    r18177 r18275  
    256256    HRESULT setFormat (CBSTR aFormat);
    257257
    258     HRESULT queryInfo(bool fWrite);
     258    virtual HRESULT queryInfo(bool fWrite);
    259259
    260260    HRESULT canClose();
  • trunk/src/VBox/Main/include/MediumImpl.h

    r17911 r18275  
    143143
    144144    virtual HRESULT setLocation (CBSTR aLocation);
    145     virtual HRESULT queryInfo();
     145    virtual HRESULT queryInfo(bool fWrite);
    146146
    147147    /**
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