[edk2-devel] [PATCH] OvmfPkg/GenericQemuLoadImageLib: log "Not Found" at INFO level

Laszlo Ersek posted 1 patch 3 years, 9 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/edk2 tags/patchew/20200609105414.12474-1-lersek@redhat.com
OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
[edk2-devel] [PATCH] OvmfPkg/GenericQemuLoadImageLib: log "Not Found" at INFO level
Posted by Laszlo Ersek 3 years, 9 months ago
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


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#60948): https://edk2.groups.io/g/devel/message/60948
Mute This Topic: https://groups.io/mt/74771491/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH] OvmfPkg/GenericQemuLoadImageLib: log "Not Found" at INFO level
Posted by Laszlo Ersek 3 years, 9 months ago
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


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#61019): https://edk2.groups.io/g/devel/message/61019
Mute This Topic: https://groups.io/mt/74771491/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH] OvmfPkg/GenericQemuLoadImageLib: log "Not Found" at INFO level
Posted by Philippe Mathieu-Daudé 3 years, 9 months ago
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
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#61116): https://edk2.groups.io/g/devel/message/61116
Mute This Topic: https://groups.io/mt/74771491/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH] OvmfPkg/GenericQemuLoadImageLib: log "Not Found" at INFO level
Posted by Ard Biesheuvel 3 years, 9 months ago
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;
>     }
>   
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#60949): https://edk2.groups.io/g/devel/message/60949
Mute This Topic: https://groups.io/mt/74771491/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-