aboutsummaryrefslogtreecommitdiff
path: root/sbin/ifconfig/ifconfig.c
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2022-09-06 13:09:39 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2022-09-06 13:09:39 +0000
commitac606903a800bc4ce80bc6fa1374b45efcdb7014 (patch)
treec6a7cb5e0bea980d63d0cc1398507c15b98a430c /sbin/ifconfig/ifconfig.c
parent7c4cfece6b7cc9733610b99682be5e9f11f31fc3 (diff)
downloadsrc-ac606903a800bc4ce80bc6fa1374b45efcdb7014.tar.gz
src-ac606903a800bc4ce80bc6fa1374b45efcdb7014.zip
ifconfig: print interface name on SIOCIFCREATE2 error
We have repeatedly gotten reports of unclassified SIOCIFCREATE2 errors (usually "Device not configured"). This can happen if there is configuration for interfaces in rc.conf which do not (yet) exist and we try to configure. I can, e.g., provoke this by configuring wlan interfaces with their physical interface not installed. In order to cut support (guesswork) down print the name of the interface to be configured with the error message. Hopefully this will help us in the future to improve other configuration or driver problems. Sponsored by: The FreeBSD Foundation MFC after: 3 days
Diffstat (limited to 'sbin/ifconfig/ifconfig.c')
-rw-r--r--sbin/ifconfig/ifconfig.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index ec8a3fd52803..462d543125c4 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -208,7 +208,7 @@ ioctl_ifcreate(int s, struct ifreq *ifr)
case EEXIST:
errx(1, "interface %s already exists", ifr->ifr_name);
default:
- err(1, "SIOCIFCREATE2");
+ err(1, "SIOCIFCREATE2 (%s)", ifr->ifr_name);
}
}
}