Re: [patch] kernel sysfs events layer

Greg KH
2004-09-15T03:50:11Z

On Wed, Sep 15, 2004 at 03:09:01AM +0200, Kay Sievers wrote:
> On Tue, Sep 14, 2004 at 05:07:53PM -0700, Greg KH wrote:
> > On Mon, Sep 13, 2004 at 04:45:53PM +0200, Kay Sievers wrote:
> > > Do we agree on the model that the signal is a simple verb and we keep
> > > only a small dictionary of _static_ signal strings and no fancy compositions?
> >
> > I agree with this. And because of that, we should enforce that, and
> > help prevent typos in the signals. So, here's a patch that does just
> > that, making it a lot harder to mess up (although you still can, as
> > enumerated types aren't checked by the compiler...) This patch booted
> > on my test box.
> >
> > Anyone object to me adding this patch? If not, I'll fix up Kay's patch
> > for mounting to use this interface and add both of them.
>
> I like it, so the printf is gone :) Fine with me.
>
> > > And we should reserve the "add" and "remove" only for the hotplug events.
> >
> > I don't know, the firmware objects already use "add" for an event.
>
> Yes, but isn't the firmware event a real hotplug event? I just want to
> be sure, that it's easy to recognize the hotplug events from userspace.

It's a "real" one in that it is generated :)

request_firmware() causes the hotplug event to happen, so that we know
to load firmware to the device that requested it.

> > I didn't put a check in the kobject_uevent() calls to prevent the add and
> > remove, but now it's a lot easier to do so if you think it's necessary.
>
> Don't think that this is needed. I will add somthing to the kobject
> documentation, if it's stable and merged.

Ok, I'll add this patch and wait for the documentation :)

thanks,

greg k-h