lkml.org 
[lkml]   [2006]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [Patch -mm 1/1] driver core: Introduce device_move(): move a device to a new parent.
From
Date
On Mon, 2006-11-20 at 13:55 +0100, Cornelia Huck wrote: 
> From: Cornelia Huck <cornelia.huck@de.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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-11-20 15:19    [W:0.077 / U:4.860 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site