[maemo-commits] [maemo-commits] r17878 - projects/haf/trunk/gvfs-1.0.3/debian/patches
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Mon Mar 30 17:27:28 EEST 2009
- Previous message: [maemo-commits] r17877 - in projects/haf/trunk/posix-locales: debian locales
- Next message: [maemo-commits] r17879 - projects/haf/trunk/gvfs-1.0.3/debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: marivoll
Date: 2009-03-30 17:27:25 +0300 (Mon, 30 Mar 2009)
New Revision: 17878
Added:
projects/haf/trunk/gvfs-1.0.3/debian/patches/03_pre_unmount.patch
Modified:
projects/haf/trunk/gvfs-1.0.3/debian/patches/series
Log:
New patch.
Added: projects/haf/trunk/gvfs-1.0.3/debian/patches/03_pre_unmount.patch
===================================================================
--- projects/haf/trunk/gvfs-1.0.3/debian/patches/03_pre_unmount.patch 2009-03-30 14:18:38 UTC (rev 17877)
+++ projects/haf/trunk/gvfs-1.0.3/debian/patches/03_pre_unmount.patch 2009-03-30 14:27:25 UTC (rev 17878)
@@ -0,0 +1,114 @@
+Index: gvfs-1.0.3/monitor/hal/ghalmount.c
+===================================================================
+--- gvfs-1.0.3.orig/monitor/hal/ghalmount.c 2008-09-14 15:05:05.000000000 +0300
++++ gvfs-1.0.3/monitor/hal/ghalmount.c 2009-03-30 17:17:17.000000000 +0300
+@@ -906,6 +906,7 @@
+ guint error_channel_source_id;
+ GString *error_string;
+ gboolean using_legacy;
++ gchar **argv;
+ } UnmountOp;
+
+ static void
+@@ -955,6 +956,7 @@
+ g_source_remove (data->error_channel_source_id);
+ g_io_channel_unref (data->error_channel);
+ g_string_free (data->error_string, TRUE);
++ g_strfreev (data->argv);
+ close (data->error_fd);
+ g_spawn_close_pid (pid);
+
+@@ -977,28 +979,16 @@
+ return TRUE;
+ }
+
+-static void
+-unmount_do (GMount *mount,
+- GCancellable *cancellable,
+- GAsyncReadyCallback callback,
+- gpointer user_data,
+- char **argv,
+- gboolean using_legacy)
++static gboolean
++unmount_do_cb (gpointer user_data)
+ {
+- UnmountOp *data;
++ UnmountOp *data = (UnmountOp *) user_data;
+ GPid child_pid;
+ GError *error;
+
+- data = g_new0 (UnmountOp, 1);
+- data->object = g_object_ref (mount);
+- data->callback = callback;
+- data->user_data = user_data;
+- data->cancellable = cancellable;
+- data->using_legacy = using_legacy;
+-
+ error = NULL;
+ if (!g_spawn_async_with_pipes (NULL, /* working dir */
+- argv,
++ data->argv,
+ NULL, /* envp */
+ G_SPAWN_DO_NOT_REAP_CHILD|G_SPAWN_SEARCH_PATH,
+ NULL, /* child_setup */
+@@ -1017,15 +1007,43 @@
+ g_simple_async_result_complete (simple);
+ g_object_unref (simple);
+ g_error_free (error);
++ g_strfreev (data->argv);
+ g_free (data);
+- return;
++
++ return FALSE;
+ }
+ data->error_string = g_string_new ("");
+ data->error_channel = g_io_channel_unix_new (data->error_fd);
+ data->error_channel_source_id = g_io_add_watch (data->error_channel, G_IO_IN, unmount_read_error, data);
+ g_child_watch_add (child_pid, unmount_cb, data);
++
++ return FALSE;
+ }
+
++static void
++unmount_do (GMount *mount,
++ GCancellable *cancellable,
++ GAsyncReadyCallback callback,
++ gpointer user_data,
++ char **argv,
++ gboolean using_legacy)
++{
++ GHalMount *hal_mount = G_HAL_MOUNT (mount);
++ UnmountOp *data;
++
++ data = g_new0 (UnmountOp, 1);
++ data->object = g_object_ref (mount);
++ data->callback = callback;
++ data->user_data = user_data;
++ data->cancellable = cancellable;
++ data->using_legacy = using_legacy;
++ data->argv = g_strdupv (argv);
++
++ if (hal_mount->volume_monitor != NULL)
++ g_signal_emit_by_name (hal_mount->volume_monitor, "mount-pre-unmount", mount);
++
++ g_timeout_add (500, unmount_do_cb, data);
++}
+
+ static void
+ g_hal_mount_unmount (GMount *mount,
+Index: gvfs-1.0.3/monitor/proxy/gproxyvolumemonitor.c
+===================================================================
+--- gvfs-1.0.3.orig/monitor/proxy/gproxyvolumemonitor.c 2008-09-23 21:54:17.000000000 +0300
++++ gvfs-1.0.3/monitor/proxy/gproxyvolumemonitor.c 2009-03-30 17:17:34.000000000 +0300
+@@ -602,10 +602,7 @@
+ {
+ mount = g_hash_table_lookup (monitor->mounts, id);
+ if (mount != NULL)
+- {
+- signal_emit_in_idle (mount, "pre-unmount", NULL);
+- signal_emit_in_idle (monitor, "mount-pre-unmount", mount);
+- }
++ signal_emit_in_idle (monitor, "mount-pre-unmount", mount);
+ }
+ else if (strcmp (member, "MountRemoved") == 0)
+ {
Modified: projects/haf/trunk/gvfs-1.0.3/debian/patches/series
===================================================================
--- projects/haf/trunk/gvfs-1.0.3/debian/patches/series 2009-03-30 14:18:38 UTC (rev 17877)
+++ projects/haf/trunk/gvfs-1.0.3/debian/patches/series 2009-03-30 14:27:25 UTC (rev 17878)
@@ -1 +1,2 @@
02_http_unescape.patch
+03_pre_unmount.patch
- Previous message: [maemo-commits] r17877 - in projects/haf/trunk/posix-locales: debian locales
- Next message: [maemo-commits] r17879 - projects/haf/trunk/gvfs-1.0.3/debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
