use util-linux-ng's libblkid instead of libvolume_id

Dan Nicholson dbn.lists at gmail.com
Thu Mar 26 16:20:43 PDT 2009


On Thu, Mar 26, 2009 at 9:10 AM, Kay Sievers <kay.sievers at vrfy.org> wrote:
> This converts HAL to link against the new blkid from util-linx-ng, which
> merged all needed libvolume_id functionality. It's this version:
>  http://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git;a=tree;f=libs/blkid;hb=HEAD
>
> It can not work with libblkid from e2fs-progs. Udev's libvolume_id will
> go away soon.

One thing caught my eye just skimming the patch (apologies for gmail
mangling wrapping).

diff --git a/hald/linux/probing/probe-volume.c
b/hald/linux/probing/probe-volume.c
index 8ce557e..882de88 100644
--- a/hald/linux/probing/probe-volume.c
+++ b/hald/linux/probing/probe-volume.c
@@ -101,28 +90,28 @@ set_volume_id_values (LibHalChangeSet *cs, struct
volume_id *vid)

 	dbus_error_init (&error);

-	if (!volume_id_get_usage(vid, &usage))
+	if (blkid_probe_lookup_value(pr, "USAGE", &usage, NULL))
 		usage = "";
 	libhal_changeset_set_property_string (cs, "volume.fsusage", usage);
 	HAL_DEBUG (("volume.fsusage = '%s'", usage));

-	if (!volume_id_get_type(vid, &type))
+	if (blkid_probe_lookup_value(pr, "TYPE", &type, NULL))
 		type = "";
-	if (!libhal_changeset_set_property_string (cs, "volume.fstype", type))
+	if (libhal_changeset_set_property_string (cs, "volume.fstype", type))
 		libhal_changeset_set_property_string (cs, "volume.fstype", "");
 	HAL_DEBUG(("volume.fstype = '%s'", type));

Was this change (dropping the !) intentional? It seems like a typo
since it has nothing to do with vol_id/blkid.

--
Dan


More information about the hal mailing list