Reviewed-by: Jaben Carsey <[email protected]>
>-----Original Message----- >From: edk2-devel [mailto:[email protected]] On Behalf Of Eric >Dong >Sent: Sunday, August 30, 2015 11:12 PM >To: [email protected] >Cc: Ni, Ruiyu >Subject: [edk2] [Patch] ShellPkg: Replace use case of deprecated function >GetVariable with GetVariable2. >Importance: High > >Contributed-under: TianoCore Contribution Agreement 1.0 >Signed-off-by: Eric Dong <[email protected]> >Cc: Ruiyu Ni <[email protected]> >--- > 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 6a24852..28521ec 100644 >--- a/ShellPkg/Application/Shell/ShellProtocol.c >+++ b/ShellPkg/Application/Shell/ShellProtocol.c >@@ -3219,19 +3219,21 @@ EfiShellGetAlias( > CHAR16 *RetVal; > UINTN RetSize; > UINT32 Attribs; > EFI_STATUS Status; > CHAR16 *AliasLower; >+ CHAR16 *AliasVal; > > // Convert to lowercase to make aliases case-insensitive > if (Alias != NULL) { > AliasLower = AllocateCopyPool (StrSize (Alias), Alias); > ASSERT (AliasLower != NULL); > ToLower (AliasLower); > > if (Volatile == NULL) { >- return (AddBufferToFreeList(GetVariable(AliasLower, &gShellAliasGuid))); >+ GetVariable2 (AliasLower, &gShellAliasGuid, (VOID **)&AliasVal, NULL); >+ return (AddBufferToFreeList(AliasVal)); > } > RetSize = 0; > RetVal = NULL; > Status = gRT->GetVariable(AliasLower, &gShellAliasGuid, &Attribs, > &RetSize, RetVal); > if (Status == EFI_BUFFER_TOO_SMALL) { >-- >1.9.5.msysgit.1 > >_______________________________________________ >edk2-devel mailing list >[email protected] >https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

