aboutsummaryrefslogtreecommitdiff
path: root/archival/tar.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2015-06-01 15:22:42 +0100
committerRon Yorston <rmy@pobox.com>2015-06-01 15:22:42 +0100
commit7bf5f10016ef3d99d4a6a45b6a300d04d930de2a (patch)
treec027805369d9ceaef80e47731353b914228d89ea /archival/tar.c
parent0f08b401f107732d6c88486a739f26ce04578c34 (diff)
downloadbusybox-w32-7bf5f10016ef3d99d4a6a45b6a300d04d930de2a.tar.gz
busybox-w32-7bf5f10016ef3d99d4a6a45b6a300d04d930de2a.tar.bz2
busybox-w32-7bf5f10016ef3d99d4a6a45b6a300d04d930de2a.zip
mingw: add magic '--busybox' flag
If BusyBox is invoked with argv[1] set to --busybox skip the first two arguments so that argv[2] becomes the applet name and argv[3] et seq are its arguments. This is needed when BusyBox is run as sh.exe and the executable is reexecuted to invoke compress/decompress applets.
Diffstat (limited to 'archival/tar.c')
-rw-r--r--archival/tar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/archival/tar.c b/archival/tar.c
index 1f9dd23d2..d1b0e475d 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -685,7 +685,7 @@ static pid_t vfork_compressor(int tar_fd, const char *gzip)
685 pid_t pid; 685 pid_t pid;
686 686
687 if (find_applet_by_name(gzip) >= 0) { 687 if (find_applet_by_name(gzip) >= 0) {
688 cmd = xasprintf("%s %s -cf -", bb_busybox_exec_path, gzip); 688 cmd = xasprintf("%s --busybox %s -cf -", bb_busybox_exec_path, gzip);
689 } 689 }
690 else { 690 else {
691 cmd = xasprintf("%s -cf -", gzip); 691 cmd = xasprintf("%s -cf -", gzip);