From: Kay Sievers Date: Wed, 20 Apr 2011 15:30:30 +0000 (+0200) Subject: udevd: netif rename - use ifindex for temporary name X-Git-Tag: 174~171 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e8176e1569de2469321f63aee1765e51bc5ded0;p=systemd udevd: netif rename - use ifindex for temporary name --- diff --git a/TODO b/TODO index 6bcec816..0ecc9c15 100644 --- 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 diff --git a/udev/udev-event.c b/udev/udev-event.c index e583cec2..dfd5c378 100644 --- a/udev/udev-event.c +++ b/udev/udev-event.c @@ -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;