diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2022-06-30 14:40:33 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-07-05 09:40:22 +0200 |
commit | 75fd6522fbf3095ea5dae2bc54bbd44187ff134a (patch) | |
tree | 751f0340998af3433be3e546e9bbcc29957bd4d9 /common | |
parent | 056275f60abd2100a5c75bebee5790d35e2f9807 (diff) | |
download | barebox-75fd6522fbf3095ea5dae2bc54bbd44187ff134a.tar.gz barebox-75fd6522fbf3095ea5dae2bc54bbd44187ff134a.tar.xz |
partitions: efi: register guid device parameter for disk GUID
We already register an nt_signature parameter for MBR partitions.
Register an equivalent guid parameter for GPT partitions as well.
This is less critical because disk GUID isn't used for root=
Linux boot argument computation, as each partition has its own
PARTUUID. It's still useful to allow shell scripts to check
against it to detect e.g. a factory flash image.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20220630124035.4019644-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r-- | common/partitions/efi.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/common/partitions/efi.c b/common/partitions/efi.c index 848bed2261..0f3f790539 100644 --- a/common/partitions/efi.c +++ b/common/partitions/efi.c @@ -446,6 +446,7 @@ static void efi_partition(void *buf, struct block_device *blk, } snprintf(blk->cdev.uuid, sizeof(blk->cdev.uuid), "%pUl", &gpt->disk_guid); + dev_add_param_string_fixed(blk->dev, "guid", blk->cdev.uuid); nb_part = le32_to_cpu(gpt->num_partition_entries); |