]> err.no Git - systemd/commitdiff
udevd: netif rename - use ifindex for temporary name
authorKay Sievers <kay.sievers@vrfy.org>
Wed, 20 Apr 2011 15:30:30 +0000 (17:30 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Wed, 20 Apr 2011 15:30:30 +0000 (17:30 +0200)
TODO
udev/udev-event.c

diff --git a/TODO b/TODO
index 6bcec816c84c47c3474f169c812d2deb000c9748..0ecc9c150635bf210c2cdea557984007955120d8 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,7 +1,5 @@
   - empty rules files and link to /dev/null are ok
 
-  - rename netif with ifindex not devname
-
   - kill tabs?
 
   - remove deprecated trigger --type=failed logic
index e583cec2924e9b2f740802f0abad89a7640a6a99..dfd5c37857777a3e4fe77c724e9e35e26bc65765 100644 (file)
@@ -868,7 +868,7 @@ static int rename_netif(struct udev_event *event)
                goto out;
 
        /* free our own name, another process may wait for us */
-       util_strscpyl(ifr.ifr_newname, IFNAMSIZ, udev_device_get_sysname(dev), "-", event->name, NULL);
+       snprintf(ifr.ifr_newname, IFNAMSIZ, "rename%u", udev_device_get_ifindex(dev));
        err = ioctl(sk, SIOCSIFNAME, &ifr);
        if (err < 0) {
                err = -errno;