summaryrefslogtreecommitdiff
path: root/udev_add.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2005-07-03 14:32:22 +0200
committerKay Sievers <kay.sievers@suse.de>2005-07-03 14:32:22 +0200
commitc44563817a9eea73a5fac914dd7bd7aa4cbcdbb6 (patch)
treee2f604c402b88f96c4e83189045bcc7c5190842f /udev_add.c
parentffd5c6893756af43daf2a9a30bdcff13784a1ec4 (diff)
fake also kernel-name if we renamed a netif
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Diffstat (limited to 'udev_add.c')
-rw-r--r--udev_add.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/udev_add.c b/udev_add.c
index 89af96570f..e9ae150180 100644
--- a/udev_add.c
+++ b/udev_add.c
@@ -290,6 +290,7 @@ int udev_add_device(struct udevice *udev, struct sysfs_class_device *class_dev)
if (retval != 0)
goto exit;
+ info("renamed netif to '%s'", udev->name);
/* 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
@@ -298,6 +299,7 @@ int udev_add_device(struct udevice *udev, struct sysfs_class_device *class_dev)
if (pos != NULL) {
pos[1] = '\0';
strlcat(udev->devpath, udev->name, sizeof(udev->devpath));
+ strlcpy(udev->kernel_name, udev->name, sizeof(udev->kernel_name));
setenv("DEVPATH", udev->devpath, 1);
setenv("INTERFACE", udev->name, 1);
}