diff options
Diffstat (limited to 'src/libstddjb/open_readbcoe.c')
-rw-r--r-- | src/libstddjb/open_readbcoe.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/libstddjb/open_readbcoe.c b/src/libstddjb/open_readbcoe.c new file mode 100644 index 0000000..d461854 --- /dev/null +++ b/src/libstddjb/open_readbcoe.c @@ -0,0 +1,15 @@ +/* ISC license. */ + +#include <skalibs/djbunix.h> + +int open_readbcoe (char const *fn) +{ + int fd = open_readbcoe(fn) ; + if (fd < 0) return -1 ; + if (ndelay_off(fd) < 0) + { + fd_close(fd) ; + return -1 ; + } + return fd ; +} |