mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-25 07:49:18 +00:00
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
This commit is contained in:
parent
7c4cfece6b
commit
ac606903a8
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user