diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-12 18:49:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-12 18:49:37 -0400 |
commit | efefc6eb38d43b8e5daef482f575d767b002004e (patch) | |
tree | 8a3933db1f8721f9bcc9912c800dc8406f4bdf94 /net/core/net-sysfs.c | |
parent | 117494a1b65183f0e3fcc817b07944bc5c465050 (diff) | |
parent | cd59abfcc441b2abb4cf2cd62c1eb0f02a60e8dd (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6: (75 commits)
PM: merge device power-management source files
sysfs: add copyrights
kobject: update the copyrights
kset: add some kerneldoc to help describe what these strange things are
Driver core: rename ktype_edd and ktype_efivar
Driver core: rename ktype_driver
Driver core: rename ktype_device
Driver core: rename ktype_class
driver core: remove subsystem_init()
sysfs: move sysfs file poll implementation to sysfs_open_dirent
sysfs: implement sysfs_open_dirent
sysfs: move sysfs_dirent->s_children into sysfs_dirent->s_dir
sysfs: make sysfs_root a regular directory dirent
sysfs: open code sysfs_attach_dentry()
sysfs: make s_elem an anonymous union
sysfs: make bin attr open get active reference of parent too
sysfs: kill unnecessary NULL pointer check in sysfs_release()
sysfs: kill unnecessary sysfs_get() in open paths
sysfs: reposition sysfs_dirent->s_mode.
sysfs: kill sysfs_update_file()
...
Diffstat (limited to 'net/core/net-sysfs.c')
-rw-r--r-- | net/core/net-sysfs.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 909a03d6c0e9..6628e457ddc0 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c | |||
@@ -396,28 +396,22 @@ static struct attribute_group wireless_group = { | |||
396 | #endif /* CONFIG_SYSFS */ | 396 | #endif /* CONFIG_SYSFS */ |
397 | 397 | ||
398 | #ifdef CONFIG_HOTPLUG | 398 | #ifdef CONFIG_HOTPLUG |
399 | static int netdev_uevent(struct device *d, char **envp, | 399 | static int netdev_uevent(struct device *d, struct kobj_uevent_env *env) |
400 | int num_envp, char *buf, int size) | ||
401 | { | 400 | { |
402 | struct net_device *dev = to_net_dev(d); | 401 | struct net_device *dev = to_net_dev(d); |
403 | int retval, len = 0, i = 0; | 402 | int retval; |
404 | 403 | ||
405 | /* pass interface to uevent. */ | 404 | /* pass interface to uevent. */ |
406 | retval = add_uevent_var(envp, num_envp, &i, | 405 | retval = add_uevent_var(env, "INTERFACE=%s", dev->name); |
407 | buf, size, &len, | ||
408 | "INTERFACE=%s", dev->name); | ||
409 | if (retval) | 406 | if (retval) |
410 | goto exit; | 407 | goto exit; |
411 | 408 | ||
412 | /* pass ifindex to uevent. | 409 | /* pass ifindex to uevent. |
413 | * ifindex is useful as it won't change (interface name may change) | 410 | * ifindex is useful as it won't change (interface name may change) |
414 | * and is what RtNetlink uses natively. */ | 411 | * and is what RtNetlink uses natively. */ |
415 | retval = add_uevent_var(envp, num_envp, &i, | 412 | retval = add_uevent_var(env, "IFINDEX=%d", dev->ifindex); |
416 | buf, size, &len, | ||
417 | "IFINDEX=%d", dev->ifindex); | ||
418 | 413 | ||
419 | exit: | 414 | exit: |
420 | envp[i] = NULL; | ||
421 | return retval; | 415 | return retval; |
422 | } | 416 | } |
423 | #endif | 417 | #endif |