<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hey,<br>
<br>
<div class="moz-cite-prefix">Guy wrote on 10/28/2015 10:32 PM:<br>
</div>
<blockquote cite="mid:56313EFC.1050602@faert.net" type="cite">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<div class="moz-text-flowed" style="font-family: -moz-fixed;
font-size: 12px;" lang="x-unicode">- Guymager needs to find out
the Linux device name for each drive. That would be /dev/sda,
for example. <br>
<br>
- 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. <br>
<br>
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, ... <br>
</div>
</blockquote>
<br>
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.<br>
<br>
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?).<br>
<br>
I'm not sure this covers all cases, but at least these are the
properties that I'm currently using in udiskie.<br>
<br>
<blockquote cite="mid:56313EFC.1050602@faert.net" type="cite">
<div class="moz-text-flowed" style="font-family: -moz-fixed;
font-size: 12px;" lang="x-unicode"> <br>
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 <i
class="moz-txt-slash"><span class="moz-txt-tag">/</span>org/freedesktop/UDisks2/drives<span
class="moz-txt-tag">/</span></i>... <br>
<br>
What do you think? <br>
<br>
Thank you in advance! <br>
<br>
Guy Voncken<br>
<br>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
devkit-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:devkit-devel@lists.freedesktop.org">devkit-devel@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freedesktop.org/mailman/listinfo/devkit-devel">http://lists.freedesktop.org/mailman/listinfo/devkit-devel</a>
</pre>
</blockquote>
<br>
</body>
</html>