open_readb.c (222B)
1 /* ISC license. */ 2 3 #include <skalibs/djbunix.h> 4 5 int open_readb (char const *fn) 6 { 7 int fd = open_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 }