efi_loader: discover if no efi_system_partition is set
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 21 Oct 2022 06:33:44 +0000 (08:33 +0200)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sun, 6 Nov 2022 09:50:04 +0000 (10:50 +0100)
commit2b55ad304d61d697fadb6cdfd098e8712d5a639e
tree27c720b7139204138fe9b952f1ef0e62ddae587a
parent023d9c93932cd0106fb921290c6128705343a6da
efi_loader: discover if no efi_system_partition is set

Variable efi_system_partition holds the efi_system_partition. Currently it
is initialized as:

    {
      .uclass_id = 0 = UCLASS_ROOT,
      .denum = 0,
      .part = 0,
    }

This indicates that host 0:0 is the efi_system_partition and we see output
like:

    => bootefi hello
    ** Bad device specification host 0 **
    Couldn't find partition host 0:0

To identify that no EFI system partition has been set use UCLASS_INVALID.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
lib/efi_loader/efi_disk.c