summaryrefslogtreecommitdiff
path: root/src/libunixonacid/openreadnclose_at.c
blob: 4858a69f814ff747cb5740b6271adc4d30e77880 (plain)
1
2
3
4
5
6
7
8
9
10
/* ISC license. */

#include <skalibs/djbunix.h>
#include <skalibs/unix-transactional.h>

ssize_t openreadnclose_at (int dirfd, char const *file, char *s, size_t n)
{
  int fd = openc_readatb(dirfd, file) ;
  return fd == -1 ? -1 : readnclose(fd, s, n) ;
}