]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellDebug1CommandsLib/SetVar.c
Update all the code to consume the ConvertDevicePathToText, ConvertDevicePathNodeToTe...
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / SetVar.c
index 34eb6af8ac80c77051fbcd3420b71f0999ecd694..8d26c9d93b946b978b213863c1aa1b913a1221b0 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Main file for SetVar shell Debug1 function.\r
 \r
-  Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 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
@@ -49,7 +49,6 @@ ShellCommandRunSetVar (
   UINTN               Size;\r
   UINTN               LoopVar;\r
   EFI_DEVICE_PATH_PROTOCOL           *DevPath;\r
-  EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL *DevPathFromText;\r
 \r
   ShellStatus         = SHELL_SUCCESS;\r
   Status              = EFI_SUCCESS;\r
@@ -226,9 +225,7 @@ ShellCommandRunSetVar (
           //\r
           Data++;\r
           Data++;\r
-          Status = gBS->LocateProtocol(&gEfiDevicePathFromTextProtocolGuid, NULL, (VOID**)&DevPathFromText);\r
-          ASSERT_EFI_ERROR(Status);\r
-          DevPath = DevPathFromText->ConvertTextToDevicePath(Data);\r
+          DevPath = ConvertTextToDevicePath(Data);\r
           if (DevPath == NULL) {\r
             ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SETVAR_ERROR_DPFT), gShellDebug1HiiHandle, Status);\r
             ShellStatus = SHELL_INVALID_PARAMETER;\r