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
a093bd64
Commit
a093bd64
authored
Mar 11, 2022
by
Dridi Boukelmoune
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
param: Fold mgt_param_tbl.c into mgt_param.c
parent
c6ee37a5
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
67 deletions
+14
-67
Makefile.am
bin/varnishd/Makefile.am
+0
-1
mgt.h
bin/varnishd/mgt/mgt.h
+0
-1
mgt_param.c
bin/varnishd/mgt/mgt_param.c
+14
-7
mgt_param.h
bin/varnishd/mgt/mgt_param.h
+0
-4
mgt_param_bits.c
bin/varnishd/mgt/mgt_param_bits.c
+0
-8
mgt_param_tbl.c
bin/varnishd/mgt/mgt_param_tbl.c
+0
-46
No files found.
bin/varnishd/Makefile.am
View file @
a093bd64
...
...
@@ -87,7 +87,6 @@ varnishd_SOURCES = \
mgt/mgt_main.c
\
mgt/mgt_param.c
\
mgt/mgt_param_bits.c
\
mgt/mgt_param_tbl.c
\
mgt/mgt_param_tcp.c
\
mgt/mgt_param_tweak.c
\
mgt/mgt_shmem.c
\
...
...
bin/varnishd/mgt/mgt.h
View file @
a093bd64
...
...
@@ -191,7 +191,6 @@ void MCF_ParamConf(enum mcf_which_e, const char *param, const char *, ...)
void
MCF_ParamSet
(
struct
cli
*
,
const
char
*
param
,
const
char
*
val
);
void
MCF_ParamProtect
(
struct
cli
*
,
const
char
*
arg
);
void
MCF_DumpRstParam
(
void
);
void
MCF_AddParams
(
struct
parspec
*
ps
);
extern
struct
params
mgt_param
;
/* mgt_shmem.c */
...
...
bin/varnishd/mgt/mgt_param.c
View file @
a093bd64
...
...
@@ -610,16 +610,25 @@ mcf_param_reset(struct cli *cli, const char * const *av, void *priv)
}
/*--------------------------------------------------------------------
*
Add a group of parameters to the global set
and sort by name.
*
Initialize parameters
and sort by name.
*/
void
MCF_AddParams
(
struct
parspec
*
ps
)
static
struct
parspec
mgt_parspec
[]
=
{
#define PARAM_ALL
#define PARAM_PRE {
#define PARAM(typ, fld, nm, ...) #nm, __VA_ARGS__
#define PARAM_POST },
#include "tbl/params.h"
{
NULL
,
NULL
,
NULL
}
};
static
void
mcf_init_params
(
void
)
{
struct
parspec
*
pp
;
const
char
*
s
;
for
(
pp
=
ps
;
pp
->
name
!=
NULL
;
pp
++
)
{
for
(
pp
=
mgt_parspec
;
pp
->
name
!=
NULL
;
pp
++
)
{
AN
(
pp
->
func
);
s
=
strchr
(
pp
->
descr
,
'\0'
);
if
(
isspace
(
s
[
-
1
]))
{
...
...
@@ -720,9 +729,7 @@ MCF_InitParams(struct cli *cli)
struct
vsb
*
vsb
;
ssize_t
def
,
low
;
MCF_AddParams
(
mgt_parspec
);
MCF_AddParams
(
VSL_parspec
);
mcf_init_params
();
MCF_TcpParams
();
def
=
80
*
1024
;
...
...
bin/varnishd/mgt/mgt_param.h
View file @
a093bd64
...
...
@@ -87,7 +87,3 @@ tweak_t tweak_uint;
tweak_t
tweak_vsl_buffer
;
tweak_t
tweak_vsl_mask
;
tweak_t
tweak_vsl_reclen
;
extern
struct
parspec
mgt_parspec
[];
/* mgt_param_tbl.c */
extern
struct
parspec
VSL_parspec
[];
/* mgt_param_vsl.c */
extern
struct
parspec
WRK_parspec
[];
/* mgt_pool.c */
bin/varnishd/mgt/mgt_param_bits.c
View file @
a093bd64
...
...
@@ -215,11 +215,3 @@ tweak_feature(struct vsb *vsb, const struct parspec *par, const char *arg)
return
(
tweak_generic_bits
(
vsb
,
par
,
arg
,
mgt_param
.
feature_bits
,
FEATURE_Reserved
,
feature_tags
,
"feature bit"
,
'+'
));
}
/*--------------------------------------------------------------------
* The parameter table itself
*/
struct
parspec
VSL_parspec
[]
=
{
{
NULL
,
NULL
,
NULL
}
};
bin/varnishd/mgt/mgt_param_tbl.c
deleted
100644 → 0
View file @
c6ee37a5
/*-
* Copyright (c) 2006 Verdens Gang AS
* Copyright (c) 2006-2015 Varnish Software AS
* All rights reserved.
*
* Author: Poul-Henning Kamp <phk@phk.freebsd.dk>
*
* SPDX-License-Identifier: BSD-2-Clause
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include "config.h"
#include <stdio.h>
#include "mgt/mgt.h"
#include "mgt/mgt_param.h"
struct
parspec
mgt_parspec
[]
=
{
#define PARAM_ALL
#define PARAM_PRE {
#define PARAM(typ, fld, nm, ...) #nm, __VA_ARGS__
#define PARAM_POST },
#include "tbl/params.h"
{
NULL
,
NULL
,
NULL
}
};
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