aboutsummaryrefslogtreecommitdiff
path: root/libbb/deb_extract.c
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2001-04-13 04:02:57 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2001-04-13 04:02:57 +0000
commit445fb952b8becc78889d3079e3053f76aa2eba9c (patch)
treefeda0730549303c7fadd259741bea57207e46431 /libbb/deb_extract.c
parent1e04ea388f5f673f44503052d0f8873e4017abc3 (diff)
downloadbusybox-445fb952b8becc78889d3079e3053f76aa2eba9c.tar.gz
dpkg-deb -f and partial -I commands, adds 600 bytes
Diffstat (limited to 'libbb/deb_extract.c')
-rw-r--r--libbb/deb_extract.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libbb/deb_extract.c b/libbb/deb_extract.c
index d3e615305..0f5a570b6 100644
--- a/libbb/deb_extract.c
+++ b/libbb/deb_extract.c
@@ -30,7 +30,11 @@
#include <signal.h>
#include "libbb.h"
-extern int deb_extract(const char *package_filename, int function, char *target_dir)
+/*
+ * The contents of argument depend on the value of function.
+ * It is either a dir name or a control file or field name(see dpkg_deb.c)
+ */
+extern int deb_extract(const char *package_filename, int function, char *argument)
{
FILE *deb_file, *uncompressed_file;
@@ -41,6 +45,7 @@ extern int deb_extract(const char *package_filename, int function, char *target_
switch (function) {
case (extract_info):
case (extract_control):
+ case (extract_field):
ared_file = xstrdup("control.tar.gz");
break;
default:
@@ -70,7 +75,7 @@ extern int deb_extract(const char *package_filename, int function, char *target_
if (function & extract_fsys_tarfile) {
copy_file_chunk(uncompressed_file, stdout, -1);
} else {
- untar(uncompressed_file, function, target_dir);
+ untar(uncompressed_file, function, argument);
}
/* we are deliberately terminating the child so we can safely ignore this */
gz_close(gunzip_pid);