mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/3] partitions: efi: register guid device parameter for disk GUID
@ 2022-06-30 12:40 Ahmad Fatoum
  2022-06-30 12:40 ` [PATCH 2/3] commands: implement devlookup to find device behind device file Ahmad Fatoum
  2022-06-30 12:40 ` [PATCH 3/3] block: efi: allow disabling /dev/usbdiskX renaming Ahmad Fatoum
  0 siblings, 2 replies; 8+ messages in thread
From: Ahmad Fatoum @ 2022-06-30 12:40 UTC (permalink / raw)
  To: barebox; +Cc: has, Ahmad Fatoum

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>
---
 common/partitions/efi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/common/partitions/efi.c b/common/partitions/efi.c
index 848bed22610f..0f3f790539cd 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);
 
-- 
2.30.2




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-07-05  7:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-30 12:40 [PATCH 1/3] partitions: efi: register guid device parameter for disk GUID Ahmad Fatoum
2022-06-30 12:40 ` [PATCH 2/3] commands: implement devlookup to find device behind device file Ahmad Fatoum
2022-06-30 15:26   ` Michael Olbrich
2022-07-01  5:24     ` Ahmad Fatoum
2022-07-05  7:45   ` Sascha Hauer
2022-07-05  7:48     ` Ahmad Fatoum
2022-06-30 12:40 ` [PATCH 3/3] block: efi: allow disabling /dev/usbdiskX renaming Ahmad Fatoum
2022-06-30 13:26   ` [PATCH] fixup! commands: implement new devlookup command Ahmad Fatoum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox