summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2008-12-01 05:55:58 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2008-12-01 05:55:58 +0000
commitb0dd81086156edd2bdf966813660b7224e66b407 (patch)
treef692bf683beff9b89413e8df0f7b58321f1274a9 /MdeModulePkg
parent168da756c603850a73af99f5f19c9ad0bce79f27 (diff)
downloadedk2-platforms-b0dd81086156edd2bdf966813660b7224e66b407.tar.xz
Code scrub for GenericBdsLib library instance.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6786 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Library/GenericBdsLib/BdsBoot.c3
-rw-r--r--MdeModulePkg/Library/GenericBdsLib/BdsConnect.c8
-rw-r--r--MdeModulePkg/Library/GenericBdsLib/BdsConsole.c7
-rw-r--r--MdeModulePkg/Library/GenericBdsLib/DevicePath.c42
-rw-r--r--MdeModulePkg/Library/GenericBdsLib/GenericBdsLib.inf5
5 files changed, 15 insertions, 50 deletions
diff --git a/MdeModulePkg/Library/GenericBdsLib/BdsBoot.c b/MdeModulePkg/Library/GenericBdsLib/BdsBoot.c
index efaf82addc..f5960aa6e7 100644
--- a/MdeModulePkg/Library/GenericBdsLib/BdsBoot.c
+++ b/MdeModulePkg/Library/GenericBdsLib/BdsBoot.c
@@ -1,6 +1,5 @@
/** @file
- BDS Lib functions which relate with create or process the boot
- option.
+ BDS Lib functions which relate with create or process the boot option.
Copyright (c) 2004 - 2008, Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials
diff --git a/MdeModulePkg/Library/GenericBdsLib/BdsConnect.c b/MdeModulePkg/Library/GenericBdsLib/BdsConnect.c
index 66b09ee465..4c721e07db 100644
--- a/MdeModulePkg/Library/GenericBdsLib/BdsConnect.c
+++ b/MdeModulePkg/Library/GenericBdsLib/BdsConnect.c
@@ -317,9 +317,11 @@ BdsLibConnectAllDriversToAllControllers (
element being a USB WWID or a USB Class device
path
- @return EFI_INVALID_PARAMETER
- @return EFI_SUCCESS
- @return EFI_NOT_FOUND
+ @return EFI_INVALID_PARAMETER RemainingDevicePath is NULL pointer.
+ RemainingDevicePath is not a USB device path.
+ Invalid HostControllerPI type.
+ @return EFI_SUCCESS Sucess to connect USB device
+ @return EFI_NOT_FOUND Fail to find hanlde for USB controller to connect.
**/
EFI_STATUS
diff --git a/MdeModulePkg/Library/GenericBdsLib/BdsConsole.c b/MdeModulePkg/Library/GenericBdsLib/BdsConsole.c
index af3572ff7d..ff72aa0f08 100644
--- a/MdeModulePkg/Library/GenericBdsLib/BdsConsole.c
+++ b/MdeModulePkg/Library/GenericBdsLib/BdsConsole.c
@@ -47,7 +47,6 @@ IsNvNeed (
}
}
-
/**
This function update console variable based on ConVarName, it can
add or remove one specific console device path from the variable
@@ -185,6 +184,7 @@ BdsLibUpdateConsoleVariable (
@param ConVarName Console related variable name, ConIn, ConOut,
ErrOut.
+ @retval EFI_UNSUPPORTED Request console variable does not exist.
@retval EFI_NOT_FOUND There is not any console devices connected
success
@retval EFI_SUCCESS Success connect any one instance of the console
@@ -627,6 +627,9 @@ LockKeyboards (
@retval EFI_SUCCESS ConsoleControl has been flipped to graphics and logo displayed.
@retval EFI_UNSUPPORTED Logo not found.
+ Fail to locate ConsoleControl protocol.
+ Fail to get UgaDraw or Gop handle.
+ Fail to switch grahic mode.
**/
EFI_STATUS
@@ -875,7 +878,7 @@ EnableQuietBoot (
Simple Text Out screens will now be synced up with all non UGA output devices
@retval EFI_SUCCESS UGA devices are back in text mode and synced up.
- @retval EFI_UNSUPPORTED Logo not found
+ @retval EFI_UNSUPPORTED Fail to locate ConsoleControl Protocol.
**/
EFI_STATUS
diff --git a/MdeModulePkg/Library/GenericBdsLib/DevicePath.c b/MdeModulePkg/Library/GenericBdsLib/DevicePath.c
index 421bba00cb..478dfd81fa 100644
--- a/MdeModulePkg/Library/GenericBdsLib/DevicePath.c
+++ b/MdeModulePkg/Library/GenericBdsLib/DevicePath.c
@@ -1492,45 +1492,3 @@ Done:
Str.str[Str.len] = 0;
return Str.str;
}
-
-/**
- Function creates a device path data structure that identically matches the
- device path passed in.
-
- @param DevPath A pointer to a device path data structure.
-
- @return The new copy of DevPath is created to identically match the input.
- @return Otherwise, NULL is returned.
-
-**/
-EFI_DEVICE_PATH_PROTOCOL *
-LibDuplicateDevicePathInstance (
- IN EFI_DEVICE_PATH_PROTOCOL *DevPath
- )
-{
- EFI_DEVICE_PATH_PROTOCOL *NewDevPath;
- EFI_DEVICE_PATH_PROTOCOL *DevicePathInst;
- EFI_DEVICE_PATH_PROTOCOL *Temp;
- UINTN Size;
-
- //
- // get the size of an instance from the input
- //
- Temp = DevPath;
- DevicePathInst = GetNextDevicePathInstance (&Temp, &Size);
-
- //
- // Make a copy
- //
- NewDevPath = NULL;
- if (Size != 0) {
- NewDevPath = AllocateZeroPool (Size);
- ASSERT (NewDevPath != NULL);
- }
-
- if (NewDevPath != NULL) {
- CopyMem (NewDevPath, DevicePathInst, Size);
- }
-
- return NewDevPath;
-}
diff --git a/MdeModulePkg/Library/GenericBdsLib/GenericBdsLib.inf b/MdeModulePkg/Library/GenericBdsLib/GenericBdsLib.inf
index 34100d2668..e9280c9175 100644
--- a/MdeModulePkg/Library/GenericBdsLib/GenericBdsLib.inf
+++ b/MdeModulePkg/Library/GenericBdsLib/GenericBdsLib.inf
@@ -1,6 +1,9 @@
#/** @file
#
-# Component name for module GenericBdsLib
+# General BDS defines and produce general interfaces for platform BDS driver including:
+# 1) BDS boot policy interface;
+# 2) BDS boot device connect interface;
+# 3) BDS Misc interfaces for mainting boot variable, ouput string, etc.
#
# Copyright (c) 2007 - 2008, Intel Corporation. <BR>
# All rights reserved. This program and the accompanying materials