r36112 - in /desktop/experimental/gvfs/debian: changelog patches/04_hurd_path_max.patch
smcv at users.alioth.debian.org
smcv at users.alioth.debian.org
Tue Oct 23 08:54:05 UTC 2012
Author: smcv
Date: Tue Oct 23 08:54:04 2012
New Revision: 36112
URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=36112
Log:
refresh 04_hurd_path_max.patch
Modified:
desktop/experimental/gvfs/debian/changelog
desktop/experimental/gvfs/debian/patches/04_hurd_path_max.patch
Modified: desktop/experimental/gvfs/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gvfs/debian/changelog?rev=36112&op=diff
==============================================================================
--- desktop/experimental/gvfs/debian/changelog [utf-8] (original)
+++ desktop/experimental/gvfs/debian/changelog [utf-8] Tue Oct 23 08:54:04 2012
@@ -21,6 +21,7 @@
tree that doesn't exist (LP: #405432)
- Add patch from Christian Kellner, via Ubuntu, to erase broken metadata
files (related to LP #405432)
+ - refresh 04_hurd_path_max.patch
-- Simon McVittie <smcv at debian.org> Tue, 23 Oct 2012 09:21:04 +0100
Modified: desktop/experimental/gvfs/debian/patches/04_hurd_path_max.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gvfs/debian/patches/04_hurd_path_max.patch?rev=36112&op=diff
==============================================================================
--- desktop/experimental/gvfs/debian/patches/04_hurd_path_max.patch [utf-8] (original)
+++ desktop/experimental/gvfs/debian/patches/04_hurd_path_max.patch [utf-8] Tue Oct 23 08:54:04 2012
@@ -1,46 +1,37 @@
-http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=555055
-https://bugzilla.gnome.org/show_bug.cgi?id=601497
+From ae0752a452faa1d9a9f1d3b9f8d6092de23c9f2e Mon Sep 17 00:00:00 2001
+From: Simon McVittie <smcv at debian.org>
+Date: Thu, 18 Oct 2012 15:57:21 +0100
+Subject: [PATCH] volume monitors: on glibc systems, let realpath() allocate
+ its own buffer
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
-Index: gvfs-experimental/monitor/hal/ghalvolumemonitor.c
-===================================================================
---- gvfs-experimental.orig/monitor/hal/ghalvolumemonitor.c 2011-04-26 14:25:12.000000000 +0200
-+++ gvfs-experimental/monitor/hal/ghalvolumemonitor.c 2011-05-17 16:38:54.956764883 +0200
-@@ -739,11 +739,23 @@
- }
- else
- {
-- char resolved_device_path[PATH_MAX];
- /* handle symlinks such as /dev/disk/by-uuid/47C2-1994 */
-+#ifdef __GLIBC__
-+ char *resolved_device_path;
-+ resolved_device_path = realpath (device_path, NULL);
-+ if (resolved_device_path != NULL &&
-+ strcmp (resolved_device_path, device_file) == 0)
-+ {
-+ free (resolved_device_path);
-+ return mount_point;
-+ }
-+ free (resolved_device_path);
-+#else
-+ char resolved_device_path[PATH_MAX];
- if (realpath (device_path, resolved_device_path) != NULL &&
- strcmp (resolved_device_path, device_file) == 0)
- return mount_point;
-+#endif
- }
- }
-
-Index: gvfs-experimental/monitor/gdu/ggduvolumemonitor.c
-===================================================================
---- gvfs-experimental.orig/monitor/gdu/ggduvolumemonitor.c 2011-04-26 14:25:12.000000000 +0200
-+++ gvfs-experimental/monitor/gdu/ggduvolumemonitor.c 2011-05-17 16:40:03.586764915 +0200
-@@ -695,15 +695,28 @@
+This was originally to support Hurd, which doesn't have a PATH_MAX
+at all. It also seems a good idea for systems where PATH_MAX is just a
+convenient lie, such as Linux.
+
+Based on a patch by Samuel Thibault, as revised by Martin Pitt,
+Raphaël Hertzog and Emilio Pozuelo Monfort.
+
+Bug-Debian: http://bugs.debian.org/555055
+---
+ monitor/gdu/ggduvolumemonitor.c | 33 +++++++++++++++++++++++++++++++--
+ monitor/hal/ghalvolumemonitor.c | 18 +++++++++++++++++-
+ 2 files changed, 48 insertions(+), 3 deletions(-)
+
+diff --git a/monitor/gdu/ggduvolumemonitor.c b/monitor/gdu/ggduvolumemonitor.c
+index 4021eab..aecfa34 100644
+--- a/monitor/gdu/ggduvolumemonitor.c
++++ b/monitor/gdu/ggduvolumemonitor.c
+@@ -698,15 +698,30 @@ get_mount_point_for_device (GduDevice *d, GList *fstab_mount_points)
}
else
{
+ /* handle symlinks such as /dev/disk/by-uuid/47C2-1994 */
+#ifdef __GLIBC__
+ char *resolved_fstab_device_file;
++
+ resolved_fstab_device_file = realpath (fstab_device_file, NULL);
+ if (resolved_fstab_device_file != NULL &&
+ g_strcmp0 (resolved_fstab_device_file, device_file) == 0)
@@ -49,6 +40,7 @@
+ ret = mount_point;
+ goto out;
+ }
++
+ free(resolved_fstab_device_file);
+#else
char resolved_fstab_device_file[PATH_MAX];
@@ -64,12 +56,12 @@
}
}
-@@ -1423,15 +1436,27 @@
+@@ -1432,16 +1447,30 @@ update_fstab_volumes (GGduVolumeMonitor *monitor,
device_file = g_unix_mount_point_get_device_path (mount_point);
if (g_str_has_prefix (device_file, "/dev/"))
{
- gchar resolved_path[PATH_MAX];
- GduDevice *device;
+ GduDevice *device = NULL;
+#ifdef __GLIBC__
+ gchar *resolved_path;
+
@@ -86,10 +78,49 @@
+#endif
/* is handled by DKD */
- device = gdu_pool_get_by_device_file (monitor->pool, resolved_path);
+ if (monitor->pool != NULL)
+ device = gdu_pool_get_by_device_file (monitor->pool, resolved_path);
++
+#ifdef __GLIBC__
+ free(resolved_path);
+#endif
++
if (device != NULL)
{
g_object_unref (device);
+diff --git a/monitor/hal/ghalvolumemonitor.c b/monitor/hal/ghalvolumemonitor.c
+index 5082fc8..7bbd5a3 100644
+--- a/monitor/hal/ghalvolumemonitor.c
++++ b/monitor/hal/ghalvolumemonitor.c
+@@ -739,11 +739,27 @@ get_mount_point_for_device (HalDevice *d, GList *fstab_mount_points)
+ }
+ else
+ {
+- char resolved_device_path[PATH_MAX];
+ /* handle symlinks such as /dev/disk/by-uuid/47C2-1994 */
++#ifdef __GLIBC__
++ char *resolved_device_path;
++
++ resolved_device_path = realpath (device_path, NULL);
++
++ if (resolved_device_path != NULL &&
++ strcmp (resolved_device_path, device_file) == 0)
++ {
++ free (resolved_device_path);
++ return mount_point;
++ }
++
++ free (resolved_device_path);
++#else
++ char resolved_device_path[PATH_MAX];
++
+ if (realpath (device_path, resolved_device_path) != NULL &&
+ strcmp (resolved_device_path, device_file) == 0)
+ return mount_point;
++#endif
+ }
+ }
+
+--
+1.7.10.4
+
More information about the pkg-gnome-commits
mailing list