From e6c4e3fbd5d0c84c50276be074561d2774021642 Mon Sep 17 00:00:00 2001 From: Joseph Chen Date: Mon, 21 Oct 2019 09:02:59 +0800 Subject: [PATCH] disk: efi: ignore error message when signature is 0 Since the patch "3bdef7e gpt: return 1 directly when test the mbr sector" always treats partition type as GPT, the error message is always printed which may make developers miss understand. Change-Id: I8be6cf5027ff4b61549b83132492d41d2b352ecd Signed-off-by: Joseph Chen --- disk/part_efi.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/disk/part_efi.c b/disk/part_efi.c index dfbef58555..b7b0349f2c 100644 --- a/disk/part_efi.c +++ b/disk/part_efi.c @@ -80,10 +80,11 @@ static int validate_gpt_header(gpt_header *gpt_h, lbaint_t lba, /* Check the GPT header signature */ if (le64_to_cpu(gpt_h->signature) != GPT_HEADER_SIGNATURE) { - printf("%s signature is wrong: 0x%llX != 0x%llX\n", - "GUID Partition Table Header", - le64_to_cpu(gpt_h->signature), - GPT_HEADER_SIGNATURE); + if (le64_to_cpu(gpt_h->signature) != 0) + printf("%s signature is wrong: 0x%llX != 0x%llX\n", + "GUID Partition Table Header", + le64_to_cpu(gpt_h->signature), + GPT_HEADER_SIGNATURE); return -1; }