]> git.sur5r.net Git - i3/i3status/commitdiff
Merge branch 'master' into master 264/head
authorIngo Bürk <admin@airblader.de>
Tue, 27 Mar 2018 07:26:55 +0000 (09:26 +0200)
committerGitHub <noreply@github.com>
Tue, 27 Mar 2018 07:26:55 +0000 (09:26 +0200)
1  2 
src/first_network_device.c

index 430f1d5b5418100353e1df6a77e69d3a52da3cc5,1ed50a266aa8d438da68ed5d774325732ede6a62..b930f5357a709e803c635b499132b6cd160a5cb1
@@@ -109,24 -124,8 +109,25 @@@ static net_type_t iface_type(const cha
          close(s);
          return NET_TYPE_ETHERNET;
      }
 +#else
 +    char devtype[32];
 +
 +    if (!sysfs_devtype(devtype, sizeof(devtype), ifname))
 +        return NET_TYPE_OTHER;
 +
 +    /* Default to Ethernet when no devtype is available */
 +    if (!devtype[0])
 +        return NET_TYPE_ETHERNET;
 +
 +    if (strcmp(devtype, "wlan") == 0)
 +        return NET_TYPE_WIRELESS;
 +
 +    if (strcmp(devtype, "wwan") == 0)
 +        return NET_TYPE_OTHER;
 +
 +    return NET_TYPE_OTHER;
  #endif
+     return NET_TYPE_OTHER;
  }
  
  const char *first_eth_interface(const net_type_t type) {