Messages in this thread | | | Date | Sat, 11 Sep 2004 12:35:25 +0100 | From | Dave Jones <> | Subject | Re: [patch] kernel sysfs events layer |
| |
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
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |