]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/test/test-fileio.c
fileio: add new helper fdopen_independent()
authorLennart Poettering <lennart@poettering.net>
Thu, 23 Mar 2023 11:33:41 +0000 (12:33 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 23 Mar 2023 22:48:00 +0000 (22:48 +0000)
commitb839101aacb38131f0f4313b1b76316e663e58e9
tree0bd0c0442cddfb1dc8adcad384f269224c37f98c
parent05bda20f073947b77423faca68ef360df5bfa464
fileio: add new helper fdopen_independent()

This is a combination of fdopen() and fd_reopen(). i.e. it first reopens
the fd, and then converts that into a FILE*.

We do this at various places already manually. let's move this into a
helper call of its own.
src/basic/env-file.c
src/basic/fileio.c
src/basic/fileio.h
src/locale/localed-util.c
src/portable/portable.c
src/test/test-fileio.c