Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/syslogd add aliases for the protocol format



details:   https://anonhg.NetBSD.org/src/rev/13614289d946
branches:  trunk
changeset: 778474:13614289d946
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Mar 28 17:39:33 2012 +0000

description:
add aliases for the protocol format

diffstat:

 usr.sbin/syslogd/syslogd.8 |  8 ++++----
 usr.sbin/syslogd/syslogd.c |  9 +++++----
 2 files changed, 9 insertions(+), 8 deletions(-)

diffs (61 lines):

diff -r d9671b192b0b -r 13614289d946 usr.sbin/syslogd/syslogd.8
--- a/usr.sbin/syslogd/syslogd.8        Wed Mar 28 17:04:41 2012 +0000
+++ b/usr.sbin/syslogd/syslogd.8        Wed Mar 28 17:39:33 2012 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: syslogd.8,v 1.49 2009/10/15 20:35:07 plunky Exp $
+.\"    $NetBSD: syslogd.8,v 1.50 2012/03/28 17:39:33 christos Exp $
 .\"
 .\" Copyright (c) 1983, 1986, 1991, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"     from: @(#)syslogd.8    8.1 (Berkeley) 6/6/93
 .\"
-.Dd October 15, 2009
+.Dd March 28, 2012
 .Dt SYSLOGD 8
 .Os
 .Sh NAME
@@ -97,9 +97,9 @@
 .It Fl o Ar output_format
 Select output message format.
 .Bl -hang
-.It Em rfc3164
+.It Em bsd , rfc3164
 traditional BSD Syslog format (default)
-.It Em syslog
+.It Em syslog , rfc5424
 new syslog-protocol format
 .El
 .It Fl P
diff -r d9671b192b0b -r 13614289d946 usr.sbin/syslogd/syslogd.c
--- a/usr.sbin/syslogd/syslogd.c        Wed Mar 28 17:04:41 2012 +0000
+++ b/usr.sbin/syslogd/syslogd.c        Wed Mar 28 17:39:33 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: syslogd.c,v 1.105 2011/08/31 16:25:00 plunky Exp $     */
+/*     $NetBSD: syslogd.c,v 1.106 2012/03/28 17:39:33 christos Exp $   */
 
 /*
  * Copyright (c) 1983, 1988, 1993, 1994
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)syslogd.c  8.3 (Berkeley) 4/4/94";
 #else
-__RCSID("$NetBSD: syslogd.c,v 1.105 2011/08/31 16:25:00 plunky Exp $");
+__RCSID("$NetBSD: syslogd.c,v 1.106 2012/03/28 17:39:33 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -334,9 +334,10 @@
                        UseNameService = 0;
                        break;
                case 'o':               /* message format */
-                       if (!strncmp(optarg, "rfc3164", sizeof("rfc3164")-1))
+#define EQ(a)          (strncmp(optarg, # a, sizeof(# a) - 1) == 0)
+                       if (EQ(bsd) || EQ(rfc3264))
                                BSDOutputFormat = true;
-                       else if (!strncmp(optarg, "syslog", sizeof("syslog")-1))
+                       else if (EQ(syslog) || EQ(rfc5424))
                                BSDOutputFormat = false;
                        else
                                usage();



Home | Main Index | Thread Index | Old Index