X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=udev_add.c;h=9d872bf039474f2be8668e4f7c545a2e7227bf39;hb=61341fae4f84917d3963fff205e9efc31a4cbd16;hp=89af96570f1ce7b17f3e28eae61e37e5c2319ce5;hpb=57663b364beda200ec189c889e7d9c9fede37c9a;p=elogind.git diff --git a/udev_add.c b/udev_add.c index 89af96570..9d872bf03 100644 --- a/udev_add.c +++ b/udev_add.c @@ -1,10 +1,8 @@ /* * udev-add.c * - * Userspace devfs - * * Copyright (C) 2003 Greg Kroah-Hartman - * + * Copyright (C) 2004 Kay Sievers * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -290,6 +288,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 +297,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); }