On Monday 18 August 2008, Patrice Dumas wrote: > On Fri, Aug 15, 2008 at 03:59:23AM +0100, João Valverde wrote: > > > > I have to disagree there. You're hard coding something that can be > > provided dynamically by the kernel. I wrote some basic proof of concept > > type code and it seems to work well. It prints to stdout all the mount > > points associated with device nodes. Even as a command line tool maybe > > it could fill a legitimate need if improved. I'm attaching it in case > > anyone is interested, I hope that's OK. > > Just in case you don't know, it seems that setmntent/getmntent are not > that portable. On sun (some solaris) the structures are different with > mnt_fstype > mnt_mountp > mnt_special > mnt_mntopts > mnt_time > I guess it is what is explained in the NOTES in the getmntent(3) man > page on linux.
Yes, or see the KMountPoint code in KDE. http://websvn.kde.org/trunk/KDE/kdelibs/kio/kio/kmountpoint.cpp?view=markup About the filesystem types in the trash implementation, what did I do.... ah yes, I don't use mtab at all, I use Solid which uses HAL to get a list of device volumes (org.freedesktop.Hal.Device.Volume). Much nicer than the old way of filtering based on the filesystem type ;) -- David Faure, [EMAIL PROTECTED], sponsored by Trolltech to work on KDE, Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org). _______________________________________________ xdg mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/xdg
