Cleaned up EFI Console Variable usage
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3666 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
9843f06732
commit
ff37790d3d
@ -279,7 +279,7 @@ Returns:
|
|||||||
// Append the device path to the ConInDev environment variable
|
// Append the device path to the ConInDev environment variable
|
||||||
//
|
//
|
||||||
ConPlatformUpdateDeviceVariable (
|
ConPlatformUpdateDeviceVariable (
|
||||||
VarConsoleInpDev,
|
L"ConInDev",
|
||||||
DevicePath,
|
DevicePath,
|
||||||
APPEND
|
APPEND
|
||||||
);
|
);
|
||||||
@ -289,7 +289,7 @@ Returns:
|
|||||||
// then install EfiConsoleInDeviceGuid onto ControllerHandle
|
// then install EfiConsoleInDeviceGuid onto ControllerHandle
|
||||||
//
|
//
|
||||||
Status = ConPlatformUpdateDeviceVariable (
|
Status = ConPlatformUpdateDeviceVariable (
|
||||||
VarConsoleInp,
|
L"ConIn",
|
||||||
DevicePath,
|
DevicePath,
|
||||||
CHECK
|
CHECK
|
||||||
);
|
);
|
||||||
@ -387,7 +387,7 @@ Returns:
|
|||||||
// Append the device path to the ConOutDev environment variable
|
// Append the device path to the ConOutDev environment variable
|
||||||
//
|
//
|
||||||
ConPlatformUpdateDeviceVariable (
|
ConPlatformUpdateDeviceVariable (
|
||||||
VarConsoleOutDev,
|
L"ConOutDev",
|
||||||
DevicePath,
|
DevicePath,
|
||||||
APPEND
|
APPEND
|
||||||
);
|
);
|
||||||
@ -395,7 +395,7 @@ Returns:
|
|||||||
// Append the device path to the StdErrDev environment variable
|
// Append the device path to the StdErrDev environment variable
|
||||||
//
|
//
|
||||||
ConPlatformUpdateDeviceVariable (
|
ConPlatformUpdateDeviceVariable (
|
||||||
VarErrorOutDev,
|
L"ErrOutDev",
|
||||||
DevicePath,
|
DevicePath,
|
||||||
APPEND
|
APPEND
|
||||||
);
|
);
|
||||||
@ -405,7 +405,7 @@ Returns:
|
|||||||
// then install EfiConsoleOutDeviceGuid onto ControllerHandle
|
// then install EfiConsoleOutDeviceGuid onto ControllerHandle
|
||||||
//
|
//
|
||||||
Status = ConPlatformUpdateDeviceVariable (
|
Status = ConPlatformUpdateDeviceVariable (
|
||||||
VarConsoleOut,
|
L"ConOut",
|
||||||
DevicePath,
|
DevicePath,
|
||||||
CHECK
|
CHECK
|
||||||
);
|
);
|
||||||
@ -496,7 +496,7 @@ Returns:
|
|||||||
// Remove DevicePath from ConInDev
|
// Remove DevicePath from ConInDev
|
||||||
//
|
//
|
||||||
ConPlatformUpdateDeviceVariable (
|
ConPlatformUpdateDeviceVariable (
|
||||||
VarConsoleInpDev,
|
L"ConInDev",
|
||||||
DevicePath,
|
DevicePath,
|
||||||
DELETE
|
DELETE
|
||||||
);
|
);
|
||||||
@ -569,12 +569,12 @@ Returns:
|
|||||||
// Remove DevicePath from ConOutDev, and StdErrDev
|
// Remove DevicePath from ConOutDev, and StdErrDev
|
||||||
//
|
//
|
||||||
ConPlatformUpdateDeviceVariable (
|
ConPlatformUpdateDeviceVariable (
|
||||||
VarConsoleOutDev,
|
L"ConOutDev",
|
||||||
DevicePath,
|
DevicePath,
|
||||||
DELETE
|
DELETE
|
||||||
);
|
);
|
||||||
ConPlatformUpdateDeviceVariable (
|
ConPlatformUpdateDeviceVariable (
|
||||||
VarErrorOutDev,
|
L"ErrOutDev",
|
||||||
DevicePath,
|
DevicePath,
|
||||||
DELETE
|
DELETE
|
||||||
);
|
);
|
||||||
|
@ -46,12 +46,6 @@ extern EFI_COMPONENT_NAME_PROTOCOL gConPlatformComponentName;
|
|||||||
extern EFI_DRIVER_BINDING_PROTOCOL gConPlatformTextOutDriverBinding;
|
extern EFI_DRIVER_BINDING_PROTOCOL gConPlatformTextOutDriverBinding;
|
||||||
extern EFI_COMPONENT_NAME_PROTOCOL gConPlatformComponentName;
|
extern EFI_COMPONENT_NAME_PROTOCOL gConPlatformComponentName;
|
||||||
|
|
||||||
#define VarConsoleInpDev L"ConInDev"
|
|
||||||
#define VarConsoleInp L"ConIn"
|
|
||||||
#define VarConsoleOutDev L"ConOutDev"
|
|
||||||
#define VarConsoleOut L"ConOut"
|
|
||||||
#define VarErrorOutDev L"ErrOutDev"
|
|
||||||
#define VarErrorOut L"ErrOut"
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
CHECK,
|
CHECK,
|
||||||
|
@ -306,9 +306,9 @@ TerminalDriverBindingStart (
|
|||||||
EFI_OPEN_PROTOCOL_TEST_PROTOCOL
|
EFI_OPEN_PROTOCOL_TEST_PROTOCOL
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
TerminalUpdateConsoleDevVariable ((CHAR16 *)VarConsoleInpDev, ParentDevicePath);
|
TerminalUpdateConsoleDevVariable (L"ConInDev", ParentDevicePath);
|
||||||
TerminalUpdateConsoleDevVariable ((CHAR16 *)VarConsoleOutDev, ParentDevicePath);
|
TerminalUpdateConsoleDevVariable ((L"ConOutDev", ParentDevicePath);
|
||||||
TerminalUpdateConsoleDevVariable ((CHAR16 *)VarErrorOutDev, ParentDevicePath);
|
TerminalUpdateConsoleDevVariable (L"ErrOutDev", ParentDevicePath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -707,9 +707,9 @@ TerminalDriverBindingStop (
|
|||||||
// Remove Parent Device Path from
|
// Remove Parent Device Path from
|
||||||
// the Console Device Environment Variables
|
// the Console Device Environment Variables
|
||||||
//
|
//
|
||||||
TerminalRemoveConsoleDevVariable ((CHAR16 *)VarConsoleInpDev, ParentDevicePath);
|
TerminalRemoveConsoleDevVariable (L"ConInDev", ParentDevicePath);
|
||||||
TerminalRemoveConsoleDevVariable ((CHAR16 *)VarConsoleOutDev, ParentDevicePath);
|
TerminalRemoveConsoleDevVariable (L"ConOutDev", ParentDevicePath);
|
||||||
TerminalRemoveConsoleDevVariable ((CHAR16 *)VarErrorOutDev, ParentDevicePath);
|
TerminalRemoveConsoleDevVariable (L"ErrOutDev", ParentDevicePath);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Uninstall the Terminal Driver's GUID Tag from the Serial controller
|
// Uninstall the Terminal Driver's GUID Tag from the Serial controller
|
||||||
|
@ -146,10 +146,6 @@ typedef struct {
|
|||||||
CHAR8 Ascii;
|
CHAR8 Ascii;
|
||||||
} UNICODE_TO_CHAR;
|
} UNICODE_TO_CHAR;
|
||||||
|
|
||||||
#define VarConsoleInpDev L"ConInDev"
|
|
||||||
#define VarConsoleOutDev L"ConOutDev"
|
|
||||||
#define VarErrorOutDev L"ErrOutDev"
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Global Variables
|
// Global Variables
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user