From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.132.183.28; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org 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 03AFA21B02822 for ; Tue, 20 Nov 2018 03:14:44 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B9F424E936; Tue, 20 Nov 2018 11:14:43 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-171.rdu2.redhat.com [10.10.120.171]) by smtp.corp.redhat.com (Postfix) with ESMTP id A846E5C57B; Tue, 20 Nov 2018 11:14:42 +0000 (UTC) To: Vijayenthiran Subramaniam , edk2-devel@lists.01.org, siyuan.fu@intel.com, jiaxin.wu@intel.com References: <20181120103954.18938-1-vijayenthiran.subramaniam@arm.com> From: Laszlo Ersek Message-ID: <92bc4ea3-de3f-0452-d43e-d25a9d5e42ef@redhat.com> Date: Tue, 20 Nov 2018 12:14:41 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20181120103954.18938-1-vijayenthiran.subramaniam@arm.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 20 Nov 2018 11:14:43 +0000 (UTC) Subject: Re: [PATCH] NetworkPkg/IScsiDxe: add debug logs for failed SetVariable attempts X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Nov 2018 11:14:45 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 11/20/18 11:39, Vijayenthiran Subramaniam wrote: > Add debug messages for failed attempts to write to a variable. > > Cc: Siyuan Fu > Cc: Jiaxin Wu > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Vijayenthiran Subramaniam > --- > NetworkPkg/IScsiDxe/IScsiMisc.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/NetworkPkg/IScsiDxe/IScsiMisc.c b/NetworkPkg/IScsiDxe/IScsiMisc.c > index dd0d32dcda16..46760d79a8f3 100644 > --- a/NetworkPkg/IScsiDxe/IScsiMisc.c > +++ b/NetworkPkg/IScsiDxe/IScsiMisc.c > @@ -845,6 +845,8 @@ IScsiCreateAttempts ( > ); > FreePool (AttemptConfigOrder); > if (EFI_ERROR (Status)) { > + DEBUG ((DEBUG_ERROR, "%a: SetVariable failed with return: %r\n", > + __FUNCTION__, Status)); > return Status; > } > > @@ -887,6 +889,8 @@ IScsiCreateAttempts ( > ); > FreePool (AttemptConfigData); > if (EFI_ERROR (Status)) { > + DEBUG ((DEBUG_ERROR, "%a: SetVariable failed with return: %r\n", > + __FUNCTION__, Status)); > return Status; > } > } > I'll let Siyuan and Jiaxin decide whether these log messages should be added or not. However, if we do add them, then we should distinguish them better. Right now they look the same. I suggest logging the variable namespace (or "vendor") GUID and the variable name as well. Thanks Laszlo