diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-10-24 09:00:29 +0400 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-10-24 09:00:29 +0400 |
commit | bdfd0d78bc44e73d693510e70087857785b3b521 (patch) | |
tree | 153a573095afac8d8d0ea857759ecabd77fb28b7 /sysklogd | |
parent | 9260fc5552a3ee52eb95823aa6689d52a1ffd33c (diff) |
Major rework of the directory structure and the entire build system.
-Erik
Diffstat (limited to 'sysklogd')
-rw-r--r-- | sysklogd/Makefile | 38 | ||||
-rw-r--r-- | sysklogd/config.in | 16 | ||||
-rw-r--r-- | sysklogd/klogd.c | 4 | ||||
-rw-r--r-- | sysklogd/logger.c | 6 | ||||
-rw-r--r-- | sysklogd/logread.c | 2 | ||||
-rw-r--r-- | sysklogd/syslogd.c | 30 |
6 files changed, 75 insertions, 21 deletions
diff --git a/sysklogd/Makefile b/sysklogd/Makefile new file mode 100644 index 000000000..3bfe90324 --- /dev/null +++ b/sysklogd/Makefile @@ -0,0 +1,38 @@ +# Makefile for busybox +# +# Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org> +# +# This program 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. +# +# This program 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 this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + +TOPDIR :=.. +L_TARGET := sysklogd.a + +obj-y := +obj-n := +obj- := + + +obj-$(CONFIG_KLOGD) += klogd.o +obj-$(CONFIG_LOGGER) += logger.o +obj-$(CONFIG_LOGREAD) += logread.o +obj-$(CONFIG_SYSLOGD) += syslogd.o + +# Hand off to toplevel Rules.mak +include $(TOPDIR)/Rules.mak + +clean: + rm -f $(L_TARGET) *.o core + diff --git a/sysklogd/config.in b/sysklogd/config.in new file mode 100644 index 000000000..8a8e42086 --- /dev/null +++ b/sysklogd/config.in @@ -0,0 +1,16 @@ +# +# For a description of the syntax of this configuration file, +# see scripts/kbuild/config-language.txt. +# + +mainmenu_option next_comment +comment 'System Logging Utilities' + +bool 'klogd' CONFIG_KLOGD +bool 'logger' CONFIG_LOGGER +bool 'logread' CONFIG_LOGREAD +bool 'syslogd' CONFIG_SYSLOGD + + +endmenu + diff --git a/sysklogd/klogd.c b/sysklogd/klogd.c index d7b54e9c8..33bc783fe 100644 --- a/sysklogd/klogd.c +++ b/sysklogd/klogd.c @@ -6,8 +6,8 @@ * Changes: Made this a standalone busybox module which uses standalone * syslog() client interface. * - * Copyright (C) 1999,2000,2001 by Lineo, inc. - * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> + * Copyright (C) 1999,2000 by Lineo, inc. and Erik Andersen + * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org> * * Copyright (C) 2000 by Karl M. Hegbloom <karlheg@debian.org> * diff --git a/sysklogd/logger.c b/sysklogd/logger.c index 9f730915f..380bde5ca 100644 --- a/sysklogd/logger.c +++ b/sysklogd/logger.c @@ -2,8 +2,8 @@ /* * Mini logger implementation for busybox * - * Copyright (C) 1999,2000,2001 by Lineo, inc. - * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> + * Copyright (C) 1999,2000 by Lineo, inc. and Erik Andersen + * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -30,7 +30,7 @@ #include <stdlib.h> #include "busybox.h" -#if !defined BB_SYSLOGD +#if !defined CONFIG_SYSLOGD #define SYSLOG_NAMES #include <sys/syslog.h> diff --git a/sysklogd/logread.c b/sysklogd/logread.c index d3349625c..13ff1aeb9 100644 --- a/sysklogd/logread.c +++ b/sysklogd/logread.c @@ -38,7 +38,7 @@ #if __GNU_LIBRARY__ < 5 #error Sorry. Looks like you are using libc5. #error libc5 shm support isnt good enough. -#error Please disable BB_FEATURE_IPC_SYSLOG +#error Please disable CONFIG_FEATURE_IPC_SYSLOG #endif diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c index 25bc68f20..db6401c52 100644 --- a/sysklogd/syslogd.c +++ b/sysklogd/syslogd.c @@ -2,8 +2,8 @@ /* * Mini syslogd implementation for busybox * - * Copyright (C) 1999,2000,2001 by Lineo, inc. - * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> + * Copyright (C) 1999,2000 by Lineo, inc. and Erik Andersen + * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org> * * Copyright (C) 2000 by Karl M. Hegbloom <karlheg@debian.org> * @@ -65,7 +65,7 @@ static int MarkInterval = 20 * 60; /* localhost's name */ static char LocalHostName[32]; -#ifdef BB_FEATURE_REMOTE_LOG +#ifdef CONFIG_FEATURE_REMOTE_LOG #include <netinet/in.h> /* udp socket for logging to remote host */ static int remotefd = -1; @@ -79,7 +79,7 @@ static int local_logging = FALSE; #endif /* circular buffer variables/structures */ -#ifdef BB_FEATURE_IPC_SYSLOG +#ifdef CONFIG_FEATURE_IPC_SYSLOG #include <sys/ipc.h> #include <sys/sem.h> @@ -269,7 +269,7 @@ static void message (char *fmt, ...) fl.l_start = 0; fl.l_len = 1; -#ifdef BB_FEATURE_IPC_SYSLOG +#ifdef CONFIG_FEATURE_IPC_SYSLOG if ((circular_logging == TRUE) && (buf != NULL)){ char b[1024]; va_start (arguments, fmt); @@ -339,7 +339,7 @@ static void logMessage (int pri, char *msg) /* todo: supress duplicates */ -#ifdef BB_FEATURE_REMOTE_LOG +#ifdef CONFIG_FEATURE_REMOTE_LOG /* send message to remote logger */ if ( -1 != remotefd){ static const int IOV_COUNT = 2; @@ -372,7 +372,7 @@ static void quit_signal(int sig) { logMessage(LOG_SYSLOG | LOG_INFO, "System log daemon exiting."); unlink(lfile); -#ifdef BB_FEATURE_IPC_SYSLOG +#ifdef CONFIG_FEATURE_IPC_SYSLOG ipcsyslog_cleanup(); #endif @@ -392,7 +392,7 @@ static void domark(int sig) #define BUFSIZE 1023 static int serveConnection (int conn) { - RESERVE_BB_BUFFER(tmpbuf, BUFSIZE + 1); + RESERVE_CONFIG_BUFFER(tmpbuf, BUFSIZE + 1); int n_read; char *p = tmpbuf; @@ -433,12 +433,12 @@ static int serveConnection (int conn) /* Now log it */ logMessage (pri, line); } - RELEASE_BB_BUFFER (tmpbuf); + RELEASE_CONFIG_BUFFER (tmpbuf); return n_read; } -#ifdef BB_FEATURE_REMOTE_LOG +#ifdef CONFIG_FEATURE_REMOTE_LOG static void init_RemoteLog (void){ struct sockaddr_in remoteaddr; @@ -512,13 +512,13 @@ static void doSyslogd (void) FD_ZERO (&fds); FD_SET (sock_fd, &fds); -#ifdef BB_FEATURE_IPC_SYSLOG +#ifdef CONFIG_FEATURE_IPC_SYSLOG if (circular_logging == TRUE ){ ipcsyslog_init(); } #endif - #ifdef BB_FEATURE_REMOTE_LOG + #ifdef CONFIG_FEATURE_REMOTE_LOG if (doRemoteLog == TRUE){ init_RemoteLog(); } @@ -585,7 +585,7 @@ extern int syslogd_main(int argc, char **argv) case 'O': logFilePath = strdup(optarg); break; -#ifdef BB_FEATURE_REMOTE_LOG +#ifdef CONFIG_FEATURE_REMOTE_LOG case 'R': RemoteHost = strdup(optarg); if ( (p = strchr(RemoteHost, ':'))){ @@ -598,7 +598,7 @@ extern int syslogd_main(int argc, char **argv) local_logging = TRUE; break; #endif -#ifdef BB_FEATURE_IPC_SYSLOG +#ifdef CONFIG_FEATURE_IPC_SYSLOG case 'C': circular_logging = TRUE; break; @@ -608,7 +608,7 @@ extern int syslogd_main(int argc, char **argv) } } -#ifdef BB_FEATURE_REMOTE_LOG +#ifdef CONFIG_FEATURE_REMOTE_LOG /* If they have not specified remote logging, then log locally */ if (doRemoteLog == FALSE) local_logging = TRUE; |