aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-06-26 16:36:26 +0000
committerEric Andersen <andersen@codepoet.org>2001-06-26 16:36:26 +0000
commit5ef5614c31d26a87d9d92e97bed7df7993296682 (patch)
treeeb23ddaddaee372a31bfc6c19b1a685a0801f8de /include
parentce98c19dfe7bcfb3174c0898f3c001c38c6d44c6 (diff)
downloadbusybox-5ef5614c31d26a87d9d92e97bed7df7993296682.tar.gz
Don't use void * to pass pointers of known type
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 3b0ced7d1..c29955b3b 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -212,9 +212,19 @@ char *xreadlink(const char *path);
char *concat_path_file(const char *path, const char *filename);
char *last_char_is(const char *s, int c);
-void *get_header_ar(FILE *in_file);
-void *get_header_cpio(FILE *src_stream);
-void *get_header_tar(FILE *tar_stream);
+typedef struct file_headers_s {
+ char *name;
+ char *link_name;
+ off_t size;
+ uid_t uid;
+ gid_t gid;
+ mode_t mode;
+ time_t mtime;
+ dev_t device;
+} file_header_t;
+file_header_t *get_header_ar(FILE *in_file);
+file_header_t *get_header_cpio(FILE *src_stream);
+file_header_t *get_header_tar(FILE *tar_stream);
enum extract_functions_e {
extract_verbose_list = 1,
@@ -229,7 +239,7 @@ enum extract_functions_e {
extract_unconditional = 512,
extract_create_leading_dirs = 1024
};
-char *unarchive(FILE *src_stream, void *(*get_header)(FILE *),
+char *unarchive(FILE *src_stream, file_header_t *(*get_header)(FILE *),
const int extract_function, const char *prefix, char **extract_names);
char *deb_extract(const char *package_filename, FILE *out_stream, const int extract_function,
const char *prefix, const char *filename);