diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-06-15 19:09:02 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-06-15 19:28:55 +0200 |
commit | 14bcf25c8b94b5c3556ba3983028a2b35ed0572f (patch) | |
tree | d63090263d6927239b0ca3de20d21e5f95a9f878 /src/shared | |
parent | a4c8a5995102144225439c0077bbda5325761986 (diff) | |
download | systemd-14bcf25c8b94b5c3556ba3983028a2b35ed0572f.tar.gz systemd-14bcf25c8b94b5c3556ba3983028a2b35ed0572f.tar.bz2 systemd-14bcf25c8b94b5c3556ba3983028a2b35ed0572f.zip |
util: when creating temporary file names, allow including extra id string in it
This adds a "char *extra" parameter to tempfn_xxxxxx(), tempfn_random(),
tempfn_ranomd_child(). If non-NULL this string is included in the middle
of the newly created file name. This is useful for being able to
distuingish the kind of temporary file when we see one.
This also adds tests for the three call.
For now, we don't make use of this at all, but port all users over.
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/machine-pool.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/machine-pool.c b/src/shared/machine-pool.c index 8c64908b1a..8af78f47d5 100644 --- a/src/shared/machine-pool.c +++ b/src/shared/machine-pool.c @@ -75,7 +75,7 @@ static int setup_machine_raw(uint64_t size, sd_bus_error *error) { if (errno != ENOENT) return sd_bus_error_set_errnof(error, errno, "Failed to open /var/lib/machines.raw: %m"); - r = tempfn_xxxxxx("/var/lib/machines.raw", &tmp); + r = tempfn_xxxxxx("/var/lib/machines.raw", NULL, &tmp); if (r < 0) return r; |