Re: [patch] kernel sysfs events layer

Dave Jones
2004-09-11T11:36:51Z

On Fri, Sep 10, 2004 at 05:48:27PM -0700, Greg KH wrote:

> > What happened to a formatted string argument? The signal argument can
> > become the pre-formatted string, and someone can provide a wrapper
> > that takes a printf() like format and args.
> > kobject_uevent_printf(kobj, "something bad: 0x%08x", err);
>
> Use an attribute, and have userspace read that formatted argument if
> need be. This keeps the kernel interface much simpler, and doesn't
> allow you to abuse it for things it is not intended for (like error
> reporting stuff...)

Erm, no. This will just encourage folks to sprintf to a buffer first
and pass the result to kobject_uevent_printf().

nitpick: Also, if this isn't taking formatted input, shouldn't the name of the
function lose the 'f' ?

Dave