VirtualBox

Changeset 98282 in vbox for trunk


Ignore:
Timestamp:
Jan 24, 2023 12:19:42 PM (21 months ago)
Author:
vboxsync
Message:

Main/Guest Control: Resolved a @todo in GuestFileImpl::i_setFileStatus().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/GuestFileImpl.cpp

    r98278 r98282  
    11491149        ComObjPtr<VirtualBoxErrorInfo> errorInfo;
    11501150        HRESULT hrc = errorInfo.createObject();
    1151         ComAssertComRC(hrc);
    1152         /** @todo r=bird: this aint making any sense, creating the object and using it
    1153          *        w/o checking the status code, but discarding it unused based on
    1154          *        an function input. */
     1151        ComAssertComRCRet(hrc, VERR_COM_UNEXPECTED);
    11551152        if (RT_FAILURE(vrcFile))
    11561153        {
    1157             hrc = errorInfo->initEx(VBOX_E_IPRT_ERROR, vrcFile,
     1154            hrc = errorInfo->initEx(VBOX_E_GSTCTL_GUEST_ERROR, vrcFile,
    11581155                                    COM_IIDOF(IGuestFile), getComponentName(),
    11591156                                    i_guestErrorToString(vrcFile, mData.mOpenInfo.mFilename.c_str()));
    1160             ComAssertComRC(hrc);
    1161         }
     1157            ComAssertComRCRet(hrc, VERR_COM_UNEXPECTED);
     1158        }
     1159        /* Note: On vrcFile success, errorInfo is set to S_OK and also sent via the event below. */
    11621160
    11631161        alock.release(); /* Release lock before firing off event. */
     
    15781576        if (GuestProcess::i_isGuestError(vrc))
    15791577        {
     1578#ifndef VBOX_WITH_GSTCTL_NO_TOOLBOX
    15801579            GuestErrorInfo ge(GuestErrorInfo::Type_ToolStat, vrcGuest, mData.mOpenInfo.mFilename.c_str());
    15811580            hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrcGuest, tr("Querying guest file information failed: %s"),
    15821581                               GuestBase::getErrorAsString(ge).c_str());
     1582#endif
    15831583        }
    15841584        else
     
    16111611        if (GuestProcess::i_isGuestError(vrc))
    16121612        {
     1613#ifndef VBOX_WITH_GSTCTL_NO_TOOLBOX
    16131614            GuestErrorInfo ge(GuestErrorInfo::Type_ToolStat, vrcGuest, mData.mOpenInfo.mFilename.c_str());
    16141615            hrc = setErrorBoth(VBOX_E_IPRT_ERROR, vrcGuest, tr("Querying guest file size failed: %s"),
    16151616                               GuestBase::getErrorAsString(ge).c_str());
     1617#endif
    16161618        }
    16171619        else
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