[Qt-interest] mounted device info

Ioan Calin Borcoman iborco at gmail.com
Sun May 2 07:39:19 CEST 2010


Hi,

I am looking for a way to determine:
* list of mounted devices
* their path (ex: /dev/sdc)
* mount point (ex: /media/cdrom0)
* type of device (ex: CD-ROM, DVD-R, DVD+R, DVD-ROM, HDD, etc)
* type of the filesystem (ex: ext3, iso9660, udf, ...)
* labels of the filesystems (ex: MYDVD, HOME, VAR, BACKUP, ...)

Currently I am using a combination of:
* /proc/mounts to get the mounted devices
* GIO from GTK+ (GVolumeMonitor) to get the labels and device types of
removable media
* /etc/blkid.tab for the labels of hdds

Is there a more native way (QT or DBUS) to do this?

Thanx,

Ionutz



More information about the Qt-interest-old mailing list