summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco d'Itri <md@Linux.IT>2006-07-29 01:00:16 +0200
committerKay Sievers <kay.sievers@suse.de>2006-07-29 01:00:16 +0200
commite861e01341e5590d7c0b71d601f3453fa05d01f7 (patch)
tree792ec41fa3beacbdf0b9ba75c3afc23977ec04f4
parent353b00edbcd4da7a2758b50e1e4abf18ac2c6625 (diff)
make rename_netif() error messages useful
-rw-r--r--udev_device.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/udev_device.c b/udev_device.c
index ed41c856e5..87f90c7676 100644
--- a/udev_device.c
+++ b/udev_device.c
@@ -106,7 +106,7 @@ static int rename_netif(struct udevice *udev)
/* see if the destination interface name already exists */
if (errno != EEXIST) {
- err("error changing netif name: %s", strerror(errno));
+ err("error changing netif name %s to %s: %s", ifr.ifr_name, ifr.ifr_newname, strerror(errno));
goto exit;
}
@@ -115,7 +115,7 @@ static int rename_netif(struct udevice *udev)
strlcat(ifr.ifr_newname, "_rename", IFNAMSIZ);
retval = ioctl(sk, SIOCSIFNAME, &ifr);
if (retval != 0) {
- err("error changing netif name: %s", strerror(errno));
+ err("error changing netif name %s to %s: %s", ifr.ifr_name, ifr.ifr_newname, strerror(errno));
goto exit;
}
@@ -127,7 +127,8 @@ static int rename_netif(struct udevice *udev)
retval = ioctl(sk, SIOCSIFNAME, &ifr);
if (retval != 0) {
if (errno != EEXIST) {
- err("error changing net interface name: %s", strerror(errno));
+ err("error changing net interface name %s to %s: %s",
+ ifr.ifr_name, ifr.ifr_newname, strerror(errno));
break;
}
dbg("wait for netif '%s' to become free, loop=%i", udev->name, (30 * 20) - loop);