Message ID | 20221213213910.513801-2-vincent.stehle@arm.com |
---|---|
State | Accepted, archived |
Commit | c33d389c7ab5924fc7892edaf11798d644a2d824 |
Delegated to: | Heinrich Schuchardt |
Headers | show |
Series | efi: small hii conformance fix | expand |
On Tue, Dec 13, 2022 at 10:39:09PM +0100, Vincent Stehl?? wrote: > When the HII protocol function get_package_list_handle() is called with an > invalid package list handle, it returns EFI_NOT_FOUND but this is not in > its list of possible status codes as per the EFI specification. > Return EFI_INVALID_PARAMETER instead to fix conformance. Thank you for the heads-up. You're right as far as the EFI specification is concerned. FYI, EDK-II also returns EFI_NOT_FOUND if the package list handle is *valid* and yet we cannot find any matching handle in the HII database. See MdeModulePkg/Universal/HiiDatabaseDxe/Database.c -Takahiro Akashi > Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com> > Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> > Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org> > --- > lib/efi_loader/efi_hii.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/efi_loader/efi_hii.c b/lib/efi_loader/efi_hii.c > index 75ff58aafa5..27db3be6a17 100644 > --- a/lib/efi_loader/efi_hii.c > +++ b/lib/efi_loader/efi_hii.c > @@ -780,7 +780,7 @@ get_package_list_handle(const struct efi_hii_database_protocol *this, > } > } > > - return EFI_EXIT(EFI_NOT_FOUND); > + return EFI_EXIT(EFI_INVALID_PARAMETER); > } > > const struct efi_hii_database_protocol efi_hii_database = { > -- > 2.35.1 >
On 12/13/22 22:39, Vincent Stehlé wrote: > When the HII protocol function get_package_list_handle() is called with an > invalid package list handle, it returns EFI_NOT_FOUND but this is not in > its list of possible status codes as per the EFI specification. > Return EFI_INVALID_PARAMETER instead to fix conformance. > > Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com> > Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> > Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
diff --git a/lib/efi_loader/efi_hii.c b/lib/efi_loader/efi_hii.c index 75ff58aafa5..27db3be6a17 100644 --- a/lib/efi_loader/efi_hii.c +++ b/lib/efi_loader/efi_hii.c @@ -780,7 +780,7 @@ get_package_list_handle(const struct efi_hii_database_protocol *this, } } - return EFI_EXIT(EFI_NOT_FOUND); + return EFI_EXIT(EFI_INVALID_PARAMETER); } const struct efi_hii_database_protocol efi_hii_database = {
When the HII protocol function get_package_list_handle() is called with an invalid package list handle, it returns EFI_NOT_FOUND but this is not in its list of possible status codes as per the EFI specification. Return EFI_INVALID_PARAMETER instead to fix conformance. Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org> --- lib/efi_loader/efi_hii.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)