KIO::is_manually_mounted() and device UUIDs

David Faure faure at kde.org
Thu Apr 26 00:08:30 BST 2007


KIO::is_manually_mounted() greps /etc/fstab for the "noauto" option, for a given device.
But this doesn't work anymore, now that kubuntu converted /etc/fstab to use UUIDs instead of device names:

# /dev/sda7 -- converted during upgrade to edgy
UUID=2c31247e-d3a0-11da-bd28-314ffa00bcaa /home ext3 defaults 0 2

I tried using KMountPoint::currentMountPoints with KMountPoint::NeedMountOptions
but this doesn't help, because /etc/mtab keeps the mount options but not "noauto"
(since it doesn't care about it).

Any other ideas? How would I go about finding the uuid of a given device?

I know, this all sounds hackish, but this is the best way to know if we should keep a watch
(with kdirwatch) on a given directory being listed by kdirlister; manually mounted directories
(like CDROMs or USB keys) cannot be unmounted if FAM is watching a given directory (#37780).

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list