diff options
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 d3e615305..0f5a570b6 100644 --- a/libbb/deb_extract.c +++ b/libbb/deb_extract.c | |||
@@ -30,7 +30,11 @@ | |||
30 | #include <signal.h> | 30 | #include <signal.h> |
31 | #include "libbb.h" | 31 | #include "libbb.h" |
32 | 32 | ||
33 | extern int deb_extract(const char *package_filename, int function, char *target_dir) | 33 | /* |
34 | * The contents of argument depend on the value of function. | ||
35 | * It is either a dir name or a control file or field name(see dpkg_deb.c) | ||
36 | */ | ||
37 | extern int deb_extract(const char *package_filename, int function, char *argument) | ||
34 | { | 38 | { |
35 | 39 | ||
36 | FILE *deb_file, *uncompressed_file; | 40 | FILE *deb_file, *uncompressed_file; |
@@ -41,6 +45,7 @@ extern int deb_extract(const char *package_filename, int function, char *target_ | |||
41 | switch (function) { | 45 | switch (function) { |
42 | case (extract_info): | 46 | case (extract_info): |
43 | case (extract_control): | 47 | case (extract_control): |
48 | case (extract_field): | ||
44 | ared_file = xstrdup("control.tar.gz"); | 49 | ared_file = xstrdup("control.tar.gz"); |
45 | break; | 50 | break; |
46 | default: | 51 | default: |
@@ -70,7 +75,7 @@ extern int deb_extract(const char *package_filename, int function, char *target_ | |||
70 | if (function & extract_fsys_tarfile) { | 75 | if (function & extract_fsys_tarfile) { |
71 | copy_file_chunk(uncompressed_file, stdout, -1); | 76 | copy_file_chunk(uncompressed_file, stdout, -1); |
72 | } else { | 77 | } else { |
73 | untar(uncompressed_file, function, target_dir); | 78 | untar(uncompressed_file, function, argument); |
74 | } | 79 | } |
75 | /* we are deliberately terminating the child so we can safely ignore this */ | 80 | /* we are deliberately terminating the child so we can safely ignore this */ |
76 | gz_close(gunzip_pid); | 81 | gz_close(gunzip_pid); |