summaryrefslogtreecommitdiff
path: root/ShellPkg/Library/UefiShellLevel2CommandsLib/Map.c
diff options
context:
space:
mode:
authorLeif Lindholm <leif.lindholm@linaro.org>2013-06-19 11:07:03 +0100
committerLeif Lindholm <leif.lindholm@linaro.org>2013-06-19 11:07:03 +0100
commit4a21c40a5f30d67cdf876bc50f48abd37d9eea68 (patch)
tree49f9dd09a6ad18c45a9c1a5b9eca633a6f1a9f32 /ShellPkg/Library/UefiShellLevel2CommandsLib/Map.c
parent4cbfd417d24602d2d9c05cc5693a6e6087d1c96d (diff)
parent162fed6be629c847e162462331565e9204e47fa2 (diff)
Merging linaro-tracking-2013.06 into linaro-releaselinaro-uefi-2013.06
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Diffstat (limited to 'ShellPkg/Library/UefiShellLevel2CommandsLib/Map.c')
-rw-r--r--ShellPkg/Library/UefiShellLevel2CommandsLib/Map.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/Map.c b/ShellPkg/Library/UefiShellLevel2CommandsLib/Map.c
index a1f9448df9..2725f4ad39 100644
--- a/ShellPkg/Library/UefiShellLevel2CommandsLib/Map.c
+++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/Map.c
@@ -1,7 +1,7 @@
/** @file
Main file for map shell level 2 command.
- Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -1025,7 +1025,6 @@ ShellCommandRunMap (
CONST CHAR16 *SName;
CONST CHAR16 *Mapping;
EFI_HANDLE MapAsHandle;
- CONST EFI_DEVICE_PATH_PROTOCOL *DevPath;
SHELL_STATUS ShellStatus;
BOOLEAN SfoMode;
BOOLEAN ConstMode;
@@ -1037,7 +1036,6 @@ ShellCommandRunMap (
ProblemParam = NULL;
Mapping = NULL;
SName = NULL;
- DevPath = NULL;
ShellStatus = SHELL_SUCCESS;
MapAsHandle = NULL;
@@ -1093,18 +1091,15 @@ ShellCommandRunMap (
if (SName != NULL) {
Status = PerformMappingDelete(SName);
if (EFI_ERROR(Status)) {
- switch (Status) {
- case EFI_ACCESS_DENIED:
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_AD), gShellLevel2HiiHandle);
- ShellStatus = SHELL_ACCESS_DENIED;
- break;
- case EFI_NOT_FOUND:
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_MAP_NF), gShellLevel2HiiHandle, SName);
- ShellStatus = SHELL_INVALID_PARAMETER;
- break;
- default:
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_UK), gShellLevel2HiiHandle, Status);
- ShellStatus = SHELL_UNSUPPORTED;
+ if (Status == EFI_ACCESS_DENIED) {
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_AD), gShellLevel2HiiHandle);
+ ShellStatus = SHELL_ACCESS_DENIED;
+ } else if (Status == EFI_NOT_FOUND) {
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_MAP_NF), gShellLevel2HiiHandle, SName);
+ ShellStatus = SHELL_INVALID_PARAMETER;
+ } else {
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_UK), gShellLevel2HiiHandle, Status);
+ ShellStatus = SHELL_UNSUPPORTED;
}
}
} else {