diff options
| author | Lennart Poettering <lennart@poettering.net> | 2004-04-12 13:58:11 +0000 | 
|---|---|---|
| committer | Lennart Poettering <lennart@poettering.net> | 2004-04-12 13:58:11 +0000 | 
| commit | 3a46885c17ba051ced802e3d35b9ddc6bf10edf6 (patch) | |
| tree | 22163205f0c0c511acbf2da8121fd22c05cbf45b /src/ifplugstatus.c | |
| parent | 6f81258a90dd9813246a76ccb35c72255541f5e1 (diff) | |
preparation for 0.24
git-svn-id: file:///home/lennart/svn/public/ifplugd/trunk@109 2bf48fe7-cfc1-0310-909f-d9042e1e0fef
Diffstat (limited to 'src/ifplugstatus.c')
| -rw-r--r-- | src/ifplugstatus.c | 28 | 
1 files changed, 17 insertions, 11 deletions
diff --git a/src/ifplugstatus.c b/src/ifplugstatus.c index 12cdd89..e4db11b 100644 --- a/src/ifplugstatus.c +++ b/src/ifplugstatus.c @@ -51,7 +51,12 @@ int handle(char *iface) {      if (verbose > 0) {          printf("%s:\n", iface); -        if ((s = interface_detect_beat_ethtool(fd, iface)) == IFSTATUS_ERR) +        if ((s = interface_detect_beat_iff(fd, iface)) == IFSTATUS_ERR) +            printf("    IFF_RUNNING failed.\n"); +        else +            printf("    IFF_RUNNING: %s\n", s == IFSTATUS_UP ? "link beat detected" : "unplugged"); +         +	if ((s = interface_detect_beat_ethtool(fd, iface)) == IFSTATUS_ERR)              printf("    SIOCETHTOOL failed (%s)\n", strerror(errno));          else              printf("    SIOCETHTOOL: %s\n", s == IFSTATUS_UP ? "link beat detected" : "unplugged"); @@ -60,23 +65,24 @@ int handle(char *iface) {              printf("    SIOCGMIIPHY failed (%s)\n", strerror(errno));          else              printf("    SIOCGMIIPHY: %s\n", s == IFSTATUS_UP ? "link beat detected" : "unplugged"); -         -        if ((s = interface_detect_beat_priv(fd, iface)) == IFSTATUS_ERR) -            printf("    SIOCDEVPRIVATE failed (%s)\n", strerror(errno)); -        else -            printf("    SIOCDEVPRIVATE: %s\n", s == IFSTATUS_UP ? "link beat detected" : "unplugged");          if ((s = interface_detect_beat_wlan(fd, iface)) == IFSTATUS_ERR)              printf("    Wireless failed.\n");          else              printf("    Wireless: %s\n", s == IFSTATUS_UP ? "link beat detected" : "unplugged"); +        if ((s = interface_detect_beat_priv(fd, iface)) == IFSTATUS_ERR) +            printf("    SIOCDEVPRIVATE failed (%s)\n", strerror(errno)); +        else +            printf("    SIOCDEVPRIVATE: %s\n", s == IFSTATUS_UP ? "link beat detected" : "unplugged"); +      } else { -         -        if ((s = interface_detect_beat_mii(fd, iface)) == IFSTATUS_ERR) -	    if ((s = interface_detect_beat_ethtool(fd, iface)) == IFSTATUS_ERR) -                if ((s = interface_detect_beat_wlan(fd, iface)) == IFSTATUS_ERR) -                    s = interface_detect_beat_priv(fd, iface); + +        if ((s = interface_detect_beat_iff(fd, iface)) == IFSTATUS_ERR) +            if ((s = interface_detect_beat_ethtool(fd, iface)) == IFSTATUS_ERR) +                if ((s = interface_detect_beat_mii(fd, iface)) == IFSTATUS_ERR) +                    if ((s = interface_detect_beat_wlan(fd, iface)) == IFSTATUS_ERR) +                        s = interface_detect_beat_priv(fd, iface);          switch(s) {              case IFSTATUS_UP:  | 
