VirtualBox

Changeset 81499 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Oct 23, 2019 8:51:33 PM (5 years ago)
Author:
vboxsync
Message:

IPRT/win: RTSystemQueryFirmwareBoolean should return success on ERROR_ENVVAR_NOT_FOUND.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/win/RTSystemFirmware-win.cpp

    r81140 r81499  
    202202    DWORD cbRet = g_pfnGetFirmwareEnvironmentVariableW(pwszName, VBOX_UEFI_UUID_GLOBALS, &bValue, sizeof(bValue));
    203203    *pfValue = cbRet != 0 && bValue != 0;
    204     return cbRet != 0 || GetLastError() == ERROR_INVALID_FUNCTION ? VINF_SUCCESS : RTErrConvertFromWin32(GetLastError());
    205 }
    206 
     204    if (cbRet != 0)
     205        return VINF_SUCCESS;
     206    DWORD dwErr = GetLastError();
     207    if (   dwErr == ERROR_INVALID_FUNCTION
     208        || dwErr == ERROR_ENVVAR_NOT_FOUND)
     209        return VINF_SUCCESS;
     210    return RTErrConvertFromWin32(dwErr);
     211}
     212
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