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
9bca6f7b
Commit
9bca6f7b
authored
Feb 17, 2019
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
retire undocumented backend.list -v option
as agreed on -commit. Closes #2906
parent
a2a5cf1b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
18 deletions
+15
-18
cache_backend.c
bin/varnishd/cache/cache_backend.c
+5
-5
cache_director.c
bin/varnishd/cache/cache_director.c
+6
-12
changes.rst
doc/changes.rst
+3
-0
vrt.h
include/vrt.h
+1
-1
No files found.
bin/varnishd/cache/cache_backend.c
View file @
9bca6f7b
...
...
@@ -446,8 +446,8 @@ vbe_panic(const struct director *d, struct vsb *vsb)
*/
static
void
v_matchproto_
(
vdi_list_f
)
vbe_list
(
VRT_CTX
,
const
struct
director
*
d
,
struct
vsb
*
vsb
,
int
v
flag
,
int
pflag
,
int
jflag
)
vbe_list
(
VRT_CTX
,
const
struct
director
*
d
,
struct
vsb
*
vsb
,
int
p
flag
,
int
jflag
)
{
struct
backend
*
bp
;
...
...
@@ -457,12 +457,12 @@ vbe_list(VRT_CTX, const struct director *d, struct vsb *vsb, int vflag,
CAST_OBJ_NOTNULL
(
bp
,
d
->
priv
,
BACKEND_MAGIC
);
if
(
bp
->
probe
!=
NULL
)
VBP_Status
(
vsb
,
bp
,
vflag
|
pflag
,
jflag
);
else
if
(
jflag
&&
(
vflag
|
pflag
)
)
VBP_Status
(
vsb
,
bp
,
pflag
,
jflag
);
else
if
(
jflag
&&
pflag
)
VSB_printf
(
vsb
,
"{},
\n
"
);
else
if
(
jflag
)
VSB_printf
(
vsb
,
"
\"
%s
\"
"
,
d
->
sick
?
"sick"
:
"healthy"
);
else
if
(
vflag
|
pflag
)
else
if
(
pflag
)
return
;
else
VSB_printf
(
vsb
,
"%-*s"
,
VDI_LIST_W_PROBE
,
...
...
bin/varnishd/cache/cache_director.c
View file @
9bca6f7b
...
...
@@ -272,7 +272,6 @@ struct list_args {
unsigned
magic
;
#define LIST_ARGS_MAGIC 0x7e7cefeb
int
p
;
int
v
;
int
j
;
const
char
*
jsep
;
};
...
...
@@ -306,14 +305,14 @@ do_list(struct cli *cli, struct director *d, void *priv)
VDI_LIST_W_ADMIN
,
VDI_Ahealth
(
d
));
if
(
d
->
vdir
->
methods
->
list
!=
NULL
)
d
->
vdir
->
methods
->
list
(
ctx
,
d
,
cli
->
sb
,
0
,
0
,
0
);
d
->
vdir
->
methods
->
list
(
ctx
,
d
,
cli
->
sb
,
0
,
0
);
else
VCLI_Out
(
cli
,
"%-*s"
,
VDI_LIST_W_PROBE
,
cli_health
(
ctx
,
d
));
VTIM_format
(
d
->
vdir
->
health_changed
,
time_str
);
VCLI_Out
(
cli
,
" %s"
,
time_str
);
if
(
(
la
->
p
||
la
->
v
)
&&
d
->
vdir
->
methods
->
list
!=
NULL
)
d
->
vdir
->
methods
->
list
(
ctx
,
d
,
cli
->
sb
,
la
->
p
,
la
->
v
,
0
);
if
(
la
->
p
&&
d
->
vdir
->
methods
->
list
!=
NULL
)
d
->
vdir
->
methods
->
list
(
ctx
,
d
,
cli
->
sb
,
la
->
p
,
0
);
VCL_Rel_CliCtx
(
&
ctx
);
AZ
(
ctx
);
...
...
@@ -345,14 +344,14 @@ do_list_json(struct cli *cli, struct director *d, void *priv)
VCLI_Out
(
cli
,
"
\"
admin_health
\"
:
\"
%s
\"
,
\n
"
,
VDI_Ahealth
(
d
));
VCLI_Out
(
cli
,
"
\"
probe_message
\"
: "
);
if
(
d
->
vdir
->
methods
->
list
!=
NULL
)
d
->
vdir
->
methods
->
list
(
ctx
,
d
,
cli
->
sb
,
0
,
0
,
1
);
d
->
vdir
->
methods
->
list
(
ctx
,
d
,
cli
->
sb
,
0
,
1
);
else
VCLI_Out
(
cli
,
"
\"
%s
\"
"
,
cli_health
(
ctx
,
d
));
VCLI_Out
(
cli
,
",
\n
"
);
if
(
(
la
->
p
||
la
->
v
)
&&
d
->
vdir
->
methods
->
list
!=
NULL
)
{
if
(
la
->
p
&&
d
->
vdir
->
methods
->
list
!=
NULL
)
{
VCLI_Out
(
cli
,
"
\"
probe_details
\"
: "
);
d
->
vdir
->
methods
->
list
(
ctx
,
d
,
cli
->
sb
,
la
->
p
,
la
->
v
,
1
);
d
->
vdir
->
methods
->
list
(
ctx
,
d
,
cli
->
sb
,
la
->
p
,
1
);
}
VCLI_Out
(
cli
,
"
\"
last_change
\"
: %.3f
\n
"
,
d
->
vdir
->
health_changed
);
VSB_indent
(
cli
->
sb
,
-
2
);
...
...
@@ -371,10 +370,6 @@ cli_backend_list(struct cli *cli, const char * const *av, void *priv)
struct
list_args
la
[
1
];
int
i
;
/*
* XXX for all cases in varnish-cache, -v is synonymous to
* -p and -v is not documented. Retire?
*/
(
void
)
priv
;
ASSERT_CLI
();
INIT_OBJ
(
la
,
LIST_ARGS_MAGIC
);
...
...
@@ -384,7 +379,6 @@ cli_backend_list(struct cli *cli, const char * const *av, void *priv)
switch
(
*
p
)
{
case
'j'
:
la
->
j
=
1
;
break
;
case
'p'
:
la
->
p
=
!
la
->
p
;
break
;
case
'v'
:
la
->
p
=
!
la
->
p
;
break
;
default:
VCLI_Out
(
cli
,
"Invalid flag %c"
,
*
p
);
VCLI_SetResult
(
cli
,
CLIS_PARAM
);
...
...
doc/changes.rst
View file @
9bca6f7b
...
...
@@ -68,6 +68,9 @@ Varnish Cache trunk (ongoing)
For best forward compatibility, we recommend that scripts parse JSON
output as obtained using the ``-j`` option.
* The undocumented ``-v`` option to the ``backend.list`` cli command
has been removed
VCL
---
...
...
include/vrt.h
View file @
9bca6f7b
...
...
@@ -478,7 +478,7 @@ typedef enum sess_close vdi_http1pipe_f(VRT_CTX, VCL_BACKEND);
typedef
void
vdi_event_f
(
VCL_BACKEND
,
enum
vcl_event_e
);
typedef
void
vdi_destroy_f
(
VCL_BACKEND
);
typedef
void
vdi_panic_f
(
VCL_BACKEND
,
struct
vsb
*
);
typedef
void
vdi_list_f
(
VRT_CTX
,
VCL_BACKEND
,
struct
vsb
*
,
int
,
int
,
int
);
typedef
void
vdi_list_f
(
VRT_CTX
,
VCL_BACKEND
,
struct
vsb
*
,
int
,
int
);
struct
vdi_methods
{
unsigned
magic
;
...
...
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