diff options
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2023-11-18 12:40:32 +0100 |
---|---|---|
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2023-11-20 19:06:22 +0100 |
commit | 64658007f3c61e32bf241f3048a23b1728774d57 (patch) | |
tree | 7da5c6ed1f5986e20073ec4183480110d36933c6 /cmd/eficonfig.c | |
parent | ce68a254483817f86f92ffef7c7bc44fee318fb5 (diff) |
cmd: eficonfig: create shortened boot options
The boot options created by eficonfig should use shortened device-paths to
avoid problems if drives are enumerated in a different sequence.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'cmd/eficonfig.c')
-rw-r--r-- | cmd/eficonfig.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd/eficonfig.c b/cmd/eficonfig.c index e6e8a0a488..34a59cb15d 100644 --- a/cmd/eficonfig.c +++ b/cmd/eficonfig.c @@ -528,7 +528,10 @@ struct efi_device_path *eficonfig_create_device_path(struct efi_device_path *dp_ p += fp_size; *((struct efi_device_path *)p) = END; - dp = efi_dp_append(dp_volume, (struct efi_device_path *)buf); + dp = efi_dp_shorten(dp_volume); + if (!dp) + dp = dp_volume; + dp = efi_dp_append(dp, &fp->dp); free(buf); return dp; |