From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 0898321E43B6E for ; Fri, 22 Sep 2017 02:39:59 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4C7F81F56A; Fri, 22 Sep 2017 09:43:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4C7F81F56A Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=lersek@redhat.com Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-219.rdu2.redhat.com [10.10.120.219]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1A29F60BEC; Fri, 22 Sep 2017 09:43:04 +0000 (UTC) To: Ruiyu Ni , edk2-devel@lists.01.org Cc: Jaben Carsey , Huajing Li References: <20170918064227.295020-1-ruiyu.ni@intel.com> From: Laszlo Ersek Message-ID: Date: Fri, 22 Sep 2017 11:43:04 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20170918064227.295020-1-ruiyu.ni@intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 22 Sep 2017 09:43:06 +0000 (UTC) Subject: Re: [PATCH] ShellPkg/dmpstore: Show name of known variable vendor GUID X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 09:39:59 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Hi, this patch breaks the GCC48 build: On 09/18/17 08:42, Ruiyu Ni wrote: > From: Huajing Li > > Change "dmpstore" to show name of known variable vendor GUID. > The name is got from ShellProtocol.GetGuidName(). > > Cc: Jaben Carsey > Reviewed-by: Ruiyu Ni > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Huajing Li > --- > ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c | 17 +++++++++++++---- > .../UefiShellDebug1CommandsLib.uni | 1 + > 2 files changed, 14 insertions(+), 4 deletions(-) > > diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c > index aeffc89b19..062ab5dc3a 100644 > --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c > +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c > @@ -424,6 +424,7 @@ CascadeProcessVariables ( > CHAR16 *AttrString; > CHAR16 *HexString; > EFI_STATUS SetStatus; > + CHAR16 *GuidName; > > if (ShellGetExecutionBreakFlag()) { > return (SHELL_ABORTED); > @@ -521,10 +522,18 @@ CascadeProcessVariables ( > Status = EFI_OUT_OF_RESOURCES; > } > } else { > - ShellPrintHiiEx ( > - -1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_HEADER_LINE), gShellDebug1HiiHandle, > - AttrString, &FoundVarGuid, FoundVarName, DataSize > - ); > + Status = gEfiShellProtocol->GetGuidName(&FoundVarGuid, &GuidName); ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c:525:66: error: passing argument 2 of 'gEfiShellProtocol->GetGuidName' from incompatible pointer type [-Werror=incompatible-pointer-types] Status = gEfiShellProtocol->GetGuidName(&FoundVarGuid, &GuidName); ^ ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c:525:66: note: expected 'const CHAR16 ** {aka const short unsigned int **}' but argument is of type 'CHAR16 ** {aka short unsigned int **}' It was reported by Gerd's Jenkins CI. Thanks Laszlo > + if (EFI_ERROR (Status)) { > + ShellPrintHiiEx ( > + -1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_HEADER_LINE), gShellDebug1HiiHandle, > + AttrString, &FoundVarGuid, FoundVarName, DataSize > + ); > + } else { > + ShellPrintHiiEx ( > + -1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_HEADER_LINE2), gShellDebug1HiiHandle, > + AttrString, GuidName, FoundVarName, DataSize > + ); > + } > DumpHex (2, 0, DataSize, DataBuffer); > } > SHELL_FREE_NON_NULL (AttrString); > diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni > index f733a67f0b..b6a133a454 100644 > --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni > +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni > @@ -385,6 +385,7 @@ > #string STR_DMPSTORE_LOAD_GEN_FAIL #language en-US "%H%s%N: Failed to set variable %H%s%N: %r.\r\n" > #string STR_DMPSTORE_LOAD_BAD_FILE #language en-US "%H%s%N: Incorrect file format.\r\n" > #string STR_DMPSTORE_HEADER_LINE #language en-US "Variable %H%s%N '%H%g%N:%H%s%N' DataSize = 0x%02x\r\n" > +#string STR_DMPSTORE_HEADER_LINE2 #language en-US "Variable %H%s%N '%H%s%N:%H%s%N' DataSize = 0x%02x\r\n" > #string STR_DMPSTORE_DELETE_LINE #language en-US "Delete variable '%H%g%N:%H%s%N': %r\r\n" > #string STR_DMPSTORE_NO_VAR_FOUND #language en-US "%H%s%N: No matching variables found.\r\n" > #string STR_DMPSTORE_NO_VAR_FOUND_SFO #language en-US "VariableInfo,\"\",\"\",\"\",\"\",\"\"\r\n" >