diff options
author | phk <phk@FreeBSD.org> | 1998-05-19 12:02:41 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1998-05-19 12:02:41 +0000 |
commit | 9abae418f86124c7e660b19ba8ead1e93bd1ce41 (patch) | |
tree | f1d57f0c908bc711e51c3e670ead61b5ac37f124 /usr.sbin/syslogd | |
parent | 8bc69f7d317c15e01651f30636bd9471de3c8bee (diff) | |
download | FreeBSD-src-9abae418f86124c7e660b19ba8ead1e93bd1ce41.zip FreeBSD-src-9abae418f86124c7e660b19ba8ead1e93bd1ce41.tar.gz |
Remove a bogus dependency on the size of the inkernel msgbuf.
This change is likely to introduce a few linebreaks in the boot
messages, but that is not easy to solve without breaking syslogd
semantics. Maybe the right fix is to return an integral number
of lines from the kernel driver.
Noticed by: dg
Diffstat (limited to 'usr.sbin/syslogd')
-rw-r--r-- | usr.sbin/syslogd/syslogd.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 6a55c35..3cd6353 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -42,7 +42,7 @@ static const char copyright[] = static char sccsid[] = "@(#)syslogd.c 8.3 (Berkeley) 4/4/94"; #endif static const char rcsid[] = - "$Id: syslogd.c,v 1.30 1998/04/24 17:32:23 phk Exp $"; + "$Id: syslogd.c,v 1.31 1998/05/07 00:39:56 brian Exp $"; #endif /* not lint */ /* @@ -81,7 +81,6 @@ static const char rcsid[] = #include <sys/stat.h> #include <sys/wait.h> #include <sys/socket.h> -#include <sys/msgbuf.h> #include <sys/queue.h> #include <sys/uio.h> #include <sys/un.h> @@ -287,7 +286,7 @@ main(argc, argv) struct sockaddr_un sunx, fromunix; struct sockaddr_in sin, frominet; FILE *fp; - char *p, *hname, line[MSG_BSIZE + 1]; + char *p, *hname, line[MAXLINE + 1]; struct timeval tv, *tvp; pid_t ppid; @@ -432,7 +431,7 @@ main(argc, argv) } dprintf("got a message (%d, %#x)\n", nfds, readfds); if (readfds & klogm) { - i = read(fklog, line, sizeof(line) - 1); + i = read(fklog, line, MAXLINE - 1); if (i > 0) { line[i] = '\0'; printsys(line); |