diff options
author | kay.sievers@vrfy.org <kay.sievers@vrfy.org> | 2004-12-20 08:57:31 +0100 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 23:19:09 -0700 |
commit | eabfc9736703ce0dc81b233d78821d408aa565f2 (patch) | |
tree | a34d77ab4794731cbed5212dd78c8870f33ce7e2 /udev_add.c | |
parent | 9f8dfa19cfd2b502bf794f39a421cbb7c4cc0404 (diff) |
[PATCH] handle renamed network interfaces properly if we manage hotplug.d/
If we take over the hotplug call and manage the events we don't need
to call the event fake script in dev.d/. Just set all expected values
to the new network interface name and call hotplug.d/. This way the
device renaming is completely handled inside of udev and userspace
can't get confused.
Diffstat (limited to 'udev_add.c')
-rw-r--r-- | udev_add.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/udev_add.c b/udev_add.c index c9b30bad90..acd678ffba 100644 --- a/udev_add.c +++ b/udev_add.c @@ -318,15 +318,16 @@ int udev_add_device(struct udevice *udev, struct sysfs_class_device *class_dev) if (retval != 0) goto exit; - /* we've changed the name, now fake the devpath, - * cause original kernel name sleeps with the fishes - * and we don't get any event from the kernel now + /* we've changed the name, now fake the devpath, cause the + * original kernel name sleeps with the fishes and we don't + * get an event from the kernel with the new name */ pos = strrchr(udev->devpath, '/'); if (pos != NULL) { pos[1] = '\0'; strfieldcat(udev->devpath, udev->name); setenv("DEVPATH", udev->devpath, 1); + setenv("INTERFACE", udev->name, 1); } /* use netif name for the environment */ |