summaryrefslogtreecommitdiff
path: root/src/libstddjb/openwritenclose_internal_deprecated.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstddjb/openwritenclose_internal_deprecated.c')
-rw-r--r--src/libstddjb/openwritenclose_internal_deprecated.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libstddjb/openwritenclose_internal_deprecated.c b/src/libstddjb/openwritenclose_internal_deprecated.c
new file mode 100644
index 0000000..89f8dd2
--- /dev/null
+++ b/src/libstddjb/openwritenclose_internal_deprecated.c
@@ -0,0 +1,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 ;
+}