diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 34 | ||||
-rw-r--r-- | src/ifmonitor.c | 6 | ||||
-rw-r--r-- | src/ifplugd.c | 6 | ||||
-rw-r--r-- | src/interface.c | 4 | ||||
-rw-r--r-- | src/nlapi.c | 7 | ||||
-rw-r--r-- | src/wireless.h | 27 |
6 files changed, 65 insertions, 19 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index e0831c5..87176bc 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,4 @@ -# $Id: Makefile.am 22 2003-06-15 16:36:33Z lennart $ +# $Id$ # This file is part of ifplugd. # @@ -16,22 +16,40 @@ # along with ifplugd; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. +MAINTAINERCLEANFILES = svn-revision.h + AM_CFLAGS = -DSYSCONFDIR="\"$(sysconfdir)\"" sbin_PROGRAMS = ifplugd ifstatus -ifplugd_SOURCES = ifplugd.c interface.c interface.h ethtool-kernel.h ethtool-local.h svn-revision.h wireless.15.h ifmonitor.h ifmonitor.c nlapi.h nlapi.c -ifstatus_SOURCES = ifstatus.c interface.c interface.h ethtool-kernel.h ethtool-local.h svn-revision.h wireless.15.h -MAINTAINERCLEANFILES = svn-revision.h +ifplugd_SOURCES = ifplugd.c \ + interface.c interface.h \ + ethtool-kernel.h ethtool-local.h \ + wireless.h wireless.15.h \ + ifmonitor.h ifmonitor.c \ + nlapi.h nlapi.c + +ifstatus_SOURCES = ifstatus.c \ + interface.c interface.h \ + ethtool-kernel.h ethtool-local.h \ + wireless.h wireless.15.h -ifplugd.o: svn-revision.h -ifstatus.o: svn-revision.h +EXTRA_DIST = svn-revision.h + +BUILT_SOURCES = svn-revision.h + +ifstatus.$(OBJEXT): svn-revision.h +ifplugd.$(OBJEXT): svn-revision.h svn-revision.h: Makefile if test -d "$(top_srcdir)/.svn" ; then \ if REV=`svn info "$(top_srcdir)" | grep ^Revision | cut -f2 -d" "` 2> /dev/null ; then \ echo -e "#ifndef foosvnrevisionhfoo\n#define foosvnrevisionhfoo\n#define SVN_REVISION \"$$REV\"\n#endif" > $@ ; \ fi \ - else \ - test -f $@ || touch $@ ; \ fi + +svnkeywords: + rm -f svn-revision.h + svn propset svn:keywords Id *.c *.h Makefile.am + +.PHONY: svnkeywords diff --git a/src/ifmonitor.c b/src/ifmonitor.c index d49160b..83e9bb8 100644 --- a/src/ifmonitor.c +++ b/src/ifmonitor.c @@ -1,4 +1,4 @@ -/* $Id: ifplugd.c 1.12 Sat, 01 Feb 2003 03:00:07 +0100 lennart $ */ +/* $Id$ */ /* * This file is part of ifplugd. @@ -28,6 +28,8 @@ #include <unistd.h> #include <errno.h> +#include <libdaemon/dlog.h> + #include "nlapi.h" static int callback(struct nlmsghdr *n, void *u) { @@ -42,7 +44,7 @@ static int callback(struct nlmsghdr *n, void *u) { i = NLMSG_DATA(n); if (n->nlmsg_len < NLMSG_LENGTH(sizeof(struct ifinfomsg))) { - fprintf(stderr, "NETLINK: Packet too small or truncated! (2)\n"); + daemon_log(LOG_ERR, "NETLINK: Packet too small or truncated! (2)\n"); return -1; } diff --git a/src/ifplugd.c b/src/ifplugd.c index 645efc5..0547808 100644 --- a/src/ifplugd.c +++ b/src/ifplugd.c @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ -/* $Id: ifplugd.c 1.12 Sat, 01 Feb 2003 03:00:07 +0100 lennart $ */ +/* $Id$ */ /* * This file is part of ifplugd. @@ -761,7 +761,7 @@ void parse_args(int argc, char *argv[]) { case 'w': api_mode = API_WLAN; break; case 'a': api_mode = API_AUTO; break; default: - fprintf(stderr, "Unknown API mode: %s\n", optarg); + daemon_log(LOG_ERR, "Unknown API mode: %s\n", optarg); exit(2); } break; @@ -790,7 +790,7 @@ void parse_args(int argc, char *argv[]) { use_ifmonitor = !use_ifmonitor; break; default: - fprintf(stderr, "Unknown parameter.\n"); + daemon_log(LOG_ERR, "Unknown parameter.\n"); exit(1); } } diff --git a/src/interface.c b/src/interface.c index 8f0a8f1..b6f1ee6 100644 --- a/src/interface.c +++ b/src/interface.c @@ -1,4 +1,4 @@ -/* $Id: interface.c 1.4 Thu, 07 Nov 2002 22:27:37 +0100 lennart $ */ +/* $Id$ */ /* * This file is part of ifplugd. @@ -35,7 +35,7 @@ #include "ethtool-local.h" #include "interface.h" -#include "wireless.15.h" +#include "wireless.h" #include <libdaemon/dlog.h> diff --git a/src/nlapi.c b/src/nlapi.c index 33b222b..3fd0ed6 100644 --- a/src/nlapi.c +++ b/src/nlapi.c @@ -1,4 +1,4 @@ -/* $Id: ifplugd.c 1.12 Sat, 01 Feb 2003 03:00:07 +0100 lennart $ */ +/* $Id$ */ /* * This file is part of ifplugd. @@ -43,7 +43,7 @@ int nlapi_open(uint32_t groups) { struct sockaddr_nl addr; if ((nlapi_fd = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE)) < 0) { - fprintf(stderr, "socket(PF_NETLINK): %s\n", strerror(errno)); + daemon_log(LOG_ERR, "socket(PF_NETLINK): %s\n", strerror(errno)); return -1; } @@ -54,7 +54,7 @@ int nlapi_open(uint32_t groups) { if (bind(nlapi_fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) { close(nlapi_fd); - fprintf(stderr, "bind(): %s\n", strerror(errno)); + daemon_log(LOG_ERR, "bind(): %s\n", strerror(errno)); return -1; } @@ -104,7 +104,6 @@ void nlapi_close(void) { close(nlapi_fd); nlapi_fd = -1; - while (callbacks) { struct callback_info *c = callbacks; callbacks = callbacks->next; diff --git a/src/wireless.h b/src/wireless.h new file mode 100644 index 0000000..0a4ef2e --- /dev/null +++ b/src/wireless.h @@ -0,0 +1,27 @@ +#ifndef foowirelesshfoo +#define foowirelesshfoo + +/* $Id$ */ + +/* + * This file is part of waproamd. + * + * waproamd is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * waproamd is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with waproamd; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + */ + +#include <linux/if.h> +#include "wireless.15.h" + +#endif |