From 83761e599a18a7ac99e58aa67b6b4869557f26e5 Mon Sep 17 00:00:00 2001
From: Laurent Bercot
int fd_sanitize (void)
-Ensures stdin and stdout are open. If one of those
+Ensures stdin, stdout and stderr are open. If one of those
file descriptors was closed, it now points to /dev/null.
Returns 1 if it succeeds and 0 if it fails.
- long seek_cur (int fd)
-Returns the current file offset for descriptor fd.
-
- int seek_set (int fd, long pos)
-Sets the current file offset for fd to pos.
-Returns 0 if it succeeds, or -1 (and sets errno) if it fails.
-
@@ -647,6 +634,38 @@ Trivial shortcuts around openwritenclose_suffix_internal(). The reader can easily figure out what they do.
+
+ int openwritevnclose_unsafe_internal (char const *file, siovec_t const *v, unsigned int vlen, uint64 *dev, uint64 *ino, unsigned char dosync)
+Like openwritenclose_unsafe_internal, but the content to
+write is taken from a
+siovec_t scatter/gather array of vlen
+elements instead of a single string.
+
+ int openwritevnclose_unsafe (char const *file, siovec_t const *v, unsigned int vlen)
+int openwritevnclose_unsafe_sync (char const *file, siovec_t const *v, unsigned int vlen)
+int openwritevnclose_unsafe_devino (char const *file, siovec_t const *v, unsigned int vlen, uint64 *dev, uint64 *ino)
+int openwritevnclose_unsafe_devino_sync (char const *file, siovec_t const *v, unsigned int vlen, uint64 *dev, uint64 *ino)
+Trivial wrappers around openwritevnclose_unsafe_internal().
+
+ int openwritevnclose_suffix_internal (char const *file, siovec_t const *v, unsigned int vlen, uint64 *dev, uint64 *ino, unsigned char dosync, char const *suffix)
+Like openwritenclose_suffix_internal, but the content to
+write is taken from a
+siovec_t scatter/gather array of vlen
+elements instead of a single string.
+
+ int openwritenclose_suffix (char const *file, char const *s, unsigned int len, char const *suffix)
+int openwritenclose_suffix_sync (char const *file, char const *s, unsigned int len, char const *suffix)
+int openwritenclose_suffix_devino (char const *file, char const *s, unsigned int len, uint64 *dev, uint64 *ino, char const *suffix)
+int openwritenclose_suffix_devino_sync (char const *file, char const *s, unsigned int len, uint64 *dev, uint64 *ino, char const *suffix)
+Trivial wrappers around openwritevnclose_suffix_internal().
+
-- cgit v1.2.3