diff options
| author | Garance A Drosehn <gad@FreeBSD.org> | 2003-09-09 20:29:26 +0000 |
|---|---|---|
| committer | Garance A Drosehn <gad@FreeBSD.org> | 2003-09-09 20:29:26 +0000 |
| commit | 1005e972cb68b21c18c98096eaac7a243d95ce96 (patch) | |
| tree | dff4b1a32b3a8821d1f0a3fb1da8d55448fd9ecd | |
| parent | 2c25d12414532c2b817f345fd10cdb199ef467bb (diff) | |
Notes
| -rw-r--r-- | usr.sbin/newsyslog/newsyslog.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/usr.sbin/newsyslog/newsyslog.c b/usr.sbin/newsyslog/newsyslog.c index 13a828701d34..4d45a52a5e66 100644 --- a/usr.sbin/newsyslog/newsyslog.c +++ b/usr.sbin/newsyslog/newsyslog.c @@ -140,9 +140,9 @@ static int parse_doption(const char *doption); static void usage(void); static void dotrim(const struct conf_entry *ent, char *log, int numdays, int flags); -static int log_trim(const char *log, const struct conf_entry *log_ent); -static void compress_log(char *log, int dowait); -static void bzcompress_log(char *log, int dowait); +static int log_trim(const char *logname, const struct conf_entry *log_ent); +static void compress_log(char *logname, int dowait); +static void bzcompress_log(char *logname, int dowait); static int sizefile(char *file); static int age_old_log(char *file); static int send_signal(const struct conf_entry *ent); @@ -1448,12 +1448,12 @@ dotrim(const struct conf_entry *ent, char *log, int numdays, int flags) /* Log the fact that the logs were turned over */ static int -log_trim(const char *log, const struct conf_entry *log_ent) +log_trim(const char *logname, const struct conf_entry *log_ent) { FILE *f; const char *xtra; - if ((f = fopen(log, "a")) == NULL) + if ((f = fopen(logname, "a")) == NULL) return (-1); xtra = ""; if (log_ent->def_cfg) @@ -1474,14 +1474,14 @@ log_trim(const char *log, const struct conf_entry *log_ent) /* Fork of gzip to compress the old log file */ static void -compress_log(char *log, int dowait) +compress_log(char *logname, int dowait) { pid_t pid; char tmp[MAXPATHLEN]; while (dowait && (wait(NULL) > 0 || errno == EINTR)) ; - (void) snprintf(tmp, sizeof(tmp), "%s.0", log); + (void) snprintf(tmp, sizeof(tmp), "%s.0", logname); pid = fork(); if (pid < 0) err(1, "gzip fork"); @@ -1493,14 +1493,14 @@ compress_log(char *log, int dowait) /* Fork of bzip2 to compress the old log file */ static void -bzcompress_log(char *log, int dowait) +bzcompress_log(char *logname, int dowait) { pid_t pid; char tmp[MAXPATHLEN]; while (dowait && (wait(NULL) > 0 || errno == EINTR)) ; - snprintf(tmp, sizeof(tmp), "%s.0", log); + snprintf(tmp, sizeof(tmp), "%s.0", logname); pid = fork(); if (pid < 0) err(1, "bzip2 fork"); |
