public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] OvmfPkg/GenericQemuLoadImageLib: log "Not Found" at INFO level
@ 2020-06-09 10:54 Laszlo Ersek
  2020-06-09 10:58 ` [edk2-devel] " Ard Biesheuvel
  2020-06-10  8:00 ` Laszlo Ersek
  0 siblings, 2 replies; 4+ messages in thread
From: Laszlo Ersek @ 2020-06-09 10:54 UTC (permalink / raw)
  To: edk2-devel-groups-io
  Cc: Ard Biesheuvel, Jordan Justen, Philippe Mathieu-Daudé

gBS->LoadImage() returning EFI_NOT_FOUND is an expected condition; it
means that QEMU wasn't started with "-kernel". Log this status code as
INFO rather than ERROR.

Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---

Notes:
    Repo:   https://pagure.io/lersek/edk2.git
    Branch: gqlil_not_found

 OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.c b/OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.c
index 14c8417d43e7..114db7e8441f 100644
--- a/OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.c
+++ b/OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.c
@@ -106,7 +106,8 @@ QemuLoadKernelImage (
     goto UnloadImage;
 
   default:
-    DEBUG ((DEBUG_ERROR, "%a: LoadImage(): %r\n", __FUNCTION__, Status));
+    DEBUG ((Status == EFI_NOT_FOUND ? DEBUG_INFO : DEBUG_ERROR,
+      "%a: LoadImage(): %r\n", __FUNCTION__, Status));
     return Status;
   }
 
-- 
2.19.1.3.g30247aa5d201


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [edk2-devel] [PATCH] OvmfPkg/GenericQemuLoadImageLib: log "Not Found" at INFO level
  2020-06-09 10:54 [PATCH] OvmfPkg/GenericQemuLoadImageLib: log "Not Found" at INFO level Laszlo Ersek
@ 2020-06-09 10:58 ` Ard Biesheuvel
  2020-06-10  8:00 ` Laszlo Ersek
  1 sibling, 0 replies; 4+ messages in thread
From: Ard Biesheuvel @ 2020-06-09 10:58 UTC (permalink / raw)
  To: devel, lersek; +Cc: Jordan Justen, Philippe Mathieu-Daudé

On 6/9/20 12:54 PM, Laszlo Ersek via groups.io wrote:
> gBS->LoadImage() returning EFI_NOT_FOUND is an expected condition; it
> means that QEMU wasn't started with "-kernel". Log this status code as
> INFO rather than ERROR.
> 
> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>

Acked-by: Ard Biesheuvel <ard.biesheuvel@arm.com>

> ---
> 
> Notes:
>      Repo:   https://pagure.io/lersek/edk2.git
>      Branch: gqlil_not_found
> 
>   OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.c b/OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.c
> index 14c8417d43e7..114db7e8441f 100644
> --- a/OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.c
> +++ b/OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.c
> @@ -106,7 +106,8 @@ QemuLoadKernelImage (
>       goto UnloadImage;
>   
>     default:
> -    DEBUG ((DEBUG_ERROR, "%a: LoadImage(): %r\n", __FUNCTION__, Status));
> +    DEBUG ((Status == EFI_NOT_FOUND ? DEBUG_INFO : DEBUG_ERROR,
> +      "%a: LoadImage(): %r\n", __FUNCTION__, Status));
>       return Status;
>     }
>   
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [edk2-devel] [PATCH] OvmfPkg/GenericQemuLoadImageLib: log "Not Found" at INFO level
  2020-06-09 10:54 [PATCH] OvmfPkg/GenericQemuLoadImageLib: log "Not Found" at INFO level Laszlo Ersek
  2020-06-09 10:58 ` [edk2-devel] " Ard Biesheuvel
@ 2020-06-10  8:00 ` Laszlo Ersek
  2020-06-11  7:25   ` Philippe Mathieu-Daudé
  1 sibling, 1 reply; 4+ messages in thread
From: Laszlo Ersek @ 2020-06-10  8:00 UTC (permalink / raw)
  To: edk2-devel-groups-io
  Cc: Ard Biesheuvel, Jordan Justen, Philippe Mathieu-Daudé

On 06/09/20 12:54, Laszlo Ersek wrote:
> gBS->LoadImage() returning EFI_NOT_FOUND is an expected condition; it
> means that QEMU wasn't started with "-kernel". Log this status code as
> INFO rather than ERROR.
> 
> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> ---
> 
> Notes:
>     Repo:   https://pagure.io/lersek/edk2.git
>     Branch: gqlil_not_found
> 
>  OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.c b/OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.c
> index 14c8417d43e7..114db7e8441f 100644
> --- a/OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.c
> +++ b/OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.c
> @@ -106,7 +106,8 @@ QemuLoadKernelImage (
>      goto UnloadImage;
>  
>    default:
> -    DEBUG ((DEBUG_ERROR, "%a: LoadImage(): %r\n", __FUNCTION__, Status));
> +    DEBUG ((Status == EFI_NOT_FOUND ? DEBUG_INFO : DEBUG_ERROR,
> +      "%a: LoadImage(): %r\n", __FUNCTION__, Status));
>      return Status;
>    }
>  
> 

Merged as commit 14c7ed8b51f6 via
<https://github.com/tianocore/edk2/pull/678>.

Thanks
Laszlo


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [edk2-devel] [PATCH] OvmfPkg/GenericQemuLoadImageLib: log "Not Found" at INFO level
  2020-06-10  8:00 ` Laszlo Ersek
@ 2020-06-11  7:25   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-11  7:25 UTC (permalink / raw)
  To: devel, lersek; +Cc: Ard Biesheuvel, Jordan Justen

On 6/10/20 10:00 AM, Laszlo Ersek wrote:
> On 06/09/20 12:54, Laszlo Ersek wrote:
>> gBS->LoadImage() returning EFI_NOT_FOUND is an expected condition; it
>> means that QEMU wasn't started with "-kernel". Log this status code as
>> INFO rather than ERROR.
>>
>> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
>> Cc: Jordan Justen <jordan.l.justen@intel.com>
>> Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
>> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
>> ---
>>
>> Notes:
>>     Repo:   https://pagure.io/lersek/edk2.git
>>     Branch: gqlil_not_found
>>
>>  OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.c b/OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.c
>> index 14c8417d43e7..114db7e8441f 100644
>> --- a/OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.c
>> +++ b/OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.c
>> @@ -106,7 +106,8 @@ QemuLoadKernelImage (
>>      goto UnloadImage;
>>  
>>    default:
>> -    DEBUG ((DEBUG_ERROR, "%a: LoadImage(): %r\n", __FUNCTION__, Status));
>> +    DEBUG ((Status == EFI_NOT_FOUND ? DEBUG_INFO : DEBUG_ERROR,
>> +      "%a: LoadImage(): %r\n", __FUNCTION__, Status));
>>      return Status;
>>    }
>>  
>>
> 
> Merged as commit 14c7ed8b51f6 via
> <https://github.com/tianocore/edk2/pull/678>.

Sorry for being too late here, thanks Ard for the review.

> 
> Thanks
> Laszlo
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-06-11  7:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-09 10:54 [PATCH] OvmfPkg/GenericQemuLoadImageLib: log "Not Found" at INFO level Laszlo Ersek
2020-06-09 10:58 ` [edk2-devel] " Ard Biesheuvel
2020-06-10  8:00 ` Laszlo Ersek
2020-06-11  7:25   ` Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox