[BACK]Return to newsyslog.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / newsyslog

Diff for /src/usr.bin/newsyslog/newsyslog.c between version 1.48 and 1.49

version 1.48, 2002/09/13 00:16:13 version 1.49, 2002/09/13 18:50:09
Line 136 
Line 136 
 #define CE_FOLLOW       0x10            /* Follow symbolic links */  #define CE_FOLLOW       0x10            /* Follow symbolic links */
 #define NONE -1  #define NONE -1
   
   #define MIN_PID         4               /* Don't touch pids lower than this */
   #define MIN_SIZE        512             /* Don't rotate if smaller than this */
   
 struct conf_entry {  struct conf_entry {
         char    *log;           /* Name of the log */          char    *log;           /* Name of the log */
         uid_t   uid;            /* Owner of log */          uid_t   uid;            /* Owner of log */
Line 163 
Line 166 
 int     monitormode = 0;        /* Don't do monitoring by default */  int     monitormode = 0;        /* Don't do monitoring by default */
 char    *conf = CONF;           /* Configuration file to use */  char    *conf = CONF;           /* Configuration file to use */
 time_t  timenow;  time_t  timenow;
 #define MIN_PID         4  
 char    hostname[MAXHOSTNAMELEN]; /* hostname */  char    hostname[MAXHOSTNAMELEN]; /* hostname */
 char    *daytime;               /* timenow in human readable form */  char    *daytime;               /* timenow in human readable form */
   
Line 292 
Line 294 
                         printf(" age (hr): %d [%d] ", modtime, ent->hours);                          printf(" age (hr): %d [%d] ", modtime, ent->hours);
                 if (monitormode && ent->flags & CE_MONITOR)                  if (monitormode && ent->flags & CE_MONITOR)
                         domonitor(ent->log, ent->whom);                          domonitor(ent->log, ent->whom);
                 if (!monitormode && (((ent->size > 0) && (size >= ent->size)) ||                  if (!monitormode && ((ent->size > 0 && size >= ent->size) ||
                     ((ent->hours > 0) && ((modtime >= ent->hours) ||                      (ent->hours > 0 && (modtime >= ent->hours || modtime < 0)
                     (modtime < 0))))) {                      && ((ent->flags & CE_BINARY) || size >= MIN_SIZE)))) {
                         if (verbose)                          if (verbose)
                                 printf("--> trimming log....\n");                                  printf("--> trimming log....\n");
                         if (noaction && !verbose)                          if (noaction && !verbose)

Legend:
Removed from v.1.48  
changed lines
  Added in v.1.49