aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2017-08-10 10:35:08 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2017-08-10 10:36:37 +0200
commit0cf64c8b5d86d603903397bfce87dea5a862caec (patch)
tree66ee79e6c9c2ff17c84b776b4ce36439cf9f94e0 /include
parent3c9b8fe25233dc52bbeec2ab29e49b8f62e4739b (diff)
downloadbusybox-0cf64c8b5d86d603903397bfce87dea5a862caec.tar.gz
rpm2cpio: handle LZMA compressed rpms. closes 10166
function old new delta rpm2cpio_main 78 120 +42 setup_lzma_on_fd - 29 +29 fork_transformer_and_free - 28 +28 ... setup_unzip_on_fd 56 32 -24 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 3/5 up/down: 104/-67) Total: 37 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 2eb1fef33..86ad0a057 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -863,7 +863,7 @@ unsigned bb_clk_tck(void) FAST_FUNC;
#if SEAMLESS_COMPRESSION
/* Autodetects gzip/bzip2 formats. fd may be in the middle of the file! */
-extern int setup_unzip_on_fd(int fd, int fail_if_not_compressed) FAST_FUNC;
+int setup_unzip_on_fd(int fd, int fail_if_not_compressed) FAST_FUNC;
/* Autodetects .gz etc */
extern int open_zipped(const char *fname, int fail_if_not_compressed) FAST_FUNC;
extern void *xmalloc_open_zipped_read_close(const char *fname, size_t *maxsz_p) FAST_FUNC RETURNS_MALLOC;
@@ -872,6 +872,8 @@ extern void *xmalloc_open_zipped_read_close(const char *fname, size_t *maxsz_p)
# define open_zipped(fname, fail_if_not_compressed) open((fname), O_RDONLY);
# define xmalloc_open_zipped_read_close(fname, maxsz_p) xmalloc_open_read_close((fname), (maxsz_p))
#endif
+/* lzma has no signature, need a little helper. NB: exist only for ENABLE_FEATURE_SEAMLESS_LZMA=y */
+void setup_lzma_on_fd(int fd) FAST_FUNC;
extern ssize_t safe_write(int fd, const void *buf, size_t count) FAST_FUNC;
// NB: will return short write on error, not -1,