chiark / gitweb /
rename interfaces to <iface>_rename if rename fails
authorHarald Hoyer <harald@redhat.com>
Fri, 18 Sep 2009 11:14:30 +0000 (13:14 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Fri, 18 Sep 2009 11:14:30 +0000 (13:14 +0200)
udev/udev-event.c

index 701c061..d5b4d09 100644 (file)
@@ -492,8 +492,7 @@ static int rename_netif(struct udev_event *event)
                }
 
                /* free our own name, another process may wait for us */
-               util_strscpy(ifr.ifr_newname, IFNAMSIZ, udev_device_get_sysname(dev));
-               util_strscpy(ifr.ifr_newname, IFNAMSIZ, "_rename");
+               util_strscpyl(ifr.ifr_newname, IFNAMSIZ, udev_device_get_sysname(dev), "_rename", NULL);
                err = ioctl(sk, SIOCSIFNAME, &ifr);
                if (err != 0) {
                        err(event->udev, "error changing netif name %s to %s: %m\n",