hal/hald/linux2/probing probe-volume.c,1.24,1.25

David Zeuthen david at freedesktop.org
Sun Feb 12 19:42:28 PST 2006


Update of /cvs/hal/hal/hald/linux2/probing
In directory gabe:/tmp/cvs-serv32482/hald/linux2/probing

Modified Files:
	probe-volume.c 
Log Message:
2006-02-12  David Zeuthen  <davidz at redhat.com>

        * hald/linux2/probing/probe-volume.c (strdup_valid_utf8): Fixup
        this function as it didn't work at all. Replace invalid characters
        with '_' instead of '?' as the latter is not allowed as a
        mountpoint.



Index: probe-volume.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux2/probing/probe-volume.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- probe-volume.c	23 Jan 2006 12:15:50 -0000	1.24
+++ probe-volume.c	13 Feb 2006 03:42:26 -0000	1.25
@@ -66,15 +66,17 @@
 {
 	char *endchar;
 	char *newstr;
+	char *s;
 
 	if (str == NULL)
 		return NULL;
 
 	newstr = g_strdup (str);
-
-	while (!g_utf8_validate (str, -1, (const char **) &endchar)) {
-		*endchar = '?';
+	s = newstr;
+	while (!g_utf8_validate (s, -1, (const char **) &endchar)) {
+		*endchar = '_';
 	}
+
 	return newstr;
 }
 




More information about the hal-commit mailing list