skalibs

Mirror/fork of https://skarnet.org/software/skalibs/
git clone https://ccx.te2000.cz/git/skalibs
Log | Files | Refs | README | LICENSE

open_readatb.c (292B)


      1 /* ISC license. */
      2 
      3 #include <skalibs/djbunix.h>
      4 #include <skalibs/unix-transactional.h>
      5 
      6 int open_readatb (int dirfd, char const *name)
      7 {
      8   int fd = open_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 }