GNOME Bugzilla – Bug 793545
gvfs is confused by PARTLABEL= entries in fstab
Last modified: 2018-02-20 08:41:35 UTC
I have these fstab entries: PARTLABEL=sd.raindows /C ntfs rw,fmask=0133,dmask=022,usermapping=/etc/usermap.raindows,x-gvfs-show,nofail 0 0 LABEL=hd.raindata /D ntfs rw,fmask=0133,dmask=022,usermapping=/etc/usermap.raindows,x-gvfs-show,nofail 0 0 I noticed that while /D is shown correctly, /C shows up as *two* separate disks (in programs such as Baobab, Nautilus, Thunar) – the second instance being an unmounted volume. It seems that find_volume_for_device() in gvfs' monitor/udisks2/gvfsudisks2volumemonitor.c only understands the LABEL= prefix but not PARTLABEL=... gvfs 1.34.2 udisks2 2.7.6
Created attachment 368576 [details] [review] udisks2: Add support for PARTLABEL and PARTUUID Currently, PARTLABEL and PARTUUID is not handled and consequently redundant GVfsUDisks2Volume is presented. Add support for them.
Created attachment 368577 [details] [review] udisks2: Fix UUID matching "device + 6" is used to skip "UUID=" prefix in the string, but it should be "device + 5" since it has only 5 chars.
Created attachment 368578 [details] [review] udisks2: Add support for PARTLABEL and PARTUUID Currently, PARTLABEL and PARTUUID is not handled and consequently redundant GVfsUDisks2Volume is presented. Add support for them.
Is there any chance that you can test the attached patches?
(In reply to Ondrej Holy from comment #2) > Created attachment 368577 [details] [review] [review] > udisks2: Fix UUID matching > > "device + 6" is used to skip "UUID=" prefix in the string, but it > should be "device + 5" since it has only 5 chars. With the patch applied, everything I've tried works. But I'm a bit confused by the fact that in many cases UUID= *still* worked even without the patch (only a single FAT32 partition didn't)...
(In reply to Ondrej Holy from comment #3) > Created attachment 368578 [details] [review] [review] > udisks2: Add support for PARTLABEL and PARTUUID > > Currently, PARTLABEL and PARTUUID is not handled and consequently redundant > GVfsUDisks2Volume is presented. Add support for them. Both PARTLABEL and PARTUUID work with this patch applied.
Thanks for testing! (In reply to Mantas Mikulėnas (grawity) from comment #5) > ... > With the patch applied, everything I've tried works. But I'm a bit confused > by the fact that in many cases UUID= *still* worked even without the patch > (only a single FAT32 partition didn't)... To be honest, I am also a little bit confused by this, but anyway "device + 6" is obviously wrong...
Comment on attachment 368577 [details] [review] udisks2: Fix UUID matching Attachment 368577 [details] pushed as 76e4121 - udisks2: Fix UUID matching
Attachment 368578 [details] pushed as 0ce3af8 - udisks2: Add support for PARTLABEL and PARTUUID