summaryrefslogtreecommitdiffstats
path: root/sysutils/gnome-volume-manager/files
diff options
context:
space:
mode:
authormarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2006-11-08 13:25:16 +0800
committermarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2006-11-08 13:25:16 +0800
commit0640e8e4ed464487f3bfb4ab1bb9a72d45968553 (patch)
treec0a62816dab69401cf3658dbdbf36e625a3e2150 /sysutils/gnome-volume-manager/files
parentd5f1e1ae11966eb204cda668857edb06c72a762e (diff)
downloadmarcuscom-ports-0640e8e4ed464487f3bfb4ab1bb9a72d45968553.tar
marcuscom-ports-0640e8e4ed464487f3bfb4ab1bb9a72d45968553.tar.gz
marcuscom-ports-0640e8e4ed464487f3bfb4ab1bb9a72d45968553.tar.bz2
marcuscom-ports-0640e8e4ed464487f3bfb4ab1bb9a72d45968553.tar.lz
marcuscom-ports-0640e8e4ed464487f3bfb4ab1bb9a72d45968553.tar.xz
marcuscom-ports-0640e8e4ed464487f3bfb4ab1bb9a72d45968553.tar.zst
marcuscom-ports-0640e8e4ed464487f3bfb4ab1bb9a72d45968553.zip
Update to 2.17.0.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@7887 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'sysutils/gnome-volume-manager/files')
-rw-r--r--sysutils/gnome-volume-manager/files/patch-gnome-volume-manager.schemas.in11
-rw-r--r--sysutils/gnome-volume-manager/files/patch-src_manager.c66
-rw-r--r--sysutils/gnome-volume-manager/files/patch-src_properties.c14
3 files changed, 91 insertions, 0 deletions
diff --git a/sysutils/gnome-volume-manager/files/patch-gnome-volume-manager.schemas.in b/sysutils/gnome-volume-manager/files/patch-gnome-volume-manager.schemas.in
new file mode 100644
index 000000000..94af083a1
--- /dev/null
+++ b/sysutils/gnome-volume-manager/files/patch-gnome-volume-manager.schemas.in
@@ -0,0 +1,11 @@
+--- gnome-volume-manager.schemas.in.orig Wed Jun 7 21:41:12 2006
++++ gnome-volume-manager.schemas.in Wed Jun 7 21:41:40 2006
+@@ -227,7 +227,7 @@
+ <key>/schemas/desktop/gnome/volume_manager/autoprinter_command</key>
+ <applyto>/desktop/gnome/volume_manager/autoprinter_command</applyto>
+ <type>string</type>
+- <default>gnome-printer-add hal://%h</default>
++ <default>gnome-cups-add hal://%h</default>
+ <locale name="C">
+ <short>printer command</short>
+ <long>Command to run when a printer is connected.</long>
diff --git a/sysutils/gnome-volume-manager/files/patch-src_manager.c b/sysutils/gnome-volume-manager/files/patch-src_manager.c
new file mode 100644
index 000000000..a9a37cca2
--- /dev/null
+++ b/sysutils/gnome-volume-manager/files/patch-src_manager.c
@@ -0,0 +1,66 @@
+--- src/manager.c.orig Tue Nov 7 13:01:17 2006
++++ src/manager.c Tue Nov 7 21:18:25 2006
+@@ -23,9 +23,12 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <dirent.h>
++#include <fcntl.h>
+ #include <signal.h>
+ #include <unistd.h>
+ #include <utmp.h>
++#include <sys/param.h>
++#include <sys/mount.h>
+
+ #include <locale.h>
+
+@@ -3185,6 +3188,12 @@ gvm_local_user (void)
+ size_t n;
+ DIR *dir;
+ int vt;
++#ifndef __linux__
++ int bytes, fd;
++ struct stat sb;
++ struct utmp buf[1024];
++ size_t len;
++#endif
+
+ if (local & LOCAL_USER_CHECKED)
+ return (local & LOCAL_USER_FOUND);
+@@ -3208,6 +3217,7 @@ gvm_local_user (void)
+
+ fallback:
+
++#ifdef __linux__
+ if (!(local & LOCAL_USER_FOUND)) {
+ setutent ();
+
+@@ -3222,6 +3232,29 @@ gvm_local_user (void)
+
+ endutent ();
+ }
++#else
++ if ((fd = open (_PATH_WTMP, O_RDONLY, 0)) < 0 || fstat(fd, &sb) == -1) {
++ close (fd);
++ return TRUE;
++ }
++
++ len = (sb.st_size + sizeof(buf) - 1) / sizeof(buf);
++
++ while (!local && --len >= 0) {
++ if (lseek(fd, (off_t) (len * sizeof(buf)), L_SET) == -1 ||
++ (bytes = read (fd, buf, sizeof(buf))) == -1) {
++ close (fd);
++ return TRUE;
++ }
++ for (utmp = &buf[bytes / sizeof(buf[0]) - 1]; !local && utmp >= buf; --utmp) {
++ if (!utmp->ut_name[0] || strncmp (utmp->ut_name, user, n) != 0)
++ continue;
++ local = utmp->ut_line[0] == ':' && utmp->ut_line[1] >= '0' && utmp->ut_line[1] <= '9' || !strncmp (utmp->ut_line, "tty", 3) ? LOCAL_USER_FOUND : 0;
++ }
++ }
++
++ close (fd);
++#endif
+
+ local |= LOCAL_USER_CHECKED;
+
diff --git a/sysutils/gnome-volume-manager/files/patch-src_properties.c b/sysutils/gnome-volume-manager/files/patch-src_properties.c
new file mode 100644
index 000000000..5e8d72a2d
--- /dev/null
+++ b/sysutils/gnome-volume-manager/files/patch-src_properties.c
@@ -0,0 +1,14 @@
+--- src/properties.c.orig Sat Jul 15 13:54:29 2006
++++ src/properties.c Sat Jul 15 13:55:03 2006
+@@ -499,7 +499,11 @@ main (int argc, char **argv)
+ _("The \"hald\" service is required but not currently "
+ "running. Enable the service and rerun this application, "
+ "or contact your system administrator.\n\n"
++#ifndef __FreeBSD__
+ "Note: You need Linux kernel 2.6 for volume "
++#else
++ "Note: You need sysutils/hal installed for volume "
++#endif
+ "management to work."));
+
+ gtk_dialog_run (GTK_DIALOG (dialog));