Commit 7175bb38 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Remove the -w argument, -p should be used instead.

parent 8bc9a680
......@@ -100,20 +100,6 @@ pick(const struct choice *cp, const char *which, const char *kind)
/*--------------------------------------------------------------------*/
static unsigned long
arg_ul(const char *p)
{
char *q;
unsigned long ul;
ul = strtoul(p, &q, 0);
if (*q != '\0')
ARGV_ERR("Invalid number: \"%s\"\n", p);
return (ul);
}
/*--------------------------------------------------------------------*/
static void
usage(void)
{
......@@ -160,52 +146,11 @@ usage(void)
fprintf(stderr, FMT, "-T address:port",
"Telnet listen address and port");
fprintf(stderr, FMT, "-V", "version");
fprintf(stderr, FMT, "-w int[,int[,int]]", "Number of worker threads");
fprintf(stderr, FMT, "", " -w <fixed_count>");
fprintf(stderr, FMT, "", " -w min,max");
fprintf(stderr, FMT, "", " -w min,max,timeout [default: -w2,500,300]");
fprintf(stderr, FMT, "-u user", "Priviledge separation user id");
#undef FMT
exit(1);
}
/*--------------------------------------------------------------------*/
static void
tackle_warg(const char *argv)
{
char **av;
unsigned int u;
av = VAV_Parse(argv, NULL, ARGV_COMMA);
AN(av);
if (av[0] != NULL)
ARGV_ERR("%s\n", av[0]);
if (av[1] == NULL)
usage();
u = arg_ul(av[1]);
if (u < 1)
usage();
mgt_param.wthread_max = mgt_param.wthread_min = u;
if (av[2] != NULL) {
u = arg_ul(av[2]);
if (u < mgt_param.wthread_min)
usage();
mgt_param.wthread_max = u;
if (av[3] != NULL) {
u = arg_ul(av[3]);
mgt_param.wthread_timeout = u;
}
}
VAV_Free(av);
}
/*--------------------------------------------------------------------*/
static void
......@@ -516,8 +461,7 @@ main(int argc, char * const *argv)
usage();
break;
case 'w':
tackle_warg(optarg);
break;
ARGV_ERR("-w has been removed, use -p instead\n");
default:
usage();
}
......
......@@ -8,7 +8,7 @@ server s1 {
} -start
# Only one pool, to avoid getting more than one work thread
varnish v1 -arg "-p thread_pools=1 -w1,1,300" -vcl+backend {
varnish v1 -arg "-p thread_pools=1" -vcl+backend {
} -start
client c1 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment