diff options
| author | Joe Marcus Clarke <marcus@FreeBSD.org> | 2007-03-19 05:14:07 +0000 |
|---|---|---|
| committer | Joe Marcus Clarke <marcus@FreeBSD.org> | 2007-03-19 05:14:07 +0000 |
| commit | 951c257ea3655de6e80c26a36c18c69ee8047ea8 (patch) | |
| tree | 249b59a23d9c6fae8db5e5639385f6273d237705 /sysutils/gnome-mount/files/patch-src_gnome-mount-properties-view.c | |
| parent | - Update to 0.4 preview 1 (diff) | |
Presenting GNOME 2.18 for FreeBSD. GNOME 2.18 is a departure from recent GNOME
releases in that it focuses more on stability and functionality than on
new features. Not that it doesn't have its share of new and exciting
items. See http://www.gnome.org/start/2.18/ for all the goodies in
this release.
GNOME 2.18 for FreeBSD would not have been possible without the hard work
of the FreeBSD GNOME Team and our intrepid band of testers including
J. W. Ballantine, Pawel Worach, Yasuda Keisuke, Pascal Hofstee, miwi,
Yoshihiro Ota, Vladimir Grebenschikov, Jukka A. Ukkonen,
Phillip Neumann, Franz Klammer, and Neal Delmonico.
Diffstat (limited to 'sysutils/gnome-mount/files/patch-src_gnome-mount-properties-view.c')
| -rw-r--r-- | sysutils/gnome-mount/files/patch-src_gnome-mount-properties-view.c | 87 |
1 files changed, 79 insertions, 8 deletions
diff --git a/sysutils/gnome-mount/files/patch-src_gnome-mount-properties-view.c b/sysutils/gnome-mount/files/patch-src_gnome-mount-properties-view.c index e33d84fd3192..481e82858656 100644 --- a/sysutils/gnome-mount/files/patch-src_gnome-mount-properties-view.c +++ b/sysutils/gnome-mount/files/patch-src_gnome-mount-properties-view.c @@ -1,10 +1,81 @@ ---- src/gnome-mount-properties-view.c.orig Sun Dec 3 02:24:16 2006 -+++ src/gnome-mount-properties-view.c Sun Dec 3 02:25:20 2006 -@@ -30,6 +30,7 @@ - #include <glib/gi18n.h> - #include <gtk/gtk.h> - #include <glade/glade.h> -+#include <libgnomevfs/gnome-vfs-utils.h> - #include <time.h> +--- src/gnome-mount-properties-view.c.orig Mon Aug 14 00:17:22 2006 ++++ src/gnome-mount-properties-view.c Sun Dec 3 02:38:08 2006 +@@ -34,6 +34,7 @@ #include <sys/time.h> #include <string.h> + #include <gconf/gconf-client.h> ++#include <libgnomevfs/gnome-vfs-utils.h> + + #ifdef __FreeBSD__ + #include <fstab.h> +@@ -59,6 +60,35 @@ struct _GnomeMountPropertiesViewClass { + GtkVBoxClass base_class; + }; + ++#ifdef __FreeBSD__ ++static struct opt { ++ int o_opt; ++ const char *o_name; ++} optnames[] = { ++ { MNT_ASYNC, "asynchronous" }, ++ { MNT_EXPORTED, "NFS exported" }, ++ { MNT_LOCAL, "local" }, ++ { MNT_NOATIME, "noatime" }, ++ { MNT_NOEXEC, "noexec" }, ++ { MNT_NOSUID, "nosuid" }, ++ { MNT_NOSYMFOLLOW, "nosymfollow" }, ++ { MNT_QUOTA, "with quotas" }, ++ { MNT_RDONLY, "read-only" }, ++ { MNT_SYNCHRONOUS, "synchronous" }, ++ { MNT_UNION, "union" }, ++ { MNT_NOCLUSTERR, "noclusterr" }, ++ { MNT_NOCLUSTERW, "noclusterw" }, ++ { MNT_SUIDDIR, "suiddir" }, ++ { MNT_SOFTDEP, "soft-updates" }, ++ { MNT_MULTILABEL, "multilabel" }, ++ { MNT_ACLS, "acls" }, ++#ifdef MNT_GJOURNAL ++ { MNT_GJOURNAL, "gjournal" }, ++#endif ++ { 0, NULL } ++}; ++#endif ++ + G_DEFINE_TYPE (GnomeMountPropertiesView, gm_properties_view, GTK_TYPE_VBOX) + + static void +@@ -445,13 +475,29 @@ static gboolean + mtab_next (gpointer handle, char **device_file, char **mount_options, char **mount_fstype) + { + #ifdef __FreeBSD__ +-#error FIXME TODO XXX fix this up for FreeBSD. Thanks. + struct mtab_handle *mtab = handle; + +- if (mtab->iter < mtab->n_mounts) +- return mtab->mounts[mtab->iter++].f_mntfromname; +- else +- return NULL; ++ if (mtab->iter < mtab->n_mounts) { ++ struct opt *o; ++ int flags; ++ GString *optstr; ++ ++ optstr = g_string_new(""); ++ flags = mtab->mounts[mtab->iter].f_flags & MNT_VISFLAGMASK; ++ ++ for (o = optnames; flags && o->o_opt; o++) { ++ if (flags & o->o_opt) { ++ g_string_append_printf(optstr, ", %s", o->o_name); ++ flags &= ~o->o_opt; ++ } ++ } ++ *device_file = mtab->mounts[mtab->iter].f_mntfromname; ++ *mount_options = g_string_free(optstr, FALSE); ++ *mount_fstype = mtab->mounts[mtab->iter++].f_fstypename; ++ return TRUE; ++ } else { ++ return FALSE; ++ } + #else + struct mntent *mnt; + |
