[RFC] replace non utf8 always with the same char

David Zeuthen david at fubar.dk
Sat Jul 22 09:09:11 PDT 2006


On Mon, 2006-07-17 at 18:00 +0200, Danny Kukawka wrote:
> On Monday 05 June 2006 05:11, Danny Kukawka wrote:
> > After some time thinking about shared.h and the functions inside the file,
> > I think we can remove the complete debug stuff and switch the addons and
> > prober to use the existing code in logger.c/h . This has two advantages:
> >
> >   1.) share code and reduce doubled code
> >   2.) we don't need a new file with debug stuff in CVS
> >   3.) we can use HAL_* (e.g. HAL_ERROR/HAL_DEBUG) for finer grained debug
> > msg.
> >
> > The only thing left from the file is the function drop_privileges (). After
> > reading the IRC log from yesterday, I added the files droppriv.c/h to the
> > (attached) diff as in the patch from Richard.
> >
> > Btw. IMO we maybe could move the function to utils.c/h , but there are OTOH
> > maybe to many functions in utils.c we never need in addons/probers. On the
> > other side we also could add a new helper file where we can collect
> > addons/specific functionality.
> >
> > About verify UTF8: We should add the check IMO on a more central place in
> > HAL, e.g. to libhal_device_set_property_string(). With this solution we
> > would never need to check utf8 in the helpers.
> >
> > Please comment ...
> 
> Any comments? Reviewed? What about adding drop_privileges() to utils.c instead 
> of a own file for only one function?

I think it's fine moving it all to utils.h if you move the very
hald-main-process specific bits (which I only think is the
hal_util_callout_* functions, yes?) somewhere else.

Thanks,
David




More information about the hal mailing list