]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libfdisk: gpt: loosen check fot pmbr size in lba
authorDavidlohr Bueso <davidlohr@hp.com>
Sun, 22 Sep 2013 03:45:16 +0000 (20:45 -0700)
committerKarel Zak <kzak@redhat.com>
Wed, 25 Sep 2013 09:13:43 +0000 (11:13 +0200)
commit1fd10841fa7ce0c14daee234450f47f139fea412
tree652131cae5457ad7ccb2ff2e53fd5429da678df9
parentac920fed6cce7ad84e25eeb8df38d8e966c52946
libfdisk: gpt: loosen check fot pmbr size in lba

While most disk partitioning tools out there create a pMBR's size in lba
to be the lesser of the whole disk or 2Tib, Microsoft apparently does not[1].
It always sets the entry to the maximum 32-bit limitation - even though a
drive may be smaller than that.

Loosen this check and only verify that the size is either the whole disk
or 0xFFFFFFFF.  No tool in its right mind would set it to any value
other than these.

[1] http://thestarman.pcministry.com/asm/mbr/GPT.htm#GPTPT

Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
libfdisk/src/gpt.c