openc_readb.c (224B)
1 /* ISC license. */ 2 3 #include <skalibs/djbunix.h> 4 5 int openc_readb (char const *fn) 6 { 7 int fd = openc_read(fn) ; 8 if (fd < 0) return -1 ; 9 if (ndelay_off(fd) < 0) 10 { 11 fd_close(fd) ; 12 return -1 ; 13 } 14 return fd ; 15 }