Commit 0e1679a0 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Add -l option to set the log path. Used on XEN.

parent 4779dfd9
......@@ -357,7 +357,7 @@ sslverify(SSL *ssl, char *requiredunit)
int
main(int argc, char **argv)
{
char strbuf[MAXPATHLEN], *newstr();
char strbuf[MAXPATHLEN], *newstr(), *logpath = LOGPATH;
int op, i;
struct sigaction sa;
extern int optind;
......@@ -371,7 +371,7 @@ main(int argc, char **argv)
else
Progname = *argv;
while ((op = getopt(argc, argv, "rds:Hb:ip:c:T:aonu:v:PmMLC")) != EOF)
while ((op = getopt(argc, argv, "rds:Hb:ip:c:T:aonu:v:PmMLCl:")) != EOF)
switch (op) {
#ifdef USESOCKETS
#ifdef WITHSSL
......@@ -422,6 +422,9 @@ main(int argc, char **argv)
case 'n':
nologfile = 1;
break;
case 'l':
logpath = optarg;
break;
case 'L':
stamplast = 1;
break;
......@@ -466,9 +469,9 @@ main(int argc, char **argv)
(void) snprintf(strbuf, sizeof(strbuf), PIDNAME, LOGPATH, argv[0]);
Pidname = newstr(strbuf);
(void) snprintf(strbuf, sizeof(strbuf), LOGNAME, LOGPATH, argv[0]);
(void) snprintf(strbuf, sizeof(strbuf), LOGNAME, logpath, argv[0]);
Logname = newstr(strbuf);
(void) snprintf(strbuf, sizeof(strbuf), RUNNAME, LOGPATH, argv[0]);
(void) snprintf(strbuf, sizeof(strbuf), RUNNAME, logpath, argv[0]);
Runname = newstr(strbuf);
(void) snprintf(strbuf, sizeof(strbuf), TTYNAME, TIPPATH, argv[0]);
Ttyname = newstr(strbuf);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment