openc_readatb.c (294B)
1 /* ISC license. */ 2 3 #include <skalibs/djbunix.h> 4 #include <skalibs/unix-transactional.h> 5 6 int openc_readatb (int dirfd, char const *name) 7 { 8 int fd = openc_readat(dirfd, name) ; 9 if (fd == -1) return -1 ; 10 if (ndelay_off(fd) == -1) 11 { 12 fd_close(fd) ; 13 return -1 ; 14 } 15 return fd ; 16 }