[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1164032103.5541.12.camel@min.off.vrfy.org>
Date: Mon, 20 Nov 2006 15:15:03 +0100
From: Kay Sievers <kay.sievers@...y.org>
To: Cornelia Huck <cornelia.huck@...ibm.com>
Cc: Greg KH <greg@...ah.com>,
linux-kernel <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...l.org>,
Martin Schwidefsky <schwidefsky@...ibm.com>
Subject: Re: [Patch -mm 1/1] driver core: Introduce device_move(): move a
device to a new parent.
On Mon, 2006-11-20 at 13:55 +0100, Cornelia Huck wrote:
> From: Cornelia Huck <cornelia.huck@...ibm.com>
>
> Provide a function device_move() to move a device to a new parent device. Add
> auxilliary functions kobject_move() and sysfs_move_dir().
> kobject_move() generates a new uevent of type KOBJ_MOVE, containing the
> previous path (DEVPATH_OLD) in addition to the usual values. For this, a new
> interface kobject_uevent_env() is created that allows to add further
> environmental data to the uevent at the kobject layer.
> +void kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
> + int num_envp, char *envp[])
We usually use a NULL terminated array for things like this. Does
passing the number of entries give us an advantage?
> +{
> + /* Disallow dumb users. */
> + if (num_envp > NUM_EXT_ENVP)
> + return;
Why do we need such a limit? There are still thousand other ways to
screw things up. :)
And kobject_uevent() can just call kobject_uevent_env(), there is no
need for the indirection with do_*, right?
Thanks,
Kay
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists