chiark / gitweb /
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)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 09:03:00 +0000 (10:03 +0100)
commite7fadef378f4f0df0925aca2f5c062d0b02c343a
tree63d0c41bce34089f33601430096035dd92fefa2b
parent435ef7bdc398a2c0ecd8a5f8b8be304c51a9e212
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.
src/shared/copy.c
src/shared/machine-pool.c
src/shared/util.h