diff -Nur hal/build-tree/hal-0.5.8.1/hald/linux/probing/probe-volume.c hal.new/build-tree/hal-0.5.8.1/hald/linux/probing/probe-volume.c --- hal-0.5.8.1/hald/linux/probing/probe-volume.c 2007-03-30 17:47:42.000000000 +0200 +++ hal-0.5.8.1/hald/linux/probing/probe-volume.c 2007-03-30 17:52:41.000000000 +0200 @@ -135,34 +135,36 @@ HAL_DEBUG(("volume.uuid = '%s'", vid->uuid)); /* we need to be sure for a utf8 valid label, because dbus accept only utf8 valid strings */ - volume_label = strdup_valid_utf8 (vid->label); - if( volume_label != NULL ) { - libhal_changeset_set_property_string (cs, "volume.label", volume_label); - HAL_DEBUG(("volume.label = '%s'", volume_label)); - - if (strlen(volume_label) > 0) { - libhal_changeset_set_property_string (cs, "info.product", volume_label); - } - else { - if (vid->type != NULL) { - snprintf (buf, sizeof (buf), "Volume (%s)", vid->type); - } else { - snprintf (buf, sizeof (buf), "Volume (unknown)"); - } - - libhal_changeset_set_property_string (cs, "info.product", buf); - - } - g_free(volume_label); - } else { - if (vid->type != NULL) { - snprintf (buf, sizeof (buf), "Volume (%s)", vid->type); - } else { - snprintf (buf, sizeof (buf), "Volume (unknown)"); - } + if (vid->label[0] != '\0') { + volume_label = strdup_valid_utf8 (vid->label); + if( volume_label != NULL ) { + libhal_changeset_set_property_string (cs, "volume.label", volume_label); + HAL_DEBUG(("volume.label = '%s'", volume_label)); + + if (strlen(volume_label) > 0) { + libhal_changeset_set_property_string (cs, "info.product", volume_label); + } + else { + if (vid->type != NULL) { + snprintf (buf, sizeof (buf), "Volume (%s)", vid->type); + } else { + snprintf (buf, sizeof (buf), "Volume (unknown)"); + } + + libhal_changeset_set_property_string (cs, "info.product", buf); + + } + g_free(volume_label); + return; + } + } + if (vid->type != NULL) { + snprintf (buf, sizeof (buf), "Volume (%s)", vid->type); + } else { + snprintf (buf, sizeof (buf), "Volume (unknown)"); + } - libhal_changeset_set_property_string (cs, "info.product", buf); - } + libhal_changeset_set_property_string (cs, "info.product", buf); } /* check if given volume is in /etc/fstab and put the mount point and options