OSDN Git Service
libparted: enforce dos partition limit
The msdos partition table claimed a maximum partition count of 16
but would allow you to go beyond that. This resulted in the kernel
not being informed of those partitions. Corrected to enforce the
limit.
* NEWS (Bug fixes): Mention it.
* libparted/labels/dos.c (next_primary): Return -1 upon failure.
(next_logical): Stop no later than MAX_TOTAL_PART.
Throw exception and return -1 upon failure.
(msdos_partition_enumerate): Convert a negative partition number
return value from either of the above two to failure (return 0).
* tests/t9042-dos-partition-limit.sh: New file.
* tests/Makefile.am (TESTS): Add it.