36 UINT32 OptionalDataSize;
41 BOOLEAN NewOptionValid;
45 BootNextValue = 0xABCD;
48 NewOptionValid =
FALSE;
60 Attributes = LOAD_OPTION_ACTIVE;
64 DEBUG ((DEBUG_ERROR,
"%a: Unable to create device path. DpEnd is NULL.\n", __func__));
65 Status = EFI_OUT_OF_RESOURCES;
75 DEBUG ((DEBUG_ERROR,
"%a: Unable to create device path. Dp is NULL.\n", __func__));
76 Status = EFI_OUT_OF_RESOURCES;
85 L
"Generic USB Class Device",
90 if (EFI_ERROR (Status)) {
91 DEBUG ((DEBUG_ERROR,
"%a: Error creating load option. Status = %r\n", __func__, Status));
95 NewOptionValid =
TRUE;
96 DEBUG ((DEBUG_VERBOSE,
"%a: Generic USB Class Device boot option created.\n", __func__));
98 if (EFI_ERROR (Status)) {
99 DEBUG ((DEBUG_ERROR,
"%a: Error Saving boot option NV variable. Status = %r\n", __func__, Status));
106 Status =
gRT->SetVariable (
108 &gEfiGlobalVariableGuid,
110 sizeof (BootNextValue),
114 DEBUG ((DEBUG_VERBOSE,
"%a - Set BootNext Status (%r)\n", __func__, Status));
125 if (NewOptionValid) {
#define MESSAGING_DEVICE_PATH
EFI_DEVICE_PATH_PROTOCOL *EFIAPI AppendDevicePathNode(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath OPTIONAL, IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathNode OPTIONAL)
VOID EFIAPI FreePool(IN VOID *Buffer)
EFI_RUNTIME_SERVICES * gRT
#define DEBUG(Expression)
EFI_STATUS EFIAPI EfiBootManagerLoadOptionToVariable(IN CONST EFI_BOOT_MANAGER_LOAD_OPTION *LoadOption)
EFI_STATUS EFIAPI EfiBootManagerFreeLoadOption(IN EFI_BOOT_MANAGER_LOAD_OPTION *LoadOption)
EFI_STATUS EFIAPI EfiBootManagerInitializeLoadOption(IN OUT EFI_BOOT_MANAGER_LOAD_OPTION *Option, IN UINTN OptionNumber, IN EFI_BOOT_MANAGER_LOAD_OPTION_TYPE OptionType, IN UINT32 Attributes, IN CHAR16 *Description, IN EFI_DEVICE_PATH_PROTOCOL *FilePath, IN UINT8 *OptionalData, IN UINT32 OptionalDataSize)
#define EFI_VARIABLE_NON_VOLATILE