Re: [edk2] [PATCH] NetworkPkg/IScsiDxe: add debug logs for failed SetVariable attempts
Reviewed-by: Fu Siyuan > -Original Message- > From: Vijayenthiran Subramaniam [mailto:vijayenthiran.subraman...@arm.com] > Sent: Tuesday, November 20, 2018 6:40 PM > To: edk2-devel@lists.01.org; Fu, Siyuan ; Wu, Jiaxin > > Cc: Vijayenthiran Subramaniam > Subject: [PATCH] NetworkPkg/IScsiDxe: add debug logs for failed > SetVariable attempts > > 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; > } >} > -- > 2.17.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH] NetworkPkg/IScsiDxe: add debug logs for failed SetVariable attempts
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 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH] NetworkPkg/IScsiDxe: add debug logs for failed SetVariable attempts
> -Original Message- > From: edk2-devel On Behalf Of > Vijayenthiran Subramaniam > Sent: Tuesday, November 20, 2018 4:10 PM > To: edk2-devel@lists.01.org; siyuan...@intel.com; jiaxin...@intel.com > Cc: Vijayenthiran Subramaniam > Subject: [edk2] [PATCH] NetworkPkg/IScsiDxe: add debug logs for failed > SetVariable attempts > > 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; > } >} Since you are printing, same text for both failure , how will you decide which SetVariable is failed You can choose to have different text or __LINE__ should help > -- > 2.17.1 > > ___ > edk2-devel mailing list > edk2-devel@lists.01.org > https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.01 > .org%2Fmailman%2Flistinfo%2Fedk2- > develdata=02%7C01%7Cudit.kumar%40nxp.com%7C5faa1c1f546046d1f1 > a708d64ed7ff20%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C1%7C6367 > 83086961408415sdata=RZdmCRaq8x0ps9gu13YAoWf8lsGS9zH2fAdnDLbP > 3rE%3Dreserved=0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] NetworkPkg/IScsiDxe: add debug logs for failed SetVariable attempts
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; } } -- 2.17.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel