Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
6b3510c1
Commit
6b3510c1
authored
Feb 16, 2015
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor nit-picking
parent
e83269dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
+16
-10
mgt_main.c
bin/varnishd/mgt/mgt_main.c
+16
-10
No files found.
bin/varnishd/mgt/mgt_main.c
View file @
6b3510c1
...
...
@@ -562,10 +562,14 @@ main(int argc, char * const *argv)
argc
-=
optind
;
argv
+=
optind
;
if
(
argc
!=
0
)
ARGV_ERR
(
"Too many arguments (%s...)
\n
"
,
argv
[
0
]);
if
(
M_arg
!=
NULL
&&
*
M_arg
==
'\0'
)
M_arg
=
NULL
;
if
(
T_arg
!=
NULL
&&
*
T_arg
==
'\0'
)
T_arg
=
NULL
;
/* XXX: we can have multiple CLI actions above, is this enough ? */
if
(
cli
[
0
].
result
!=
CLIS_OK
)
{
AZ
(
VSB_finish
(
cli
[
0
].
sb
));
...
...
@@ -584,10 +588,10 @@ main(int argc, char * const *argv)
ARGV_ERR
(
"At least one of -d, -b, -f, -M or -T "
"must be specified
\n
"
);
if
(
S_arg
!=
NULL
&&
*
S_arg
==
'\0'
)
if
(
S_arg
!=
NULL
&&
*
S_arg
==
'\0'
)
{
fprintf
(
stderr
,
"Warning: Empty -S argument, no CLI authentication.
\n
"
);
else
if
(
S_arg
!=
NULL
)
{
}
else
if
(
S_arg
!=
NULL
)
{
o
=
open
(
S_arg
,
O_RDONLY
,
0
);
if
(
o
<
0
)
ARGV_ERR
(
"Cannot open -S file (%s): %s
\n
"
,
...
...
@@ -605,11 +609,11 @@ main(int argc, char * const *argv)
if
(
VIN_N_Arg
(
n_arg
,
&
heritage
.
name
,
&
dirname
,
NULL
)
!=
0
)
ARGV_ERR
(
"Invalid instance (-n) name: %s
\n
"
,
strerror
(
errno
));
if
(
i_arg
!=
NULL
&&
snprintf
(
heritage
.
identity
,
sizeof
heritage
.
identity
,
"%s"
,
i_arg
)
>
sizeof
heritage
.
identity
)
ARGV_ERR
(
"Invalid identity (-i) name: %s
\n
"
,
strerror
(
ENAMETOOLONG
));
if
(
i_arg
!=
NULL
)
{
if
(
strlen
(
i_arg
)
+
1
>
sizeof
heritage
.
identity
)
ARGV_ERR
(
"Identity (-i) name too long.
\n
"
);
strncpy
(
heritage
.
identity
,
i_arg
,
sizeof
heritage
.
identity
);
}
if
(
n_arg
!=
NULL
)
openlog
(
n_arg
,
LOG_PID
,
LOG_LOCAL0
);
/* XXX: i_arg ? */
...
...
@@ -658,8 +662,10 @@ main(int argc, char * const *argv)
if
(
b_arg
==
NULL
&&
f_arg
==
NULL
)
{
fprintf
(
stderr
,
"Warning: Neither -b nor -f given, won't start a worker child.
\n
"
" Master process started, use varnishadm to control it.
\n
"
);
"Warning: Neither -b nor -f given,"
" won't start a worker child.
\n
"
" Master process started,"
" use varnishadm to control it.
\n
"
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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