[2/13] Generate sensible block device names.
Cornelia Huck
cohuck at de.ibm.com
Mon Jun 27 01:45:36 PDT 2005
[2/13] Generate sensible block device names.
Generate a sensible name for block devices for which the model is an
empty string.
blockdev.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
Index: hald/linux2/blockdev.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux2/blockdev.c,v
retrieving revision 1.16
diff -u -r1.16 blockdev.c
--- hald/linux2/blockdev.c 29 Apr 2005 21:39:58 -0000 1.16
+++ hald/linux2/blockdev.c 23 Jun 2005 13:59:57 -0000
@@ -107,7 +107,7 @@
hal_util_compute_udi (hald_get_gdl (), udi, sizeof (udi),
"/org/freedesktop/Hal/devices/storage_serial_%s",
serial);
- } else if (model != NULL) {
+ } else if ((model != NULL) && (strlen(model) != 0) ) {
hal_util_compute_udi (hald_get_gdl (), udi, sizeof (udi),
"/org/freedesktop/Hal/devices/storage_model_%s",
model);
_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal
More information about the Hal
mailing list