ifconfig: fail with a warning if called on a non-existent interface.

This commit is contained in:
Stefano Ceccherini
2014-06-08 18:59:00 +02:00
parent a0b864f0e4
commit 056b2e33e5
+5
View File
@@ -509,6 +509,11 @@ list_interface(const char* name)
// get link level interface for this interface
BNetworkInterface interface(name);
if (!interface.Exists()) {
printf("Interface not found!\n");
return false;
}
BNetworkAddress linkAddress;
status_t status = interface.GetHardwareAddress(linkAddress);
if (status == B_OK) {