fs-util: add openat_report_new() wrapper around openat()
authorLennart Poettering <lennart@poettering.net>
Mon, 21 Mar 2022 17:11:26 +0000 (18:11 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 21 Mar 2022 17:23:44 +0000 (18:23 +0100)
commitca8503f168d0632c606110da909aba3057777395
tree30ec3c83f14440afe195fb747712bde52b2832ed
parentf5d0f21c3721d8788e96add470630cd1cd91c34c
fs-util: add openat_report_new() wrapper around openat()

This is a wrapper around openat(). It works mostly the same, except for
one thing: it race-freely reports whether we just created the indicated
file in case O_CREAT is passed without O_EXCL.
src/basic/fs-util.c
src/basic/fs-util.h
src/test/test-fs-util.c