summaryrefslogtreecommitdiff
path: root/archival/libarchive/data_extract_to_stdout.c
diff options
context:
space:
mode:
Diffstat (limited to 'archival/libarchive/data_extract_to_stdout.c')
-rw-r--r--archival/libarchive/data_extract_to_stdout.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/archival/libarchive/data_extract_to_stdout.c b/archival/libarchive/data_extract_to_stdout.c
new file mode 100644
index 0000000..91f3f35
--- /dev/null
+++ b/archival/libarchive/data_extract_to_stdout.c
@@ -0,0 +1,14 @@
+/* vi: set sw=4 ts=4: */
+/*
+ * Licensed under GPLv2 or later, see file LICENSE in this source tree.
+ */
+
+#include "libbb.h"
+#include "archive.h"
+
+void FAST_FUNC data_extract_to_stdout(archive_handle_t *archive_handle)
+{
+ bb_copyfd_exact_size(archive_handle->src_fd,
+ STDOUT_FILENO,
+ archive_handle->file_header->size);
+}