Comment 3 for bug 536670

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

(In reply to comment #2)
> Interesting, it only seems to happen for VFAT, not for any other file system.
>
> It seems likely that the bug is actually in libparted:

Nitpick: We don't use libparted code at all for detection - the code in question is in src/helpers/partutil.c

> $ sudo /lib/udev/udisks-part-id /dev/sdb
> device=0xe56e00' for
> devpath=/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-8/1-8.2/1-8.2:1.0/host13/target13:0:0/13:0:0:0/block/sdb
> Expected `linear' in UDISKS_DM_TARGETS_TYPE=`(null)'
> using device_file=/dev/sdb
> syspath=/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-8/1-8.2/1-8.2:1.0/host13/target13:0:0/13:0:0:0/block/sdb,
> offset=0 ao=0 and number=0 for /dev/sdb
> Entering MS-DOS parser (offset=0, size=1028653056)
> MSDOS_MAGIC found
> looking at part 0 (offset 0, size 0, type 0x00)
> new part entry
> looking at part 1 (offset 0, size 0, type 0x00)
> new part entry
> looking at part 2 (offset 0, size 0, type 0x00)
> new part entry
> looking at part 3 (offset 0, size 0, type 0x00)
> new part entry
> Exiting MS-DOS parser
> MSDOS partition table detected
> UDISKS_PARTITION_TABLE=1
> UDISKS_PARTITION_TABLE_SCHEME=mbr
> UDISKS_PARTITION_TABLE_COUNT=0

The (known) problem is that VFAT on the main block device looks a lot like a Master Boot Record partition table. We need to fix the MBR probing code.