VirtualBox

Ignore:
Timestamp:
Sep 29, 2023 3:13:07 PM (16 months ago)
Author:
vboxsync
Message:

Main: Move findEfiRom to the common code and add a PlatformArchitecture_T parameter to IVirtualBox::CheckFirmwarePresent to differentiate between x86 and ARM, bugref:10528

File:
1 edited

Legend:

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

    r101173 r101318  
    34213421}
    34223422
     3423
     3424#ifndef VBOX_WITH_EFI_IN_DD2
     3425DECLHIDDEN(int) findEfiRom(IVirtualBox* vbox, PlatformArchitecture_T aPlatformArchitecture, FirmwareType_T aFirmwareType, Utf8Str *pEfiRomFile)
     3426{
     3427    Bstr aFilePath, empty;
     3428    BOOL fPresent = FALSE;
     3429    HRESULT hrc = vbox->CheckFirmwarePresent(aPlatformArchitecture, aFirmwareType, empty.raw(),
     3430                                             empty.asOutParam(), aFilePath.asOutParam(), &fPresent);
     3431    AssertComRCReturn(hrc, Global::vboxStatusCodeFromCOM(hrc));
     3432
     3433    if (!fPresent)
     3434    {
     3435        LogRel(("Failed to find an EFI ROM file.\n"));
     3436        return VERR_FILE_NOT_FOUND;
     3437    }
     3438
     3439    *pEfiRomFile = Utf8Str(aFilePath);
     3440
     3441    return VINF_SUCCESS;
     3442}
     3443#endif
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