]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/test/test-util.c
util: when creating temporary file names, allow including extra id string in it
authorLennart Poettering <lennart@poettering.net>
Mon, 15 Jun 2015 17:09:02 +0000 (19:09 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 15 Jun 2015 17:28:55 +0000 (19:28 +0200)
commit14bcf25c8b94b5c3556ba3983028a2b35ed0572f
treed63090263d6927239b0ca3de20d21e5f95a9f878
parenta4c8a5995102144225439c0077bbda5325761986
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.
15 files changed:
src/basic/copy.c
src/basic/util.c
src/basic/util.h
src/import/export-raw.c
src/import/export-tar.c
src/import/import-raw.c
src/import/import-tar.c
src/import/pull-dkr.c
src/import/pull-raw.c
src/import/pull-tar.c
src/journal/coredump.c
src/nspawn/nspawn.c
src/shared/machine-pool.c
src/systemctl/systemctl.c
src/test/test-util.c