Hey, Guy wrote on 10/28/2015 10:32 PM: > - Guymager needs to find out the Linux device name for each drive. > That would be /dev/sda, for example. > > - Now comes my problem: How can I find out, which Linux device name > belongs to which drive? For doing so, I would have to look at the > block_devices, property "Device" in interface > org.freedesktop.UDisks2.Block. > > However, the only matching criteria I see is the "Drive" property, but > there are many block_devices with that property: /dev/sda, /dev/sda1, > /dev/sda2, ...
I'd look for partitions that are not "child" partitions, i.e. the devices that do not export the Partition interface or have Partition.Table is set to "/" and Partition.IsContained set to false. Furthermore, Block.CryptoBackingDevice should be "/", but from my experience you don't have to worry about that, since UDisks doesn't set the Block.Drive for unlocked devices (although that might be subject to change or even just a bug?). I'm not sure this covers all cases, but at least these are the properties that I'm currently using in udiskie. > > How do I choose the right one? Guymager could maybe take the one with > the shortest name, but I'm not sure if that really is safe in each and > every situation and every Linux system. What misses in my eyes is a > property named "Device" (in the interface > org.freedesktop.UDisks2.Drive) for the drives under > /org/freedesktop/UDisks2/drives/... > > What do you think? > > Thank you in advance! > > Guy Voncken > > > > > _______________________________________________ > devkit-devel mailing list > devkit-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/devkit-devel
signature.asc
Description: OpenPGP digital signature
_______________________________________________ devkit-devel mailing list devkit-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/devkit-devel