VirtualBox

儲存庫 vbox 的更動 18275


忽略:
時間撮記:
2009-3-25 下午07:18:22 (16 年 以前)
作者:
vboxsync
訊息:

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

位置:
trunk/src/VBox/Main
檔案:
修改 3 筆資料

圖例:

未更動
新增
刪除
  • 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    /**
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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