Package: syslogd
Version: 1.2-15

------- Start of forwarded message -------
From: [EMAIL PROTECTED] (Stephen R. van den Berg)
Date: Thu, 9 Nov 1995 16:33:04 +0100
To: [EMAIL PROTECTED]
Subject: patch for Debian sysklogd package

diff -p -C 2 -r -d --horizon-lines=3 sysklogd-1.2/debian.README 
sysklogd-1.2.new/debian.README
*** sysklogd-1.2/debian.README  Thu Sep  7 11:32:23 1995
--- sysklogd-1.2.new/debian.README      Thu Nov  9 16:26:45 1995
*************** Changes:
*** 13,16 ****
--- 13,20 ----
   * changed location of pid files to /var/run (FSSTND location)

+ Changes <[EMAIL PROTECTED]>:
+  * added -b option, to avoid fsyncing every time (performance win on heavy
+    sites)
+
  syslogd is Copyright (C) 1983, 1988 Regents of the University of California.

diff -p -C 2 -r -d --horizon-lines=3 sysklogd-1.2/sysklogd.8 
sysklogd-1.2.new/sysklogd.8
*** sysklogd-1.2/sysklogd.8     Thu Sep  7 11:31:08 1995
--- sysklogd-1.2.new/sysklogd.8 Thu Nov  9 16:08:45 1995
*************** sysklogd \- Linux system logging utiliti
*** 8,12 ****
  .SH SYNOPSIS
  .B syslogd
! [\-d] [\-f config file] [\-m interval] [\-p socket]
  .LP
  .SH DESCRIPTION
--- 8,12 ----
  .SH SYNOPSIS
  .B syslogd
! [\-d] [\-b] [\-f config file] [\-m interval] [\-p socket]
  .LP
  .SH DESCRIPTION
*************** forground and write much debug informati
*** 60,63 ****
--- 60,68 ----
  DEBUGGING section for more information.
  .TP
+ .I "\-b"
+ Do buffered writes to the logfiles, do not fsync every logfile after
+ writing to it.  In case of a system crash, your logfiles may become
+ inaccurate.
+ .TP
  .I "\-f config file"
  Specify an alternative configuration file instead of
diff -p -C 2 -r -d --horizon-lines=3 sysklogd-1.2/syslogd.c 
sysklogd-1.2.new/syslogd.c
*** sysklogd-1.2/syslogd.c      Thu Oct 26 20:59:23 1995
--- sysklogd-1.2.new/syslogd.c  Thu Nov  9 16:28:11 1995
*************** struct code     FacNames[] = {
*** 315,318 ****
--- 315,319 ----

  int   Debug;                  /* debug flag */
+ int   Sync = 1;               /* fsync logfiles after writing */
  char  LocalHostName[MAXHOSTNAMELEN+1];        /* our hostname */
  char  *LocalDomain;           /* our local domain name */
*************** int main(argc, argv)
*** 373,381 ****
        extern char *optarg;

!       while ((ch = getopt(argc, argv, "df:m:p:")) != EOF)
                switch((char)ch) {
                case 'd':               /* debug */
                        Debug++;
                        break;
                case 'f':               /* configuration file */
                        ConfFile = optarg;
--- 374,385 ----
        extern char *optarg;

!       while ((ch = getopt(argc, argv, "dbf:m:p:")) != EOF)
                switch((char)ch) {
                case 'd':               /* debug */
                        Debug++;
                        break;
+               case 'b':               /* don't sync */
+                       Sync = 0;
+                       break;
                case 'f':               /* configuration file */
                        ConfFile = optarg;
*************** int main(argc, argv)
*** 607,611 ****
  int usage()
  {
!       fprintf(stderr, "usage: syslogd [-d] [-m markinterval] [-p path] [-f 
conffile]\n");
        exit(1);
  }
--- 611,616 ----
  int usage()
  {
!       fprintf(stderr,
!        "Usage: syslogd [-d] [-b] [-m markinterval] [-p path] [-f 
conffile]\n");
        exit(1);
  }
*************** void printline(hname, msg)
*** 757,761 ****
        *q = '\0';

!       logmsg(pri, line, hname, SYNC_FILE);
        return;
  }
--- 762,766 ----
        *q = '\0';

!       logmsg(pri, line, hname, Sync ? SYNC_FILE : 0);
        return;
  }
*************** void printsys(msg)
*** 779,783 ****
        lp = line + strlen(line);
        for (p = msg; *p != '\0'; ) {
!               flags = SYNC_FILE | ADDDATE;    /* fsync file after write */
                pri = DEFSPRI;
                if (*p == '<') {
--- 784,790 ----
        lp = line + strlen(line);
        for (p = msg; *p != '\0'; ) {
!               flags = ADDDATE;
!               if (Sync)
!                       flags |= SYNC_FILE;
                pri = DEFSPRI;
                if (*p == '<') {
--
Sincerely,                                                          [EMAIL 
PROTECTED]
           Stephen R. van den Berg (AKA BuGless).

"And now for something *completely* different!"

------- End of forwarded message -------

Reply via email to