On Tue, 2008-03-18 at 14:04 -0400, David Zeuthen wrote: > On Tue, 2008-03-18 at 12:49 -0400, Joe Marcus Clarke wrote: > > However, the other side of the problem is really a gio problem. FreeBSD > > doesn't have an mtab file, and thus Nautilus never gets updated about > > changing mounts. If I hack gio to use hal's /media/.hal-mtab file, I > > get nearly perfect results, though only hal-controlled mounts are > > updated. > > > > Alexander, would it be doable to add a timeout source or an idle source > > to gio when there is no mtab file? This way, gio can periodically poll > > for mount changes, and signal other applications. Thanks. > > Surely FreeBSD must have something that enumerates the mounted file > systems? At least the kernel knows (on Linux this is in /proc/mounts and > the format is similar to /etc/mtab). We do, but it's not a file. It's an API call, getmntinfo(). Since you can't add a monitor to this, I thought polling would be the way to go. That is, on platforms without mtab, check the list of mounts every few seconds, and fire signals if the list changes. The gio API already knows how to enumerate mounts on FreeBSD. It just needs to do this periodically to look for changes. Joe -- Joe Marcus Clarke FreeBSD GNOME Team :: gnome FreeBSD org FreeNode / #freebsd-gnome http://www.FreeBSD.org/gnome
Attachment:
signature.asc
Description: This is a digitally signed message part