summaryrefslogtreecommitdiffstats
path: root/src/shared/mkfs-util.c
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2022-11-17 14:12:48 +0100
committerDaan De Meyer <daan.j.demeyer@gmail.com>2022-11-17 14:14:31 +0100
commitdd3c82529472b891c58995fca1f36686c45f856b (patch)
tree74a55d1cb82a122be25215c6c40a174d5b5bdf1c /src/shared/mkfs-util.c
parentHandle MACHINE_ID=uninitialized (diff)
downloadsystemd-dd3c82529472b891c58995fca1f36686c45f856b.tar.xz
systemd-dd3c82529472b891c58995fca1f36686c45f856b.zip
tmpfile-util: Introduce fopen_temporary_child()
Instead of having fopen_temporary() create the file either next to an existing file or in tmp/, let's split this up clearly into two different functions, one for creating temporary files next to existing files, and one for creating a temporary file in a directory.
Diffstat (limited to 'src/shared/mkfs-util.c')
-rw-r--r--src/shared/mkfs-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/mkfs-util.c b/src/shared/mkfs-util.c
index 19ffd9151b..2070965387 100644
--- a/src/shared/mkfs-util.c
+++ b/src/shared/mkfs-util.c
@@ -254,7 +254,7 @@ static int make_protofile(const char *root, char **ret) {
assert(ret);
- r = fopen_temporary(NULL, &f, &p);
+ r = fopen_temporary_child(NULL, &f, &p);
if (r < 0)
return log_error_errno(r, "Failed to open temporary file: %m");