From 37b42c179bb00d05cb47c739cb95283548f84fb2 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Mon, 30 May 2022 19:51:44 +0000 Subject: Add openc_*at functions Signed-off-by: Laurent Bercot --- src/libunixonacid/openc_writeatb.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/libunixonacid/openc_writeatb.c (limited to 'src/libunixonacid/openc_writeatb.c') diff --git a/src/libunixonacid/openc_writeatb.c b/src/libunixonacid/openc_writeatb.c new file mode 100644 index 0000000..daa1fe8 --- /dev/null +++ b/src/libunixonacid/openc_writeatb.c @@ -0,0 +1,12 @@ +/* ISC license. */ + +#include +#include + +int openc_writeatb (int dirfd, char const *name) +{ + int fd = openc_writeat(dirfd, name) ; + if (fd < 0) return -1 ; + if (ndelay_off(fd) < 0) return -1 ; + return fd ; +} -- cgit v1.2.3