Re: DeviceKit and /usr
Hendrik Sattler <post@hendrik-sattler.de> writes:
> Am Freitag 04 September 2009 16:36:52 schrieb Michael Biebl:
>> devkit-disks-part-id and devkit-disks-probe-ata-smart both link against
>> libraries which are (currently) in /usr/lib, i.e.
>> devkit-disks-part-id links against libglib-2.0 (784K)
>> devkit-disks-probe-ata-smart links against (48K)
>>
>> This will mean, that we will need to install those two libs in /lib.
>
> It rather needs to raise the question why simple low-level tools use something
> like libglib?
> What does it use from libglib that it couldn't do without?
>From the looks of it: Nothing.
This is a code example from
http://cgit.freedesktop.org/DeviceKit/DeviceKit-disks/tree/src/part-id.c :
g_print ("DKD_PARTITION=1\n");
g_print ("DKD_PARTITION_SCHEME=%s\n",
//part_get_scheme_name (part_table_get_scheme (partition_table_for_entry)));
part_get_scheme_name (part_table_get_scheme (partition_table)));
g_print ("DKD_PARTITION_NUMBER=%d\n", partition_number);
g_print ("DKD_PARTITION_TYPE=%s\n", type != NULL ? type : "");
g_print ("DKD_PARTITION_SIZE=%" G_GINT64_FORMAT "\n", size);
g_print ("DKD_PARTITION_LABEL=%s\n", label != NULL ? label : "");
g_print ("DKD_PARTITION_UUID=%s\n", uuid != NULL ? uuid : "");
g_print ("DKD_PARTITION_FLAGS=%s\n", flags_combined);
g_free (type);
g_free (label);
g_free (uuid);
g_strfreev (flags);
g_free (flags_combined);
} else {
g_print ("DKD_PARTITION_TABLE=1\n");
g_print ("DKD_PARTITION_TABLE_SCHEME=%s\n",
part_get_scheme_name (part_table_get_scheme (partition_table)));
}
Looks like someone is unable to spell printf.
And it is also very unclear to me why this has to be in /lib/udev at
all. It seems to add nothing but redundant information and bugs. Maybe
the DDs could start asking upstream a few questions before blindly
accepting things like that? That might save them a few bug reports
later on.
Bjørn
Reply to: