aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-10-05 03:03:07 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-10-05 03:03:07 +0200
commitdcd27abcc4471ac04d7f196905907eb9a28bf0d8 (patch)
tree24ed60e8325dcfccc99b36b5cab663cd693f29bf /include
parentbe168b119750beacc0d0212607c6fa3ee87f238c (diff)
downloadbusybox-dcd27abcc4471ac04d7f196905907eb9a28bf0d8.tar.gz
unpackers: check errors from close() too
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/libbb.h b/include/libbb.h
index a02355cc5..dca14b40d 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -631,6 +631,9 @@ extern void xwrite(int fd, const void *buf, size_t count) FAST_FUNC;
extern void xwrite_str(int fd, const char *str) FAST_FUNC;
extern void xopen_xwrite_close(const char* file, const char *str) FAST_FUNC;
+/* Close fd, but check for failures (some types of write errors) */
+extern void xclose(int fd) FAST_FUNC;
+
/* Reads and prints to stdout till eof, then closes FILE. Exits on error: */
extern void xprint_and_close_file(FILE *file) FAST_FUNC;