aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2013-09-10 16:27:08 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2013-09-10 16:27:08 +0200
commita613aa1b4c26be1567a59e9216c83d21d4be122b (patch)
tree64205c9f5f3e195a047bf9e56278fd26a512e9ba
parent2a053a2430e8de2f5de3da7d4d25343f61161f09 (diff)
downloadbusybox-w32-a613aa1b4c26be1567a59e9216c83d21d4be122b.tar.gz
busybox-w32-a613aa1b4c26be1567a59e9216c83d21d4be122b.tar.bz2
busybox-w32-a613aa1b4c26be1567a59e9216c83d21d4be122b.zip
ar: better comment
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--archival/libarchive/get_header_ar.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/archival/libarchive/get_header_ar.c b/archival/libarchive/get_header_ar.c
index f655585fe..c66bb3ee7 100644
--- a/archival/libarchive/get_header_ar.c
+++ b/archival/libarchive/get_header_ar.c
@@ -59,6 +59,11 @@ char FAST_FUNC get_header_ar(archive_handle_t *archive_handle)
59 if (ar.formatted.magic[0] != '`' || ar.formatted.magic[1] != '\n') 59 if (ar.formatted.magic[0] != '`' || ar.formatted.magic[1] != '\n')
60 bb_error_msg_and_die("invalid ar header"); 60 bb_error_msg_and_die("invalid ar header");
61 61
62 /*
63 * Note that the fields MUST be read in reverse order as
64 * read_num() clobbers the next byte after the field!
65 * Order is: name, date, uid, gid, mode, size, magic.
66 */
62 typed->size = size = read_num(ar.formatted.size, 10, 67 typed->size = size = read_num(ar.formatted.size, 10,
63 sizeof(ar.formatted.size)); 68 sizeof(ar.formatted.size));
64 69
@@ -91,8 +96,6 @@ char FAST_FUNC get_header_ar(archive_handle_t *archive_handle)
91 /* Only size is always present, the rest may be missing in 96 /* Only size is always present, the rest may be missing in
92 * long filename pseudo file. Thus we decode the rest 97 * long filename pseudo file. Thus we decode the rest
93 * after dealing with long filename pseudo file. 98 * after dealing with long filename pseudo file.
94 * Note that the fields MUST be read in reverse order as
95 * read_num() clobbers the next byte after the field!
96 */ 99 */
97 typed->mode = read_num(ar.formatted.mode, 8, sizeof(ar.formatted.mode)); 100 typed->mode = read_num(ar.formatted.mode, 8, sizeof(ar.formatted.mode));
98 typed->gid = read_num(ar.formatted.gid, 10, sizeof(ar.formatted.gid)); 101 typed->gid = read_num(ar.formatted.gid, 10, sizeof(ar.formatted.gid));