[PATCH 1/2] block: partitions: efi: report the right relation for last_usable_lba

Zhan Xusheng <[email protected]>
Newsgroups org.kernel.vger.linux-block,org.kernel.vger.linux-efi,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
From: Zhan Xusheng <[email protected]>

From: Zhan Xusheng <[email protected]>

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 <[email protected]>
---
 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.