From e861e01341e5590d7c0b71d601f3453fa05d01f7 Mon Sep 17 00:00:00 2001 From: Marco d'Itri Date: Sat, 29 Jul 2006 01:00:16 +0200 Subject: make rename_netif() error messages useful --- udev_device.c | 7 ++++--- 1 file 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); -- cgit v1.2.3-54-g00ecf