summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Zeuthen <davidz@redhat.com>2009-04-15 14:40:37 -0400
committerDavid Zeuthen <davidz@redhat.com>2009-04-15 14:40:37 -0400
commitf72872109fea7c0ee5e3ad52cb71f498e55384f9 (patch)
tree44a49926069c67ac5a1e03544f842af8313e98d2
parent07cde4c831da944fe018cf21cf8ca70b6488251a (diff)
downloadgnome-disk-utility-f72872109fea7c0ee5e3ad52cb71f498e55384f9.tar.gz
gnome-disk-utility-f72872109fea7c0ee5e3ad52cb71f498e55384f9.tar.xz
gnome-disk-utility-f72872109fea7c0ee5e3ad52cb71f498e55384f9.zip
allow passing options to gdu_device_op_filesystem_mount()
We need this for the gvfs monitor to pass the 'flush' option for vfat.
-rw-r--r--src/gdu/gdu-device.c8
-rw-r--r--src/gdu/gdu-device.h1
-rw-r--r--src/palimpsest/gdu-shell.c1
3 files changed, 8 insertions, 2 deletions
diff --git a/src/gdu/gdu-device.c b/src/gdu/gdu-device.c
index c74cd21..045441c 100644
--- a/src/gdu/gdu-device.c
+++ b/src/gdu/gdu-device.c
@@ -1512,11 +1512,12 @@ op_mount_cb (DBusGProxy *proxy, char *mount_path, GError *error, gpointer user_d
void
gdu_device_op_filesystem_mount (GduDevice *device,
+ gchar **options,
GduDeviceFilesystemMountCompletedFunc callback,
gpointer user_data)
{
const char *fstype;
- char *options[16];
+ gchar *null_options[16];
FilesystemMountData *data;
data = g_new0 (FilesystemMountData, 1);
@@ -1524,9 +1525,12 @@ gdu_device_op_filesystem_mount (GduDevice *device,
data->callback = callback;
data->user_data = user_data;
- options[0] = NULL;
fstype = NULL;
+ null_options[0] = NULL;
+ if (options == NULL)
+ options = null_options;
+
org_freedesktop_DeviceKit_Disks_Device_filesystem_mount_async (device->priv->proxy,
fstype,
(const char **) options,
diff --git a/src/gdu/gdu-device.h b/src/gdu/gdu-device.h
index bb7d1ae..9ed4e95 100644
--- a/src/gdu/gdu-device.h
+++ b/src/gdu/gdu-device.h
@@ -214,6 +214,7 @@ GduAtaSmartAttribute *gdu_device_drive_ata_smart_get_attribute (GduDevice *devic
/* ---------------------------------------------------------------------------------------------------- */
void gdu_device_op_filesystem_mount (GduDevice *device,
+ gchar **options,
GduDeviceFilesystemMountCompletedFunc callback,
gpointer user_data);
diff --git a/src/palimpsest/gdu-shell.c b/src/palimpsest/gdu-shell.c
index 3b9433c..79cef08 100644
--- a/src/palimpsest/gdu-shell.c
+++ b/src/palimpsest/gdu-shell.c
@@ -1074,6 +1074,7 @@ mount_action_callback (GtkAction *action, gpointer user_data)
device = gdu_presentable_get_device (shell->priv->presentable_now_showing);
if (device != NULL) {
gdu_device_op_filesystem_mount (device,
+ NULL,
mount_op_callback,
shell_presentable_new (shell, shell->priv->presentable_now_showing));
g_object_unref (device);