Comment 6 for bug 536670

Revision history for this message
In , Zeuthen (zeuthen) wrote :

(In reply to comment #5)
> Got to stop for today. Ideas for tomorrow:
>
> - It's implausible to have a partition start at offset 0 (since that's where
> the MBR is)
> - TODO: check if partition type 0 is allowed
> - TODO: current blkid can tell them apart just fine, check its logic (since
> eventually udisks-part-id will go away, and we'll use blkid for partition
> probing)
>

Right. Might be worth looking at the kernel partition table probing code too (it's in fs/partitions/msdos.c).

Note that partition type 0 and/or offset 0 and/or size 0 normally means "partition slot not used". For example, it's perfectly valid to have only two partitions in slots 1 and 3 - and the kernel represents such a device as /dev/sda for the whole disk and /dev/sda1 and /dev/sda3 for the two partitions.