aboutsummaryrefslogtreecommitdiff
path: root/archival/libunarchive/open_transformer.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-10-01 15:55:11 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-10-01 15:55:11 +0000
commit97a8dd3857aea9730382e2975a2ee2000fd23ebb (patch)
tree608f73898f3ed5f466dff68189625fa9328a15be /archival/libunarchive/open_transformer.c
parentf8aa109a9f7c67b291f240fb3ed91da90f26359b (diff)
downloadbusybox-97a8dd3857aea9730382e2975a2ee2000fd23ebb.tar.gz
g[un]zip: add support for -v (verbose).
Add CONFIG_DESKTOP, almost all bloat from this change is hidden under that.
Diffstat (limited to 'archival/libunarchive/open_transformer.c')
-rw-r--r--archival/libunarchive/open_transformer.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/archival/libunarchive/open_transformer.c b/archival/libunarchive/open_transformer.c
index 578b92963..99e71ec2e 100644
--- a/archival/libunarchive/open_transformer.c
+++ b/archival/libunarchive/open_transformer.c
@@ -11,7 +11,8 @@
#include "unarchive.h"
/* transformer(), more than meets the eye */
-int open_transformer(int src_fd, int (*transformer)(int src_fd, int dst_fd))
+int open_transformer(int src_fd,
+ USE_DESKTOP(long long) int (*transformer)(int src_fd, int dst_fd))
{
int fd_pipe[2];
int pid;
@@ -28,6 +29,7 @@ int open_transformer(int src_fd, int (*transformer)(int src_fd, int dst_fd))
if (pid == 0) {
/* child process */
close(fd_pipe[0]); /* We don't wan't to read from the parent */
+ // FIXME: error check?
transformer(src_fd, fd_pipe[1]);
close(fd_pipe[1]); /* Send EOF */
close(src_fd);
@@ -38,5 +40,5 @@ int open_transformer(int src_fd, int (*transformer)(int src_fd, int dst_fd))
/* parent process */
close(fd_pipe[1]); /* Don't want to write to the child */
- return(fd_pipe[0]);
+ return fd_pipe[0];
}