udisks2 - How to get basic functionality we had in old udisks?
.. ink ..
mhogomchungu at gmail.com
Fri Oct 30 09:02:35 PDT 2015
On Fri, Oct 30, 2015 at 12:51 AM, Guy <genlist at faert.net> wrote:
> This leaves me with a strange feeling... can I rely on udisks2?
Probably not as you are not the target audience,look at "audience"
section in the following link
for more info: http://udisks.freedesktop.org/docs/latest/udisks.8.html
You can do all of these things yourself without udisks ridding
yourself of a dependency with
an unstable API.
You can get a list of partitions from parsing "/proc/partitions".
Let say you have a partition with a node address of "/dev/sda5", you can get
the starting offset of this partition by reading "/sys/block/sda/sda5/start" and
you can get the size of the partition by reading
"/sys/block/sda/sda5/size". Both
sizes are in sectors.
you can get pretty much everything you want by pocking around at
"/sys/block/" and you can
get a list of mounted volumes by parsing "/proc/self/mountinfo".
More information about the devkit-devel
mailing list