]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libfdisk: (dos) fix logical partitions errors handling
authorKarel Zak <kzak@redhat.com>
Mon, 2 Feb 2015 11:20:44 +0000 (12:20 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 2 Feb 2015 11:20:44 +0000 (12:20 +0100)
commiteed0e7b9bc01884140807bebe4720004d224652c
treebae8a8ab6969780f398490cb6870cb4a38b4ec0a
parentfc14ceba5e545a0e0f61e7a9fe562c79671258ef
libfdisk: (dos) fix logical partitions errors handling

The current code in add_partition() de-increment number of partitions
on error when logical partition requested and add_logical() does the
same. The result is mess in partitions array.

The another fixed issue is that add_logical() is called if all primary
partitions are already used although 'pa->start' (the template) is
explicitly defined outside the extended partition. The right behavior
is to end with error message.

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk/src/dos.c