hal/hald/linux2/probing probe-volume.c,1.16,1.17
Danny Kukawka
dkukawka at freedesktop.org
Thu Aug 25 13:40:50 PDT 2005
Update of /cvs/hal/hal/hald/linux2/probing
In directory gabe:/tmp/cvs-serv21590/hald/linux2/probing
Modified Files:
probe-volume.c
Log Message:
2005-08-25 Danny Kukawka <danny.kukawka at web.de>
* hald/linux2/probing/probe-volume.c: (set_volume_id_values):
Fixed to prevent set a empty info.product from the patch before.
Index: probe-volume.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux2/probing/probe-volume.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- probe-volume.c 25 Aug 2005 19:36:29 -0000 1.16
+++ probe-volume.c 25 Aug 2005 20:40:47 -0000 1.17
@@ -135,7 +135,13 @@
libhal_device_set_property_string (ctx, udi, "volume.label", volume_label, &error);
dbg ("volume.label = '%s'", volume_label);
- libhal_device_set_property_string (ctx, udi, "info.product", volume_label, &error);
+ if (strlen(volume_label) > 0) {
+ libhal_device_set_property_string (ctx, udi, "info.product", volume_label, &error);
+ }
+ else {
+ snprintf (buf, sizeof (buf), "Volume (%s)", vid->type);
+ libhal_device_set_property_string (ctx, udi, "info.product", buf, &error);
+ }
g_free(volume_label);
} else {
snprintf (buf, sizeof (buf), "Volume (%s)", vid->type);
More information about the hal-commit
mailing list