diff options
author | Ruiyu Ni <ruiyu.ni@intel.com> | 2015-05-11 06:33:45 +0000 |
---|---|---|
committer | niruiyu <niruiyu@Edk2> | 2015-05-11 06:33:45 +0000 |
commit | 1634214dbb06057e331b85727947683d3b3bf2f4 (patch) | |
tree | d0b80f6df17e72f2dabb3cc06ee7a19f617da720 /MdeModulePkg/Library/UefiBootManagerLib/BmConsole.c | |
parent | 573b8a86d0722ea8496af5213b134b0c3daa8f00 (diff) | |
download | edk2-platforms-1634214dbb06057e331b85727947683d3b3bf2f4.tar.xz |
MdeModulePkg: Process Sys Prep load options in BdsDxe driver.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17403 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Library/UefiBootManagerLib/BmConsole.c')
-rw-r--r-- | MdeModulePkg/Library/UefiBootManagerLib/BmConsole.c | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmConsole.c b/MdeModulePkg/Library/UefiBootManagerLib/BmConsole.c index 49b99957e0..4f5c8b04c2 100644 --- a/MdeModulePkg/Library/UefiBootManagerLib/BmConsole.c +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmConsole.c @@ -695,28 +695,42 @@ EfiBootManagerConnectAllConsoles ( /** This function will connect all the console devices base on the console device variable ConIn, ConOut and ErrOut. + + @retval EFI_DEVICE_ERROR All the consoles were not connected due to an error. + @retval EFI_SUCCESS Success connect any one instance of the console + device path base on the variable ConVarName. **/ -VOID +EFI_STATUS EFIAPI EfiBootManagerConnectAllDefaultConsoles ( VOID ) { + EFI_STATUS Status; + BOOLEAN OneConnected; BOOLEAN SystemTableUpdated; - EfiBootManagerConnectConsoleVariable (ConOut); + OneConnected = FALSE; + + Status = EfiBootManagerConnectConsoleVariable (ConOut); + if (!EFI_ERROR (Status)) { + OneConnected = TRUE; + } PERF_START (NULL, "ConOutReady", "BDS", 1); PERF_END (NULL, "ConOutReady", "BDS", 0); - EfiBootManagerConnectConsoleVariable (ConIn); + Status = EfiBootManagerConnectConsoleVariable (ConIn); + if (!EFI_ERROR (Status)) { + OneConnected = TRUE; + } PERF_START (NULL, "ConInReady", "BDS", 1); PERF_END (NULL, "ConInReady", "BDS", 0); - // - // The _ModuleEntryPoint err out var is legal. - // - EfiBootManagerConnectConsoleVariable (ErrOut); + Status = EfiBootManagerConnectConsoleVariable (ErrOut); + if (!EFI_ERROR (Status)) { + OneConnected = TRUE; + } PERF_START (NULL, "ErrOutReady", "BDS", 1); PERF_END (NULL, "ErrOutReady", "BDS", 0); @@ -745,4 +759,6 @@ EfiBootManagerConnectAllDefaultConsoles ( &gST->Hdr.CRC32 ); } + + return OneConnected ? EFI_SUCCESS : EFI_DEVICE_ERROR; } |