Only print the media state in case we're linked.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20557 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2007-04-04 14:20:32 +00:00
parent eb70c5dd3b
commit bf256341b9
+3 -1
View File
@@ -214,7 +214,9 @@ list_interface(int socket, const char* name)
close(linkSocket);
}
if (ioctl(socket, SIOCGIFMEDIA, &request, sizeof(struct ifreq)) == 0) {
if (ioctl(socket, SIOCGIFMEDIA, &request, sizeof(struct ifreq)) == 0
&& (request.ifr_media & IFM_ACTIVE) != 0) {
// dump media state in case we're linked
const char* type = "unknown";
bool show = true;