summaryrefslogtreecommitdiffstats
path: root/sysutils/gnome-mount/files
diff options
context:
space:
mode:
authorahze <ahze@df743ca5-7f9a-e211-a948-0013205c9059>2006-09-05 09:59:35 +0800
committerahze <ahze@df743ca5-7f9a-e211-a948-0013205c9059>2006-09-05 09:59:35 +0800
commite20b94a0f3fcbcaa9a60a78a5de60475e7777d53 (patch)
treea9e00484c2bdd961e089b336c291ed8c6fb479c7 /sysutils/gnome-mount/files
parent70151d642f80ff5672e1e224a1d5411ee1046919 (diff)
downloadmarcuscom-ports-e20b94a0f3fcbcaa9a60a78a5de60475e7777d53.tar
marcuscom-ports-e20b94a0f3fcbcaa9a60a78a5de60475e7777d53.tar.gz
marcuscom-ports-e20b94a0f3fcbcaa9a60a78a5de60475e7777d53.tar.bz2
marcuscom-ports-e20b94a0f3fcbcaa9a60a78a5de60475e7777d53.tar.lz
marcuscom-ports-e20b94a0f3fcbcaa9a60a78a5de60475e7777d53.tar.xz
marcuscom-ports-e20b94a0f3fcbcaa9a60a78a5de60475e7777d53.tar.zst
marcuscom-ports-e20b94a0f3fcbcaa9a60a78a5de60475e7777d53.zip
- Update to 0.4
mntent.h obtained from devel/fam git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@7243 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'sysutils/gnome-mount/files')
-rw-r--r--sysutils/gnome-mount/files/mntent.h56
-rw-r--r--sysutils/gnome-mount/files/patch-src_gnome-mount.c37
2 files changed, 80 insertions, 13 deletions
diff --git a/sysutils/gnome-mount/files/mntent.h b/sysutils/gnome-mount/files/mntent.h
new file mode 100644
index 000000000..078b246cd
--- /dev/null
+++ b/sysutils/gnome-mount/files/mntent.h
@@ -0,0 +1,56 @@
+/*
+ * mntent
+ * mntent.h - compatability header for FreeBSD
+ *
+ * Copyright (c) 2001 David Rufino <daverufino@btinternet.com>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(HAVE_MNTENT_H)
+#include <mntent.h>
+#else
+#ifndef _MNTENT_H
+#define _MNTENT_H
+#include <stdio.h>
+
+#define MOUNTED "dummy"
+
+#define MNTTYPE_NFS "nfs"
+
+struct mntent {
+ char *mnt_fsname;
+ char *mnt_dir;
+ char *mnt_type;
+ char *mnt_opts;
+ int mnt_freq;
+ int mnt_passno;
+};
+
+#define setmntent(x,y) ((FILE *)0x1)
+struct mntent *getmntent __P ((FILE *fp));
+char *hasmntopt __P ((const struct mntent *mnt, const char *option));
+#define endmntent(x) ((int)1)
+
+#endif /* _MNTENT_H */
+#endif /* HAVE_MNTENT_H */
diff --git a/sysutils/gnome-mount/files/patch-src_gnome-mount.c b/sysutils/gnome-mount/files/patch-src_gnome-mount.c
index 217cae97a..eb78bab37 100644
--- a/sysutils/gnome-mount/files/patch-src_gnome-mount.c
+++ b/sysutils/gnome-mount/files/patch-src_gnome-mount.c
@@ -1,18 +1,29 @@
---- src/gnome-mount.c.orig Sun Jun 4 13:20:44 2006
-+++ src/gnome-mount.c Sun Jun 4 13:27:18 2006
-@@ -338,6 +338,7 @@ main (int argc, char *argv[])
+--- src/gnome-mount.c.orig Mon Sep 4 21:41:09 2006
++++ src/gnome-mount.c Mon Sep 4 21:45:53 2006
+@@ -42,7 +42,7 @@
+ #include <libhal.h>
+ #include <libhal-storage.h>
- fsoptions = NULL;
+-#include <mntent.h>
++#include "mntent.h"
-+#ifdef __linux__
- snprintf (uidbuf, sizeof(uidbuf) - 1, "uid=%d", getuid());
+ static DBusConnection *dbus_connection;
+ static LibHalContext *hal_ctx;
+@@ -477,7 +477,7 @@
- /* TODO: read defaults from gconf */
-@@ -349,6 +350,7 @@ main (int argc, char *argv[])
- } else if (strcmp (fstype, "udf") == 0) {
- fsoptions = g_list_append (fsoptions, uidbuf);
+ mount_point = NULL;
+ device_file = get_dev_file (volume, drive);
+-
++#ifdef __linux__
+ if (device_file != NULL) {
+ FILE *f;
+ struct mntent mnt;
+@@ -497,7 +497,7 @@
+ endmntent (f);
}
+ }
+-
+#endif
-
- /* TODO: read per-volume settings from gconf and adjust fsoptions */
-
+ g_print (_("Mounted %s at \"%s\"\n"), device_file, mount_point);
+ g_free (mount_point);
+ }