diff options
author | Alexander Shishkin <virtuoso@slind.org> | 2010-03-15 15:38:09 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-03-15 15:38:09 +0100 |
commit | 535584c750820dd6c36011697f9ef89fe0a0698c (patch) | |
tree | 6c682a7a6ca7d740529201c759fa4e64d9622797 /include | |
parent | 814da220a5d451c036c9871094253366372676e0 (diff) | |
download | busybox-w32-535584c750820dd6c36011697f9ef89fe0a0698c.tar.gz busybox-w32-535584c750820dd6c36011697f9ef89fe0a0698c.tar.bz2 busybox-w32-535584c750820dd6c36011697f9ef89fe0a0698c.zip |
ar: add archive creation support
function old new delta
ar_main 184 542 +358
output_ar_header - 166 +166
copy_data - 54 +54
filter_replaceable - 19 +19
get_header_ar 409 414 +5
header_verbose_list_ar 85 88 +3
static.msg_unsupported_err 28 - -28
------------------------------------------------------------------------------
(add/remove: 3/1 grow/shrink: 3/0 up/down: 605/-28) Total: 577 bytes
Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/ar.h | 26 | ||||
-rw-r--r-- | include/unarchive.h | 4 |
2 files changed, 30 insertions, 0 deletions
diff --git a/include/ar.h b/include/ar.h new file mode 100644 index 000000000..26678895a --- /dev/null +++ b/include/ar.h | |||
@@ -0,0 +1,26 @@ | |||
1 | /* | ||
2 | * busybox ar archive data structures | ||
3 | * Licensed under the GPL v2 or later, see the file LICENSE in this source tree. | ||
4 | */ | ||
5 | #ifndef AR_H | ||
6 | #define AR_H | ||
7 | |||
8 | PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN | ||
9 | |||
10 | struct ar_header { | ||
11 | char name[16]; | ||
12 | char date[12]; | ||
13 | char uid[6]; | ||
14 | char gid[6]; | ||
15 | char mode[8]; | ||
16 | char size[10]; | ||
17 | char magic[2]; | ||
18 | }; | ||
19 | |||
20 | #define AR_HEADER_LEN sizeof(struct ar_header) | ||
21 | #define AR_MAGIC "!<arch>" | ||
22 | #define AR_MAGIC_LEN 7 | ||
23 | |||
24 | POP_SAVED_FUNCTION_VISIBILITY | ||
25 | |||
26 | #endif | ||
diff --git a/include/unarchive.h b/include/unarchive.h index 8bfc92cbe..92ebd6565 100644 --- a/include/unarchive.h +++ b/include/unarchive.h | |||
@@ -73,6 +73,10 @@ typedef struct archive_handle_t { | |||
73 | /* Contains the handle to a sub archive */ | 73 | /* Contains the handle to a sub archive */ |
74 | struct archive_handle_t *dpkg__sub_archive; | 74 | struct archive_handle_t *dpkg__sub_archive; |
75 | #endif | 75 | #endif |
76 | #if ENABLE_FEATURE_AR_CREATE | ||
77 | const char *ar__name; | ||
78 | struct archive_handle_t *ar__out; | ||
79 | #endif | ||
76 | } archive_handle_t; | 80 | } archive_handle_t; |
77 | /* bits in ah_flags */ | 81 | /* bits in ah_flags */ |
78 | #define ARCHIVE_RESTORE_DATE (1 << 0) | 82 | #define ARCHIVE_RESTORE_DATE (1 << 0) |