add support to easily remove profiles and shell levels. the libraries will not do anything (but no longer fail), if the PCDs are changed to remove their functionality.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11666 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -56,7 +56,7 @@ UefiShellDebug1CommandsLibConstructor (
|
||||
// check our bit of the profiles mask
|
||||
//
|
||||
if ((PcdGet8(PcdShellProfileMask) & BIT1) == 0) {
|
||||
return (EFI_UNSUPPORTED);
|
||||
return (EFI_SUCCESS);
|
||||
}
|
||||
|
||||
//
|
||||
|
@@ -57,7 +57,7 @@ UefiShellDriver1CommandsLibConstructor (
|
||||
// check our bit of the profiles mask
|
||||
//
|
||||
if ((PcdGet8(PcdShellProfileMask) & BIT0) == 0) {
|
||||
return (EFI_UNSUPPORTED);
|
||||
return (EFI_SUCCESS);
|
||||
}
|
||||
|
||||
//
|
||||
|
@@ -57,7 +57,7 @@ ShellInstall1CommandsLibConstructor (
|
||||
// check our bit of the profiles mask
|
||||
//
|
||||
if ((PcdGet8(PcdShellProfileMask) & BIT2) == 0) {
|
||||
return (EFI_UNSUPPORTED);
|
||||
return (EFI_SUCCESS);
|
||||
}
|
||||
|
||||
gShellInstall1HiiHandle = HiiAddPackages (&gShellInstall1HiiGuid, gImageHandle, UefiShellInstall1CommandsLibStrings, NULL);
|
||||
|
@@ -58,7 +58,7 @@ ShellLevel1CommandsLibConstructor (
|
||||
// if shell level is less than 2 do nothing
|
||||
//
|
||||
if (PcdGet8(PcdShellSupportLevel) < 1) {
|
||||
return (EFI_UNSUPPORTED);
|
||||
return (EFI_SUCCESS);
|
||||
}
|
||||
|
||||
gShellLevel1HiiHandle = HiiAddPackages (&gShellLevel1HiiGuid, gImageHandle, UefiShellLevel1CommandsLibStrings, NULL);
|
||||
|
@@ -77,7 +77,7 @@ ShellLevel2CommandsLibConstructor (
|
||||
// if shell level is less than 2 do nothing
|
||||
//
|
||||
if (PcdGet8(PcdShellSupportLevel) < 2) {
|
||||
return (EFI_UNSUPPORTED);
|
||||
return (EFI_SUCCESS);
|
||||
}
|
||||
|
||||
gShellLevel2HiiHandle = HiiAddPackages (&gShellLevel2HiiGuid, gImageHandle, UefiShellLevel2CommandsLibStrings, NULL);
|
||||
|
@@ -57,7 +57,7 @@ ShellLevel3CommandsLibConstructor (
|
||||
// if shell level is less than 3 do nothing
|
||||
//
|
||||
if (PcdGet8(PcdShellSupportLevel) < 3) {
|
||||
return (EFI_UNSUPPORTED);
|
||||
return (EFI_SUCCESS);
|
||||
}
|
||||
|
||||
gShellLevel3HiiHandle = HiiAddPackages (&gShellLevel3HiiGuid, gImageHandle, UefiShellLevel3CommandsLibStrings, NULL);
|
||||
|
@@ -58,7 +58,7 @@ ShellNetwork1CommandsLibConstructor (
|
||||
// check our bit of the profiles mask
|
||||
//
|
||||
if ((PcdGet8(PcdShellProfileMask) & BIT3) == 0) {
|
||||
return (EFI_UNSUPPORTED);
|
||||
return (EFI_SUCCESS);
|
||||
}
|
||||
|
||||
gShellNetwork1HiiHandle = HiiAddPackages (&gShellNetwork1HiiGuid, gImageHandle, UefiShellNetwork1CommandsLibStrings, NULL);
|
||||
|
Reference in New Issue
Block a user