diff options
author | Lennart Poettering <lennart@poettering.net> | 2004-12-19 00:08:01 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2004-12-19 00:08:01 +0000 |
commit | 24f02b7bba491023ccfad8850269b39970caa25a (patch) | |
tree | 410b81d507e78b76c1d01c54f6a033fea24e0f12 | |
parent | 9d2e16613d3fba59cbfe839bb8f425ac84307f53 (diff) |
* mii fix
* build system update
git-svn-id: file:///home/lennart/svn/public/ifplugd/trunk@114 2bf48fe7-cfc1-0310-909f-d9042e1e0fef
-rw-r--r-- | src/ifmonitor.c | 4 | ||||
-rw-r--r-- | src/ifplugd.c | 8 | ||||
-rw-r--r-- | src/ifplugstatus.c | 8 | ||||
-rw-r--r-- | src/interface.c | 8 | ||||
-rw-r--r-- | src/nlapi.c | 4 |
5 files changed, 22 insertions, 10 deletions
diff --git a/src/ifmonitor.c b/src/ifmonitor.c index 83e9bb8..2edec4a 100644 --- a/src/ifmonitor.c +++ b/src/ifmonitor.c @@ -18,6 +18,10 @@ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <stdio.h> #include <sys/socket.h> #include <linux/types.h> diff --git a/src/ifplugd.c b/src/ifplugd.c index 624d991..7d8bba3 100644 --- a/src/ifplugd.c +++ b/src/ifplugd.c @@ -19,6 +19,10 @@ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <stdlib.h> #include <stdio.h> #include <string.h> @@ -52,10 +56,6 @@ #include "ifmonitor.h" #include "svn-revision.h" -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - #define VARRUN "/var/run" #define IFPLUGD_ENV_PREVIOUS "IFPLUGD_PREVIOUS" #define IFPLUGD_ENV_CURRENT "IFPLUGD_CURRENT" diff --git a/src/ifplugstatus.c b/src/ifplugstatus.c index 04c59b9..fed74d8 100644 --- a/src/ifplugstatus.c +++ b/src/ifplugstatus.c @@ -18,6 +18,10 @@ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <stdio.h> #include <errno.h> #include <string.h> @@ -32,10 +36,6 @@ #include "interface.h" #include "svn-revision.h" -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - int interface_auto_up = 0, interface_do_message = 0; int verbose = 0; diff --git a/src/interface.c b/src/interface.c index 6007172..21e304c 100644 --- a/src/interface.c +++ b/src/interface.c @@ -18,6 +18,10 @@ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <linux/sockios.h> #include <linux/if_ether.h> #include <sys/types.h> @@ -108,7 +112,7 @@ interface_status_t interface_detect_beat_mii(int fd, char *iface) { return IFSTATUS_ERR; } - return (((unsigned short*) &ifr.ifr_data)[3] & 0x0016) == 0x0004 ? IFSTATUS_UP : IFSTATUS_DOWN; + return (((unsigned short*) &ifr.ifr_data)[3] & 0x0004) ? IFSTATUS_UP : IFSTATUS_DOWN; } interface_status_t interface_detect_beat_priv(int fd, char *iface) { @@ -136,7 +140,7 @@ interface_status_t interface_detect_beat_priv(int fd, char *iface) { return IFSTATUS_ERR; } - return (((unsigned short*) &ifr.ifr_data)[3] & 0x0016) == 0x0004 ? IFSTATUS_UP : IFSTATUS_DOWN; + return (((unsigned short*) &ifr.ifr_data)[3] & 0x0004) ? IFSTATUS_UP : IFSTATUS_DOWN; } interface_status_t interface_detect_beat_ethtool(int fd, char *iface) { diff --git a/src/nlapi.c b/src/nlapi.c index 3fd0ed6..91865f5 100644 --- a/src/nlapi.c +++ b/src/nlapi.c @@ -18,6 +18,10 @@ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <stdio.h> #include <string.h> #include <unistd.h> |