version 1.44, 2002/06/12 06:07:16 |
version 1.45, 2002/06/26 23:36:14 |
|
|
#define CE_BINARY 0x04 /* Logfile is in binary, don't add */ |
#define CE_BINARY 0x04 /* Logfile is in binary, don't add */ |
/* status messages */ |
/* status messages */ |
#define CE_MONITOR 0x08 /* Monitory for changes */ |
#define CE_MONITOR 0x08 /* Monitory for changes */ |
|
#define CE_FOLLOW 0x10 /* Follow symbolic links */ |
#define NONE -1 |
#define NONE -1 |
|
|
struct conf_entry { |
struct conf_entry { |
|
|
|
|
{ |
{ |
int modtime, size; |
int modtime, size; |
|
struct stat sta; |
|
|
|
if (!(ent->flags & CE_FOLLOW)) { |
|
if (lstat(ent->log, &sta) != 0) |
|
return; |
|
if ((sta.st_mode & S_IFLNK) != S_IFREG) { |
|
if (verbose) { |
|
printf("--> %s is not a regular file, skip\n", |
|
ent->log); |
|
return; |
|
} |
|
} |
|
} |
|
|
if (verbose) |
if (verbose) |
printf("%s <%d%s>: ", ent->log, ent->numlogs, |
printf("%s <%d%s>: ", ent->log, ent->numlogs, |
(ent->flags & CE_COMPACT) ? "Z" : ""); |
(ent->flags & CE_COMPACT) ? "Z" : ""); |
|
|
case 'M': |
case 'M': |
case 'm': |
case 'm': |
working->flags |= CE_MONITOR; |
working->flags |= CE_MONITOR; |
|
break; |
|
case 'F': |
|
case 'f': |
|
working->flags |= CE_FOLLOW; |
break; |
break; |
default: |
default: |
errx(1, "Illegal flag in config file: %c", *q); |
errx(1, "Illegal flag in config file: %c", *q); |