[PATCH] partitions: efi: print GPT offset in debug message
Ahmad Fatoum
ahmad at a3f.at
Sat Mar 19 00:24:27 PDT 2022
This debug message is printed for the alternative GPT header as well,
which may not exist at that location, because the medium has a different
length than what's in the GPT header. Make it easier to differentiate,
whether the message refers to the primary or alternate GPT header by
printing the LBA the header was expected at.
Signed-off-by: Ahmad Fatoum <ahmad at a3f.at>
---
common/partitions/efi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/partitions/efi.c b/common/partitions/efi.c
index 0787b93f120b..848bed22610f 100644
--- a/common/partitions/efi.c
+++ b/common/partitions/efi.c
@@ -154,8 +154,8 @@ static int is_gpt_valid(struct block_device *blk, u64 lba,
/* Check the GPT header signature */
if (le64_to_cpu((*gpt)->signature) != GPT_HEADER_SIGNATURE) {
- dev_dbg(blk->dev, "GUID Partition Table Header signature is wrong:"
- "0x%llX != 0x%llX\n",
+ dev_dbg(blk->dev, "GUID Partition Table Header signature at LBA"
+ "%llu is wrong: 0x%llX != 0x%llX\n", lba,
(unsigned long long)le64_to_cpu((*gpt)->signature),
(unsigned long long)GPT_HEADER_SIGNATURE);
goto fail;
--
2.34.1
More information about the barebox
mailing list