summaryrefslogtreecommitdiff
path: root/src/libstddjb/openwritenclose_internal_deprecated.c
blob: 89f8dd239dc635833589d8b178936f3cb35b62de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* ISC license. */

#include <skalibs/devino.h>
#include <skalibs/djbunix.h>

int openwritenclose_internal (char const *fn, char const *s, size_t n, dev_t *dev, ino_t *ino, int dosync)
{
  devino di ;
  if (!openwritenclose5(fn, s, n, dev || ino ? &di : 0, !!dosync)) return 0 ;
  if (dev) *dev = di.dev ;
  if (ino) *ino = di.ino ;
  return 1 ;
}