OSDN Git Service

gpt: header validity: also consider whether a PE array crc matches
authorJim Meyering <meyering@redhat.com>
Fri, 23 Oct 2009 14:32:20 +0000 (16:32 +0200)
committerJim Meyering <meyering@redhat.com>
Fri, 23 Oct 2009 16:09:42 +0000 (18:09 +0200)
commit1cb1f190f9b3a52e628087957db79645a7d8e7e9
treec475ec5d6045265a0a29e973b29933f43d5c911c
parent69efb50c5b5a0e6aa2f7ead6383c2cbaaae38812
gpt: header validity: also consider whether a PE array crc matches

* libparted/labels/gpt.c (check_PE_array_CRC): New function.
(_header_is_valid): Use it to verify that partition entry array
checksums match, too.
Karel Zak noticed that this check was not being performed.
* tests/t0280-gpt-corrupt.sh: Adapt to changed diagnostic.
libparted/labels/gpt.c
tests/t0280-gpt-corrupt.sh