]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellLevel2CommandsLib/Map.c
Update all the code to consume the ConvertDevicePathToText, ConvertDevicePathNodeToTe...
[mirror_edk2.git] / ShellPkg / Library / UefiShellLevel2CommandsLib / Map.c
index 78e432bcd4f98f8fc1b4186ded67675bce613841..bd004beaaf9fa291bcdf66bf7c8d4471e6343bc9 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Main file for map shell level 2 command.\r
 \r
-  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -421,7 +421,7 @@ PerformSingleMappingDisplay(
   if (TempSpot != NULL) {\r
     *TempSpot = CHAR_NULL;\r
   }\r
-  DevPathString = gDevPathToText->ConvertDevicePathToText(DevPath, TRUE, FALSE);\r
+  DevPathString = ConvertDevicePathToText(DevPath, TRUE, FALSE);\r
   if (!SFO) {\r
     TempLen = StrLen(CurrentName);\r
     ShellPrintHiiEx (\r
@@ -1091,18 +1091,15 @@ ShellCommandRunMap (
           if (SName != NULL) {\r
             Status = PerformMappingDelete(SName);\r
             if (EFI_ERROR(Status)) {\r
-              switch (Status) {\r
-                case EFI_ACCESS_DENIED:\r
-                  ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_AD), gShellLevel2HiiHandle);\r
-                  ShellStatus = SHELL_ACCESS_DENIED;\r
-                  break;\r
-                case EFI_NOT_FOUND:\r
-                  ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_MAP_NF), gShellLevel2HiiHandle, SName);\r
-                  ShellStatus = SHELL_INVALID_PARAMETER;\r
-                  break;\r
-                default:\r
-                  ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_UK), gShellLevel2HiiHandle, Status);\r
-                  ShellStatus = SHELL_UNSUPPORTED;\r
+              if (Status == EFI_ACCESS_DENIED) {\r
+                ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_AD), gShellLevel2HiiHandle);\r
+                ShellStatus = SHELL_ACCESS_DENIED;\r
+              } else if (Status == EFI_NOT_FOUND) {\r
+                ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_MAP_NF), gShellLevel2HiiHandle, SName);\r
+                ShellStatus = SHELL_INVALID_PARAMETER;\r
+              } else {\r
+                ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_UK), gShellLevel2HiiHandle, Status);\r
+                ShellStatus = SHELL_UNSUPPORTED;\r
               }\r
             }\r
           } else {\r