hal/hald/linux2/probing probe-storage.c,1.18,1.19
Danny Kukawka
dkukawka at freedesktop.org
Mon Jan 16 13:56:44 PST 2006
Update of /cvs/hal/hal/hald/linux2/probing
In directory gabe:/tmp/cvs-serv22809/hald/linux2/probing
Modified Files:
probe-storage.c
Log Message:
2006-01-16 Danny Kukawka <danny.kukawka at web.de>
* hald/linux2/probing/probe-storage.c: (main): relaced usage of
strtok with g_strsplit_set.
Index: probe-storage.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux2/probing/probe-storage.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- probe-storage.c 16 Jan 2006 12:22:16 -0000 1.18
+++ probe-storage.c 16 Jan 2006 21:56:42 -0000 1.19
@@ -323,11 +323,12 @@
libhal_device_set_property_int (ctx, udi, "storage.cdrom.write_speed", write_speed, &error);
if (write_speeds != NULL)
{
- char *wspeed;
- wspeed = strtok (write_speeds, ",");
- while (wspeed != NULL) {
- libhal_device_property_strlist_append (ctx, udi, "storage.cdrom.write_speeds", wspeed, &error);
- wspeed = strtok (NULL, ",");
+ gchar **wspeeds;
+ int i;
+ wspeeds = g_strsplit_set (write_speeds, ",", -1);
+ for (i = 0 ; wspeeds[i] != NULL; i++) {
+ if (strlen (wspeeds[i]) > 0)
+ libhal_device_property_strlist_append (ctx, udi, "storage.cdrom.write_speeds", wspeeds[i], &error);
}
free (write_speeds);
}
More information about the hal-commit
mailing list