Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
0e1679a0
Commit
0e1679a0
authored
Jun 23, 2014
by
Leigh B Stoller
Browse files
Add -l option to set the log path. Used on XEN.
parent
4779dfd9
Changes
1
Hide whitespace changes
Inline
Side-by-side
capture/capture.c
View file @
0e1679a0
...
...
@@ -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:PmMLC
l:
"
))
!=
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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment