VirtualBox

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


Ignore:
Timestamp:
Nov 1, 2022 7:23:25 AM (2 years ago)
Author:
vboxsync
Message:

​bugref:10180 - Use hrc instead of rc for HRESULT.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/UnattendedImpl.cpp

    r97362 r97363  
    42094209
    42104210    ComPtr<IMedium> ptrMedium;
    4211     HRESULT rc = mParent->OpenMedium(Bstr(pImage->strImagePath).raw(),
    4212                                      pImage->enmDeviceType,
    4213                                      pImage->enmAccessType,
    4214                                      true,
    4215                                      ptrMedium.asOutParam());
    4216     LogRelFlowFunc(("VirtualBox::openMedium -> %Rhrc\n", rc));
    4217     if (SUCCEEDED(rc))
     4211    HRESULT hrc = mParent->OpenMedium(Bstr(pImage->strImagePath).raw(),
     4212                                      pImage->enmDeviceType,
     4213                                      pImage->enmAccessType,
     4214                                      true,
     4215                                      ptrMedium.asOutParam());
     4216    LogRelFlowFunc(("VirtualBox::openMedium -> %Rhrc\n", hrc));
     4217    if (SUCCEEDED(hrc))
    42184218    {
    42194219        if (pImage->fAuxiliary && pImage->strImagePath.endsWith(".viso"))
    42204220        {
    4221             rc = ptrMedium->SetProperty(Bstr(L"UnattendedInstall").raw(), Bstr(L"1").raw());
    4222             LogRelFlowFunc(("Medium::SetProperty -> %Rhrc\n", rc));
     4221            hrc = ptrMedium->SetProperty(Bstr(L"UnattendedInstall").raw(), Bstr(L"1").raw());
     4222            LogRelFlowFunc(("Medium::SetProperty -> %Rhrc\n", hrc));
    42234223        }
    42244224
     
    42264226        {
    42274227            // mount the opened disk image
    4228             rc = rPtrSessionMachine->MountMedium(Bstr(pImage->strControllerName).raw(), pImage->iPort,
    4229                                                  pImage->iDevice, ptrMedium, TRUE /*fForce*/);
    4230             LogRelFlowFunc(("Machine::MountMedium -> %Rhrc\n", rc));
     4228            hrc = rPtrSessionMachine->MountMedium(Bstr(pImage->strControllerName).raw(), pImage->iPort,
     4229                                                  pImage->iDevice, ptrMedium, TRUE /*fForce*/);
     4230            LogRelFlowFunc(("Machine::MountMedium -> %Rhrc\n", hrc));
    42314231        }
    42324232        else
    42334233        {
    42344234            //attach the opened disk image to the controller
    4235             rc = rPtrSessionMachine->AttachDevice(Bstr(pImage->strControllerName).raw(), pImage->iPort,
    4236                                                   pImage->iDevice, pImage->enmDeviceType, ptrMedium);
    4237             LogRelFlowFunc(("Machine::AttachDevice -> %Rhrc\n", rc));
     4235            hrc = rPtrSessionMachine->AttachDevice(Bstr(pImage->strControllerName).raw(), pImage->iPort,
     4236                                                   pImage->iDevice, pImage->enmDeviceType, ptrMedium);
     4237            LogRelFlowFunc(("Machine::AttachDevice -> %Rhrc\n", hrc));
    42384238        }
    42394239    }
    42404240
    42414241    rLock.acquire();
    4242     return rc;
     4242    return hrc;
    42434243}
    42444244
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