diff options
author | Glenn L McGrath | 2001-04-13 04:02:57 +0000 |
---|---|---|
committer | Glenn L McGrath | 2001-04-13 04:02:57 +0000 |
commit | 445fb952b8becc78889d3079e3053f76aa2eba9c (patch) | |
tree | feda0730549303c7fadd259741bea57207e46431 /libbb/deb_extract.c | |
parent | 1e04ea388f5f673f44503052d0f8873e4017abc3 (diff) | |
download | busybox-445fb952b8becc78889d3079e3053f76aa2eba9c.zip busybox-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.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libbb/deb_extract.c b/libbb/deb_extract.c index d3e6153..0f5a570 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); |