Change command line option for log rotation, from -b/-c --> -R b:c
We want to use -b for binding to an address:port, like FreeBSD/NetBSD supports using this option. Unfortunately breaks existing setups in the wild already. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
20
src/logger.c
20
src/logger.c
@ -219,26 +219,6 @@ static int usage(int code)
|
||||
return code;
|
||||
}
|
||||
|
||||
static void parse_rotation(char *optarg, off_t *size, int *num)
|
||||
{
|
||||
char buf[100];
|
||||
char *c;
|
||||
int sz = 0, cnt = 0;
|
||||
|
||||
strlcpy(buf, optarg, sizeof(buf));
|
||||
c = strchr(buf, ':');
|
||||
if (c) {
|
||||
*c++ = 0;
|
||||
cnt = atoi(c);
|
||||
}
|
||||
|
||||
sz = strtobytes(buf);
|
||||
if (sz > 0)
|
||||
*size = sz;
|
||||
if (cnt)
|
||||
*num = cnt;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int c, rc, num = 5;
|
||||
|
Reference in New Issue
Block a user