Home | History | Annotate | Download | only in newsyslog

Lines Matching defs:logfile

91 #define	CE_BINARY	0x02	/* Logfile is a binary file/non-syslog */
110 char logfile[MAXPATHLEN]; /* Path to log file */
221 if (strcmp(log.logfile, argv[i]) == 0)
277 (void)strlcpy(log->logfile, *ap++, sizeof(log->logfile));
278 if (log->logfile[0] != '/')
280 "config line %d: logfile must have a full path", lineno);
438 PRHDRINFO(("\n%s <%d%s>: ", log->logfile, log->numhist,
442 * stat() the logfile. If it doesn't exist and the `c' flag has
446 if (stat(log->logfile, &sb) < 0) {
455 if (stat(log->logfile, &sb))
456 err(EXIT_FAILURE, "%s", log->logfile);
461 err(EXIT_FAILURE, "%s", log->logfile);
486 (void)strlcpy(tmp, log->logfile, sizeof(tmp));
544 log->logfile, log->numhist - 1);
561 snprintf(file1, sizeof(file1), "%s.%d", log->logfile, i);
575 snprintf(file1, sizeof(file1), "%s.%d%s", log->logfile,
577 snprintf(file2, sizeof(file2), "%s.%d%s", log->logfile,
604 PRINFO(("rm -f %s\n", log->logfile));
606 if (unlink(log->logfile))
607 err(EXIT_FAILURE, "%s", log->logfile);
609 (void)snprintf(file1, sizeof(file1), "%s.0", log->logfile);
610 PRINFO(("mv %s %s\n", log->logfile, file1));
612 if (rename(log->logfile, file1))
613 err(EXIT_FAILURE, "%s", log->logfile);
621 PRINFO(("chmod %o %s\n", log->mode, log->logfile));
623 if (chmod(log->logfile, log->mode))
624 logfile);
644 snprintf(file1, sizeof(file1), "%s.0", log->logfile);
662 PRINFO(("(read line format of %s)\n", log->logfile));
666 if ((fd = fopen(log->logfile, "r")) == NULL)
690 PRINFO(("(append rotation notice to %s)\n", log->logfile));
694 if ((fd = fopen(log->logfile, "at")) == NULL)
695 err(EXIT_FAILURE, "%s", log->logfile);
759 if ((fd = creat(log->logfile, log->mode)) < 0)
760 err(EXIT_FAILURE, "%s", log->logfile);
762 err(EXIT_FAILURE, "%s", log->logfile);