[PATCH 1/2] block: partitions: efi: report the right relation for last_usable_lba
From: Zhan Xusheng
Date: Fri Aug 21 2026 - 03:24:21 EST
From: Zhan Xusheng <zhanxusheng1024@xxxxxxxxx>
From: Zhan Xusheng <zhanxusheng@xxxxxxxxxx>
The check rejects a header whose last_usable_lba is below its
first_usable_lba, but the message prints the two with ">" between them,
carried over from the preceding test against lastlba.
Signed-off-by: Zhan Xusheng <zhanxusheng@xxxxxxxxxx>
---
block/partitions/efi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/partitions/efi.c b/block/partitions/efi.c
index 9865d59093fa..76994d3edd1a 100644
--- a/block/partitions/efi.c
+++ b/block/partitions/efi.c
@@ -406,7 +406,7 @@ static int is_gpt_valid(struct parsed_partitions *state, u64 lba,
goto fail;
}
if (le64_to_cpu((*gpt)->last_usable_lba) < le64_to_cpu((*gpt)->first_usable_lba)) {
- pr_debug("GPT: last_usable_lba incorrect: %lld > %lld\n",
+ pr_debug("GPT: last_usable_lba incorrect: %lld < %lld\n",
(unsigned long long)le64_to_cpu((*gpt)->last_usable_lba),
(unsigned long long)le64_to_cpu((*gpt)->first_usable_lba));
goto fail;
--
2.43.0