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
d24c9962
Commit
d24c9962
authored
May 07, 2017
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Start wrecking VSM/VSC apis: Remove unnecessary VSM_fantom in VSC_section{}
parent
28ad2f72
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
22 deletions
+20
-22
varnishstat.c
bin/varnishstat/varnishstat.c
+20
-20
vsc.h
include/vapi/vsc.h
+0
-1
vsc.c
lib/libvarnishapi/vsc.c
+0
-1
No files found.
bin/varnishstat/varnishstat.c
View file @
d24c9962
...
@@ -68,10 +68,10 @@ do_xml_cb(void *priv, const struct VSC_point * const pt)
...
@@ -68,10 +68,10 @@ do_xml_cb(void *priv, const struct VSC_point * const pt)
sec
=
pt
->
section
;
sec
=
pt
->
section
;
printf
(
"
\t
<stat>
\n
"
);
printf
(
"
\t
<stat>
\n
"
);
if
(
strcmp
(
sec
->
fantom
->
type
,
""
))
if
(
strcmp
(
sec
->
type
,
""
))
printf
(
"
\t\t
<type>%s</type>
\n
"
,
sec
->
fantom
->
type
);
printf
(
"
\t\t
<type>%s</type>
\n
"
,
sec
->
type
);
if
(
strcmp
(
sec
->
fantom
->
ident
,
""
))
if
(
strcmp
(
sec
->
ident
,
""
))
printf
(
"
\t\t
<ident>%s</ident>
\n
"
,
sec
->
fantom
->
ident
);
printf
(
"
\t\t
<ident>%s</ident>
\n
"
,
sec
->
ident
);
printf
(
"
\t\t
<name>%s</name>
\n
"
,
pt
->
desc
->
name
);
printf
(
"
\t\t
<name>%s</name>
\n
"
,
pt
->
desc
->
name
);
printf
(
"
\t\t
<value>%ju</value>
\n
"
,
(
uintmax_t
)
val
);
printf
(
"
\t\t
<value>%ju</value>
\n
"
,
(
uintmax_t
)
val
);
printf
(
"
\t\t
<flag>%c</flag>
\n
"
,
pt
->
desc
->
semantics
);
printf
(
"
\t\t
<flag>%c</flag>
\n
"
,
pt
->
desc
->
semantics
);
...
@@ -120,17 +120,17 @@ do_json_cb(void *priv, const struct VSC_point * const pt)
...
@@ -120,17 +120,17 @@ do_json_cb(void *priv, const struct VSC_point * const pt)
printf
(
"
\"
"
);
printf
(
"
\"
"
);
/* build the JSON key name. */
/* build the JSON key name. */
if
(
sec
->
fantom
->
type
[
0
])
if
(
sec
->
type
[
0
])
printf
(
"%s."
,
sec
->
fantom
->
type
);
printf
(
"%s."
,
sec
->
type
);
if
(
sec
->
fantom
->
ident
[
0
])
if
(
sec
->
ident
[
0
])
printf
(
"%s."
,
sec
->
fantom
->
ident
);
printf
(
"%s."
,
sec
->
ident
);
printf
(
"%s
\"
: {
\n
"
,
pt
->
desc
->
name
);
printf
(
"%s
\"
: {
\n
"
,
pt
->
desc
->
name
);
printf
(
"
\"
description
\"
:
\"
%s
\"
,
\n
"
,
pt
->
desc
->
sdesc
);
printf
(
"
\"
description
\"
:
\"
%s
\"
,
\n
"
,
pt
->
desc
->
sdesc
);
if
(
strcmp
(
sec
->
fantom
->
type
,
""
))
if
(
strcmp
(
sec
->
type
,
""
))
printf
(
"
\"
type
\"
:
\"
%s
\"
, "
,
sec
->
fantom
->
type
);
printf
(
"
\"
type
\"
:
\"
%s
\"
, "
,
sec
->
type
);
if
(
strcmp
(
sec
->
fantom
->
ident
,
""
))
if
(
strcmp
(
sec
->
ident
,
""
))
printf
(
"
\"
ident
\"
:
\"
%s
\"
, "
,
sec
->
fantom
->
ident
);
printf
(
"
\"
ident
\"
:
\"
%s
\"
, "
,
sec
->
ident
);
printf
(
"
\"
flag
\"
:
\"
%c
\"
, "
,
pt
->
desc
->
semantics
);
printf
(
"
\"
flag
\"
:
\"
%c
\"
, "
,
pt
->
desc
->
semantics
);
printf
(
"
\"
format
\"
:
\"
%c
\"
,
\n
"
,
pt
->
desc
->
format
);
printf
(
"
\"
format
\"
:
\"
%c
\"
,
\n
"
,
pt
->
desc
->
format
);
printf
(
"
\"
value
\"
: %ju"
,
(
uintmax_t
)
val
);
printf
(
"
\"
value
\"
: %ju"
,
(
uintmax_t
)
val
);
...
@@ -182,10 +182,10 @@ do_once_cb(void *priv, const struct VSC_point * const pt)
...
@@ -182,10 +182,10 @@ do_once_cb(void *priv, const struct VSC_point * const pt)
val
=
*
(
const
volatile
uint64_t
*
)
pt
->
ptr
;
val
=
*
(
const
volatile
uint64_t
*
)
pt
->
ptr
;
sec
=
pt
->
section
;
sec
=
pt
->
section
;
i
=
0
;
i
=
0
;
if
(
strcmp
(
sec
->
fantom
->
type
,
""
))
if
(
strcmp
(
sec
->
type
,
""
))
i
+=
printf
(
"%s."
,
sec
->
fantom
->
type
);
i
+=
printf
(
"%s."
,
sec
->
type
);
if
(
strcmp
(
sec
->
fantom
->
ident
,
""
))
if
(
strcmp
(
sec
->
ident
,
""
))
i
+=
printf
(
"%s."
,
sec
->
fantom
->
ident
);
i
+=
printf
(
"%s."
,
sec
->
ident
);
i
+=
printf
(
"%s"
,
pt
->
desc
->
name
);
i
+=
printf
(
"%s"
,
pt
->
desc
->
name
);
if
(
i
>=
op
->
pad
)
if
(
i
>=
op
->
pad
)
op
->
pad
=
i
+
1
;
op
->
pad
=
i
+
1
;
...
@@ -227,10 +227,10 @@ do_list_cb(void *priv, const struct VSC_point * const pt)
...
@@ -227,10 +227,10 @@ do_list_cb(void *priv, const struct VSC_point * const pt)
sec
=
pt
->
section
;
sec
=
pt
->
section
;
i
=
0
;
i
=
0
;
if
(
strcmp
(
sec
->
fantom
->
type
,
""
))
if
(
strcmp
(
sec
->
type
,
""
))
i
+=
printf
(
"%s."
,
sec
->
fantom
->
type
);
i
+=
printf
(
"%s."
,
sec
->
type
);
if
(
strcmp
(
sec
->
fantom
->
ident
,
""
))
if
(
strcmp
(
sec
->
ident
,
""
))
i
+=
printf
(
"%s."
,
sec
->
fantom
->
ident
);
i
+=
printf
(
"%s."
,
sec
->
ident
);
i
+=
printf
(
"%s"
,
pt
->
desc
->
name
);
i
+=
printf
(
"%s"
,
pt
->
desc
->
name
);
if
(
i
<
30
)
if
(
i
<
30
)
printf
(
"%*s"
,
i
-
30
,
""
);
printf
(
"%*s"
,
i
-
30
,
""
);
...
...
include/vapi/vsc.h
View file @
d24c9962
...
@@ -117,7 +117,6 @@ struct VSC_section {
...
@@ -117,7 +117,6 @@ struct VSC_section {
const
char
*
type
;
const
char
*
type
;
const
char
*
ident
;
const
char
*
ident
;
const
struct
VSC_type_desc
*
desc
;
const
struct
VSC_type_desc
*
desc
;
struct
VSM_fantom
*
fantom
;
};
};
/* See include/tbl/vsc_fields.h for descriptions */
/* See include/tbl/vsc_fields.h for descriptions */
...
...
lib/libvarnishapi/vsc.c
View file @
d24c9962
...
@@ -256,7 +256,6 @@ vsc_add_vf(struct vsc *vsc, const struct VSM_fantom *fantom,
...
@@ -256,7 +256,6 @@ vsc_add_vf(struct vsc *vsc, const struct VSM_fantom *fantom,
vf
->
section
.
type
=
vf
->
fantom
.
type
;
vf
->
section
.
type
=
vf
->
fantom
.
type
;
vf
->
section
.
ident
=
vf
->
fantom
.
ident
;
vf
->
section
.
ident
=
vf
->
fantom
.
ident
;
vf
->
section
.
desc
=
desc
;
vf
->
section
.
desc
=
desc
;
vf
->
section
.
fantom
=
&
vf
->
fantom
;
vf
->
order
=
order
;
vf
->
order
=
order
;
VTAILQ_FOREACH
(
vf2
,
&
vsc
->
vf_list
,
list
)
{
VTAILQ_FOREACH
(
vf2
,
&
vsc
->
vf_list
,
list
)
{
...
...
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