summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_runtime.c
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@nginx.com>2023-03-27 13:43:37 +0200
committerAlejandro Colomar <alx@nginx.com>2023-03-29 00:40:40 +0200
commit5ba79b9b524ef746bc3269520c3f6b893f39275c (patch)
treed2c81fb988fe3c371ff5aa969abd7bf82459927a /src/nxt_runtime.c
parente242b1454dff7a6be17ed2e2c06884fec528ad1b (diff)
downloadunit-5ba79b9b524ef746bc3269520c3f6b893f39275c.tar.gz
unit-5ba79b9b524ef746bc3269520c3f6b893f39275c.tar.bz2
Renamed --libstatedir to --statedir.
In BSD systems, it's usually </var/db> or some other dir under </var> that is not </var/lib>, so $statedir is a more generic name. See hier(7). Reported-by: Andrei Zeliankou <zelenkov@nginx.com> Reported-by: Zhidao Hong <z.hong@f5.com> Reviewed-by: Konstantin Pavlov <thresh@nginx.com> Reviewed-by: Andrew Clayton <a.clayton@nginx.com> Cc: Liam Crilly <liam@nginx.com> Signed-off-by: Alejandro Colomar <alx@nginx.com>
Diffstat (limited to '')
-rw-r--r--src/nxt_runtime.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nxt_runtime.c b/src/nxt_runtime.c
index 739238af..1da52da0 100644
--- a/src/nxt_runtime.c
+++ b/src/nxt_runtime.c
@@ -786,7 +786,7 @@ nxt_runtime_conf_init(nxt_task_t *task, nxt_runtime_t *rt)
rt->pid = NXT_PID;
rt->log = NXT_LOG;
rt->modules = NXT_MODULESDIR;
- rt->state = NXT_LIBSTATEDIR;
+ rt->state = NXT_STATEDIR;
rt->control = NXT_CONTROL_SOCK;
rt->tmp = NXT_TMPDIR;
@@ -946,7 +946,7 @@ nxt_runtime_conf_read_cmd(nxt_task_t *task, nxt_runtime_t *rt)
static const char no_modules[] =
"option \"--modulesdir\" requires directory\n";
static const char no_state[] =
- "option \"--libstatedir\" requires directory\n";
+ "option \"--statedir\" requires directory\n";
static const char no_tmp[] = "option \"--tmpdir\" requires directory\n";
static const char help[] =
@@ -969,8 +969,8 @@ nxt_runtime_conf_read_cmd(nxt_task_t *task, nxt_runtime_t *rt)
" --modulesdir DIR set modules directory name\n"
" default: \"" NXT_MODULESDIR "\"\n"
"\n"
- " --libstatedir DIR set state directory name\n"
- " default: \"" NXT_LIBSTATEDIR "\"\n"
+ " --statedir DIR set state directory name\n"
+ " default: \"" NXT_STATEDIR "\"\n"
"\n"
" --tmpdir DIR set tmp directory name\n"
" default: \"" NXT_TMPDIR "\"\n"
@@ -1069,7 +1069,7 @@ nxt_runtime_conf_read_cmd(nxt_task_t *task, nxt_runtime_t *rt)
continue;
}
- if (nxt_strcmp(p, "--libstatedir") == 0) {
+ if (nxt_strcmp(p, "--statedir") == 0) {
if (*argv == NULL) {
write(STDERR_FILENO, no_state, nxt_length(no_state));
return NXT_ERROR;