hal: Branch 'master'

Danny Kukawka dkukawka at kemper.freedesktop.org
Tue Feb 20 06:13:48 PST 2007


 tools/hal-storage-mount.c |    5 +----
 1 files changed, 1 insertion(+), 4 deletions(-)

New commits:
diff-tree c80d811ece728dfeba60c1a10af12eca4bb9bbc5 (from c328baddf41e399cc6fbb42b6a35a4cf0b2c0c6e)
Author: Danny Kukawka <danny.kukawka at web.de>
Date:   Tue Feb 20 15:07:09 2007 +0100

    fix .hal-mtab mountpoint handling
    
    This fixes problems with the mountpoint handling in .hal-mtab and non ASCII
    chars as e.g. in languages like Russian. This patch remove the usage of
    g_strescape() to escape the mountpoint for .hal-mtab.
    
    Tested this with the string from [1] (also reported as fd.o bug #9921) and
    normal ASCII label names (also with space characters in the mountpoint) and
    there was no problem and both cases worked as expected for mount and umount
    now.
    
    [1] https://bugzilla.novell.com/show_bug.cgi?id=242466

diff --git a/tools/hal-storage-mount.c b/tools/hal-storage-mount.c
index 63120c1..4abeaa2 100644
--- a/tools/hal-storage-mount.c
+++ b/tools/hal-storage-mount.c
@@ -844,7 +844,6 @@ handle_mount (LibHalContext *hal_ctx, 
 	 *                      but it doesn't really matter much at this point */
 	if (!is_remount) {
 		FILE *hal_mtab;
-		char *mount_dir_escaped;
 		FILE *hal_mtab_orig;
 		int hal_mtab_orig_len;
 		int num_read;
@@ -888,7 +887,6 @@ handle_mount (LibHalContext *hal_ctx, 
 			hal_mtab_buf = g_strdup ("");
 		}
 		
-		mount_dir_escaped = g_strescape (mount_dir, NULL);
 #ifdef DEBUG
 		printf ("%d: XYA creating /media/.hal-mtab~\n", getpid ());
 #endif
@@ -900,7 +898,7 @@ handle_mount (LibHalContext *hal_ctx, 
 		hal_mtab_buf = g_strdup_printf ("%s%s\t%s\t0\t%s\t%s\t%s\n", 
 						hal_mtab_buf_old,
 						device, invoked_by_uid, mount_do_fstype, 
-						mount_option_commasep, mount_dir_escaped);
+						mount_option_commasep, mount_dir);
 		g_free (hal_mtab_buf_old);
 		if (hal_mtab_buf_old == NULL) {
 			unknown_error ("Out of memory appending to /media/.hal-mtab~");
@@ -910,7 +908,6 @@ handle_mount (LibHalContext *hal_ctx, 
 		}
 		fclose (hal_mtab);
 		g_free (hal_mtab_buf);
-		g_free (mount_dir_escaped);
 #ifdef DEBUG
 		printf ("%d: XYA closing /media/.hal-mtab~\n", getpid ());
 #endif


More information about the hal-commit mailing list