diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-03-26 13:25:51 +0200 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2018-08-24 16:47:08 +0200 |
commit | df15bd49b7c870a13f48f78ae7958380ad01f565 (patch) | |
tree | 25d3b433f8527575849466a1a4e37ab471ec16ba /src/basic/fd-util.h | |
parent | b9458858b4f6475dd32b83f37c546a9ad2c444b2 (diff) |
fd-util: introduce fd_reopen() helper for reopening an fd
We have the same code for this in place at various locations, let's
unify that. Also, let's repurpose test-fs-util.c as a test for this new
helper cal..
Diffstat (limited to 'src/basic/fd-util.h')
-rw-r--r-- | src/basic/fd-util.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/basic/fd-util.h b/src/basic/fd-util.h index cb4677ec4..0f5a950f1 100644 --- a/src/basic/fd-util.h +++ b/src/basic/fd-util.h @@ -117,3 +117,5 @@ static inline int make_null_stdio(void) { (fd) = -1; \ _fd_; \ }) + +int fd_reopen(int fd, int flags); |