gnome-mount patch proposal



Hi, I need information about: how to propose patches for gnome
components. I needed a sync option in gnome-mount to mount pen drives so
I did the attached patch.

When and how can I propose it's inclusion or discuss it's elegance?
Thanks
Felipe Pardal

--- gnome-mount-0.4/src/gnome-mount.c	2006-05-19 16:31:54.000000000 -0300
+++ gnome-mount-0.4/src/gnome-mount.c	2006-05-19 16:39:08.000000000 -0300
@@ -50,6 +50,7 @@
 
 static int fds[2];
 static int rc;
+static gchar *opt_sync = NULL;
 static gboolean opt_noui = FALSE;
 static gboolean opt_block = FALSE;
 static gboolean opt_nodisplay = FALSE;
@@ -416,7 +417,7 @@
 
 	if (fstype == NULL)
 		fstype = "";
-	
+
 	g_debug ("Mounting %s with mount_point='%s', fstype='%s', num_options=%d", 
 		   udi,
 		   mount_point, 
@@ -667,7 +669,10 @@
 		}
 	}
 	
-	
+	if(opt_sync != NULL) {
+		if(!strcmp(opt_sync,"yes"))
+			g_ptr_array_add (options, "sync");
+	}	
 	/* TODO: read mount point from gconf */
 	mount_point = NULL;
 	
@@ -1392,6 +1397,7 @@
                         { "eject", 'e', 0, G_OPTION_ARG_NONE, &opt_eject, "Eject rather than mount", NULL},
                         { "hal-udi", 'h', 0, G_OPTION_ARG_STRING, &opt_hal_udi, "Mount by HAL UDI", NULL},
                         { "device", 'd', 0, G_OPTION_ARG_STRING, &opt_device_file, "Mount by device file", NULL},
+			{ "sync", 's', 0, G_OPTION_ARG_STRING, &opt_sync, "Sync option <yes|no(default)>", NULL},
                         { "pseudonym", 'p', 0, G_OPTION_ARG_STRING, &opt_nickname, "Mount by one of device's nicknames: mountpoint, label, with or without directory prefix", NULL},
 			{ "text", 't', 0, G_OPTION_ARG_NONE, &opt_nodisplay, "Text-based operation", NULL},
                         { NULL, 0, 0, 0, NULL, NULL, NULL }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]