X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=udev_add.c;h=9420b4fe14fb633c46d2c4f2b790fcc7b412f03a;hp=89af96570f1ce7b17f3e28eae61e37e5c2319ce5;hb=2983db9745f8c2ebd54f8be4a6314733ae227e16;hpb=972d318a3123b00d0ed6b78bbcf70a0965841a8e diff --git a/udev_add.c b/udev_add.c index 89af96570..9420b4fe1 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 @@ -217,7 +215,7 @@ static int create_node(struct udevice *udev, struct sysfs_class_device *class_de strlcat(linktarget, &udev->name[tail], sizeof(linktarget)); - dbg("symlink(%s, %s)", linktarget, filename); + info("creating symlink '%s' to '%s'", filename, linktarget); if (!udev->test_run) { unlink(filename); selinux_setfscreatecon(filename, NULL, S_IFLNK); @@ -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); }