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 <chenjh@rock-chips.com>
This commit is contained in:
Joseph Chen 2019-10-21 09:02:59 +08:00 committed by Jianhong Chen
parent 3cc97df118
commit e6c4e3fbd5
1 changed files with 5 additions and 4 deletions

View File

@ -80,10 +80,11 @@ static int validate_gpt_header(gpt_header *gpt_h, lbaint_t lba,
/* Check the GPT header signature */ /* Check the GPT header signature */
if (le64_to_cpu(gpt_h->signature) != GPT_HEADER_SIGNATURE) { if (le64_to_cpu(gpt_h->signature) != GPT_HEADER_SIGNATURE) {
printf("%s signature is wrong: 0x%llX != 0x%llX\n", if (le64_to_cpu(gpt_h->signature) != 0)
"GUID Partition Table Header", printf("%s signature is wrong: 0x%llX != 0x%llX\n",
le64_to_cpu(gpt_h->signature), "GUID Partition Table Header",
GPT_HEADER_SIGNATURE); le64_to_cpu(gpt_h->signature),
GPT_HEADER_SIGNATURE);
return -1; return -1;
} }