Subject: Syslogd suggested change
To: None <current-users@NetBSD.ORG>
From: D'Arcy J.M. Cain <darcy@druid.com>
List: current-users
Date: 11/21/1996 07:15:11
I'm going through my local changes to the tree and thought I would share
some in case others think they are generally useful.  Some have been sent in
as bug reports over the last few years but appear to have been lost.  In
any case I will post here to pick up others thoughts and sendpr if I
see a consensus.

First is a small change to syslogd.c to change the output format.  I find
it confusing to have output that mixes octal and decial, especially when
there is no indication of what it is anyway.  This diff changes the
output to use hex for both the priority and the flags and also uses "0x"
to make the base obvious.

*** ../src.original/./usr.sbin/syslogd/syslogd.c	Mon Nov 18 18:01:15 1996
--- ./usr.sbin/syslogd/syslogd.c	Fri Feb  9 07:03:21 1996
***************
*** 482,488 ****
  	int fac, msglen, omask, prilev;
  	char *timestamp;
  
! 	dprintf("logmsg: pri %o, flags %x, from %s, msg %s\n",
  	    pri, flags, from, msg);
  
  	omask = sigblock(sigmask(SIGHUP)|sigmask(SIGALRM));
--- 482,488 ----
  	int fac, msglen, omask, prilev;
  	char *timestamp;
  
! 	dprintf("logmsg: pri 0x%02x, flags 0x%02x, from %s, msg %s\n",
  	    pri, flags, from, msg);
  
  	omask = sigblock(sigmask(SIGHUP)|sigmask(SIGALRM));


-- 
D'Arcy J.M. Cain                           |  Democracy is three wolves
darcy@{druid.com|vex.net}                  |  and a sheep voting on         
+1 416 943 5281     (DoD#0082)    (eNTP)   |  what's for dinner.
                --  http://www.druid.com/darcy  --