[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: DeviceKit and /usr



Josselin Mouette <joss@debian.org> writes:
> Le vendredi 04 septembre 2009 à 19:32 +0200, Hendrik Sattler a écrit : 
>> It rather needs to raise the question why simple low-level tools use something 
>> like libglib?
>
> I’d rather raise the question why each of our simple low-level tools
> implement its data structures and basic routines in its own fashion,
> leading to bugs and security issues sometimes, instead of re-using the
> ones from Glib.

Oh, come on...

Exactly what does glib add here:

#define G_GNUC_PRINTF( format_idx, arg_idx )    \
  __attribute__((__format__ (__printf__, format_idx, arg_idx)))

void            g_print                 (const gchar    *format,
                                         ...) G_GNUC_PRINTF (1, 2);



You're not seriously suggesting that DeviceKit-disks usage of g_print
instead of printf is actually adding anything useful?

The fact is that glib is nothing but a libc wrapper for the low-level
usage we're talking about here.  And as such, completely unnecessary. I
wouldn't have cared if we were discussing ordinary desktop utilities.
glib is of course available for them, and it doesn't matter whether you
use the printf wrapper or not.  But it is not an argument for moving
glib to /lib.  There is already a printf() in /lib.  Use it.

Or do you want to take your argument to the kernel as well?  Maybe it
should use the glib wrappers to avoid bugs and security issues?  Right.



Bjørn


Reply to: