- OutDevicePath = EfiLibGetVariable (L"ConOut", &gEfiGlobalVariableGuid);\r
- InpDevicePath = EfiLibGetVariable (L"ConIn", &gEfiGlobalVariableGuid);\r
- ErrDevicePath = EfiLibGetVariable (L"ErrOut", &gEfiGlobalVariableGuid);\r
- if (OutDevicePath != NULL) {\r
- ChangeVariableDevicePath (OutDevicePath);\r
- Status = gRT->SetVariable (\r
- L"ConOut",\r
- &gEfiGlobalVariableGuid,\r
- EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE,\r
- GetDevicePathSize (OutDevicePath),\r
- OutDevicePath\r
- );\r
- //\r
- // Changing variable without increasing its size with current variable implementation shouldn't fail.\r
- //\r
- ASSERT_EFI_ERROR (Status);\r
- }\r
-\r
- if (InpDevicePath != NULL) {\r
- ChangeVariableDevicePath (InpDevicePath);\r
- Status = gRT->SetVariable (\r
- L"ConIn",\r
- &gEfiGlobalVariableGuid,\r
- EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE,\r
- GetDevicePathSize (InpDevicePath),\r
- InpDevicePath\r
- );\r
- //\r
- // Changing variable without increasing its size with current variable implementation shouldn't fail.\r
- //\r
- ASSERT_EFI_ERROR (Status);\r
- }\r
-\r
- if (ErrDevicePath != NULL) {\r
- ChangeVariableDevicePath (ErrDevicePath);\r
- Status = gRT->SetVariable (\r
- L"ErrOut",\r
- &gEfiGlobalVariableGuid,\r
- EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE,\r
- GetDevicePathSize (ErrDevicePath),\r
- ErrDevicePath\r
- );\r
- //\r
- // Changing variable without increasing its size with current variable implementation shouldn't fail.\r
- //\r
- ASSERT_EFI_ERROR (Status);\r
- }\r
-}\r