Re: [patch] kernel sysfs events layer

From: Kay Sievers
Date: Tue Sep 14 2004 - 20:10:18 EST


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.

> 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.

Thanks,
Kay
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/