X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=ShellPkg%2FLibrary%2FUefiShellLevel2CommandsLib%2FMap.c;fp=ShellPkg%2FLibrary%2FUefiShellLevel2CommandsLib%2FMap.c;h=4865d0e7a11afd3c57fd99cf6be03ee1a9003eed;hp=9e33286c90db5f16f742e922519a6661c229481c;hb=f747c71e301c7cf710d6511fbcc86a7ae6d475fa;hpb=0c41d28e598356f083c308f359d435e63a6e0ef9 diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/Map.c b/ShellPkg/Library/UefiShellLevel2CommandsLib/Map.c index 9e33286c90..4865d0e7a1 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 - 2013, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.
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 @@ -345,6 +345,7 @@ MappingListHasType( FreePool(NewSpecific); } if ( Consist + && !Specific && (SearchList(MapList, L"HD*", NULL, TRUE, TRUE, L";") ||SearchList(MapList, L"CD*", NULL, TRUE, TRUE, L";") ||SearchList(MapList, L"F*", NULL, TRUE, TRUE, L";") @@ -353,6 +354,7 @@ MappingListHasType( } if ( Normal + && !Specific && (SearchList(MapList, L"FS", NULL, FALSE, TRUE, L";") ||SearchList(MapList, L"BLK", NULL, FALSE, TRUE, L";"))){ return (TRUE); @@ -416,7 +418,11 @@ PerformSingleMappingDisplay( return EFI_NOT_FOUND; } - if (Normal) { + if (Normal || !Consist) { + // + // need the Normal here since people can use both on command line. otherwise unused. + // + // // Allocate a name // @@ -434,7 +440,7 @@ PerformSingleMappingDisplay( if (TempSpot != NULL) { *TempSpot = CHAR_NULL; } - } else if (Consist) { + } else { CurrentName = NULL; // @@ -485,16 +491,10 @@ PerformSingleMappingDisplay( Alias[StrLen(Alias)-1] = CHAR_NULL; } } - } else { - CurrentName = NULL; - CurrentName = StrnCatGrow(&CurrentName, 0, L"", 0); - if (CurrentName == NULL) { - return (EFI_OUT_OF_RESOURCES); - } } DevPathString = ConvertDevicePathToText(DevPath, TRUE, FALSE); + TempLen = StrLen(CurrentName); if (!SFO) { - TempLen = StrLen(CurrentName); ShellPrintHiiEx ( -1, -1, @@ -528,7 +528,6 @@ PerformSingleMappingDisplay( SHELL_FREE_NON_NULL(MediaType); } } else { - TempLen = StrLen(CurrentName); ShellPrintHiiEx ( -1, -1,