<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-text-flowed" style="font-family: -moz-fixed;
font-size: 12px;" lang="x-unicode">Hello List,<br>
<br>
I sent this email to David Zeuthen initially - and recommended to
post my udisks2 problem here.<br>
<br>
I need to adapt my program "Guymager" (Debian package of the same
name) to udisks2. After I implemented the basic DBus
functionality, I found the following problem:
<br>
<br>
- Guymager is only interested in real drives. So, I only consider
<i class="moz-txt-slash"><span class="moz-txt-tag">/</span>org/freedesktop/UDisks2/drives<span
class="moz-txt-tag">/</span></i>... (and not <i
class="moz-txt-slash"><span class="moz-txt-tag">/</span>org/freedesktop/UDisks2/block_devices<span
class="moz-txt-tag">/</span></i>...)
<br>
<br>
- 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>
<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>
</body>
</html>