From 1f90b7bf9346cfb1bd1a1a2c6d355106af53e090 Mon Sep 17 00:00:00 2001 From: Eric Dong Date: Tue, 1 Sep 2015 05:21:48 +0000 Subject: ShellPkg: Replace use case of deprecated function GetVariable with GetVariable2. (Sync patch r18368 from main trunk.) Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong Reviewed-by: Jaben Carsey git-svn-id: https://svn.code.sf.net/p/edk2/code/branches/UDK2015@18371 6f19259b-4bc3-4df7-8a09-765794883524 --- ShellPkg/Application/Shell/ShellProtocol.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ShellPkg/Application/Shell/ShellProtocol.c b/ShellPkg/Application/Shell/ShellProtocol.c index 6a248522b5..28521ecc15 100644 --- a/ShellPkg/Application/Shell/ShellProtocol.c +++ b/ShellPkg/Application/Shell/ShellProtocol.c @@ -3221,6 +3221,7 @@ EfiShellGetAlias( UINT32 Attribs; EFI_STATUS Status; CHAR16 *AliasLower; + CHAR16 *AliasVal; // Convert to lowercase to make aliases case-insensitive if (Alias != NULL) { @@ -3229,7 +3230,8 @@ EfiShellGetAlias( ToLower (AliasLower); if (Volatile == NULL) { - return (AddBufferToFreeList(GetVariable(AliasLower, &gShellAliasGuid))); + GetVariable2 (AliasLower, &gShellAliasGuid, (VOID **)&AliasVal, NULL); + return (AddBufferToFreeList(AliasVal)); } RetSize = 0; RetVal = NULL; -- cgit v1.2.3