Re: [PATCH] Driver Core patches for 2.6.9

From: Kronos
Date: Sat Oct 23 2004 - 16:48:01 EST


Il Sat, Oct 23, 2004 at 01:34:04PM -0700, Greg KH ha scritto:
> On Sat, Oct 23, 2004 at 10:20:37PM +0200, Kronos wrote:
> > Greg KH <greg@xxxxxxxxx> ha scritto:
> > > ChangeSet 1.1867.3.4, 2004/09/15 11:36:09-07:00, greg@xxxxxxxxx
> > >
> > > kevent: standardize on the event types
> > >
> > > This prevents any potential typos from happening.
> >
> > [cut]
> >
> > > diff -Nru a/lib/kobject_uevent.c b/lib/kobject_uevent.c
> > > --- a/lib/kobject_uevent.c 2004-10-19 09:22:44 -07:00
> > > +++ b/lib/kobject_uevent.c 2004-10-19 09:22:44 -07:00
> > > @@ -19,9 +19,29 @@
> > > #include <linux/skbuff.h>
> > > #include <linux/netlink.h>
> > > #include <linux/string.h>
> > > +#include <linux/kobject_uevent.h>
> > > #include <linux/kobject.h>
> > > #include <net/sock.h>
> > >
> > > +/*
> > > + * These must match up with the values for enum kobject_action
> > > + * as found in include/linux/kobject_uevent.h
> > > + */
> > > +static char *actions[] = {
> > > + "add", /* 0x00 */
> > > + "remove", /* 0x01 */
> > > + "change", /* 0x02 */
> > > + "mount", /* 0x03 */
> > > +};
> >
> > Hi Greg,
> > maybe it's just a matter of taste but I think that is better to do
> > something like this:
> >
> > static char *actions[] = {
> > [KOBJ_ADD] = "add",
> > [KOBJ_REMOVE] = "remove",
> > [KOBJ_CHANGE] = "change",
> > [KOBJ_MOUNT] = "mount",
> > };
> >
> > This would prevent the insertion of a new action in the wrong place.
>
> See the following patches in the series, which fixes this up :)

Ah, right. I missed that patch. Sorry for the noise.

Luca
--
Home: http://kronoz.cjb.net
Sono un mirabile incrocio tra Tarzan e Giacomo Leopardi.
In me convivono tutte le doti intelluttuali di Tarzan e
tutta la prestanza fisica di Giacomo Leopardi.
A. Borsani
-
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/