summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2024-04-24 15:04:48 +0200
committerAlejandro Colomar <alx@kernel.org>2024-06-18 22:59:43 +0200
commit40eaf4e4f711978625ecbbdd359caa33d947ec8d (patch)
treed43515f442780dd198bc3b12f784bf03437d13ab /src
parent3db000a5399fd688ec0d97b38e784778bdd90375 (diff)
downloadunit-40eaf4e4f711978625ecbbdd359caa33d947ec8d.tar.gz
unit-40eaf4e4f711978625ecbbdd359caa33d947ec8d.tar.bz2
fs: Rename nxt_fs_mkdir_all() => nxt_fs_mkdir_p()
"all" is too generic of an attribute to be meaningful. In the context of mkdir(), "parents" is used for this meaning, as in mkdir -p, so it should be more straightforward to readers. Tested-by: Andy Postnikov <apostnikov@gmail.com> Tested-by: Andrew Clayton <a.clayton@nginx.com> Reviewed-by: Andrew Clayton <a.clayton@nginx.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'src')
-rw-r--r--src/nxt_cgroup.c2
-rw-r--r--src/nxt_fs.c2
-rw-r--r--src/nxt_fs.h2
-rw-r--r--src/nxt_isolation.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/nxt_cgroup.c b/src/nxt_cgroup.c
index 2c404acc..79e240f1 100644
--- a/src/nxt_cgroup.c
+++ b/src/nxt_cgroup.c
@@ -34,7 +34,7 @@ nxt_cgroup_proc_add(nxt_task_t *task, nxt_process_t *process)
return NXT_ERROR;
}
- ret = nxt_fs_mkdir_all((const u_char *) cgprocs, 0777);
+ ret = nxt_fs_mkdir_p((const u_char *) cgprocs, 0777);
if (nxt_slow_path(ret == NXT_ERROR)) {
return NXT_ERROR;
}
diff --git a/src/nxt_fs.c b/src/nxt_fs.c
index f8d872f5..59e9a766 100644
--- a/src/nxt_fs.c
+++ b/src/nxt_fs.c
@@ -9,7 +9,7 @@ static nxt_int_t nxt_fs_mkdir(const u_char *dir, mode_t mode);
nxt_int_t
-nxt_fs_mkdir_all(const u_char *dir, mode_t mode)
+nxt_fs_mkdir_p(const u_char *dir, mode_t mode)
{
char *start, *end, *dst;
size_t dirlen;
diff --git a/src/nxt_fs.h b/src/nxt_fs.h
index 3ee0928c..9a256bd2 100644
--- a/src/nxt_fs.h
+++ b/src/nxt_fs.h
@@ -7,7 +7,7 @@
nxt_int_t nxt_fs_mkdir_dirname(const u_char *path, mode_t mode);
-nxt_int_t nxt_fs_mkdir_all(const u_char *dir, mode_t mode);
+nxt_int_t nxt_fs_mkdir_p(const u_char *dir, mode_t mode);
#endif /* _NXT_FS_H_INCLUDED_ */
diff --git a/src/nxt_isolation.c b/src/nxt_isolation.c
index a2913872..7f25379f 100644
--- a/src/nxt_isolation.c
+++ b/src/nxt_isolation.c
@@ -780,7 +780,7 @@ nxt_isolation_prepare_rootfs(nxt_task_t *task, nxt_process_t *process)
continue;
}
- ret = nxt_fs_mkdir_all(dst, S_IRWXU | S_IRWXG | S_IRWXO);
+ ret = nxt_fs_mkdir_p(dst, S_IRWXU | S_IRWXG | S_IRWXO);
if (nxt_slow_path(ret != NXT_OK)) {
nxt_alert(task, "mkdir(%s) %E", dst, nxt_errno);
goto undo;