summaryrefslogtreecommitdiffstats
path: root/usr.sbin/syslogd/syslogd.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/syslogd/syslogd.c')
-rw-r--r--usr.sbin/syslogd/syslogd.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c
index 0cfa84c..9a534e3 100644
--- a/usr.sbin/syslogd/syslogd.c
+++ b/usr.sbin/syslogd/syslogd.c
@@ -274,6 +274,7 @@ int family = PF_INET; /* protocol family (IPv4 only) */
#endif
int send_to_all = 0; /* send message to all IPv4/IPv6 addresses */
int use_bootfile = 0; /* log entire bootfile for every kern msg */
+int no_compress = 0; /* don't compress messages (1=pipes, 2=all) */
char bootfile[MAXLINE+1]; /* booted kernel file */
@@ -334,7 +335,7 @@ main(argc, argv)
socklen_t len;
bindhostname = NULL;
- while ((ch = getopt(argc, argv, "46Aa:b:df:kl:m:nop:P:suv")) != -1)
+ while ((ch = getopt(argc, argv, "46Aa:b:cdf:kl:m:nop:P:suv")) != -1)
switch (ch) {
case '4':
family = PF_INET;
@@ -354,6 +355,9 @@ main(argc, argv)
case 'b':
bindhostname = optarg;
break;
+ case 'c':
+ no_compress++;
+ break;
case 'd': /* debug */
Debug++;
break;
@@ -865,7 +869,8 @@ logmsg(pri, msg, from, flags)
/*
* suppress duplicate lines to this file
*/
- if ((flags & MARK) == 0 && msglen == f->f_prevlen &&
+ if (no_compress - (f->f_type != F_PIPE) < 1 &&
+ (flags & MARK) == 0 && msglen == f->f_prevlen &&
!strcmp(msg, f->f_prevline) &&
!strcasecmp(from, f->f_prevhost)) {
(void)strlcpy(f->f_lasttime, timestamp, 16);
OpenPOWER on IntegriCloud