summaryrefslogtreecommitdiffstats
path: root/src/ustar.c
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2023-04-17 11:10:10 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2023-04-17 11:22:07 (EDT)
commitdeecdb9aa40e64b62ad594a97cc5d941a27a576e (patch)
tree7da38b3e02470ea84a92f351dcdd4c1ef0fc7e90 /src/ustar.c
parent0f96542e7c0f0555b2b2ef7ac52c574a616fa7b2 (diff)
ustar, main: Show size of member files
Also fix integer type (maximum file size is 8^12-1 = 68719476735).
Diffstat (limited to 'src/ustar.c')
-rw-r--r--src/ustar.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ustar.c b/src/ustar.c
index d728cf5..a4395f4 100644
--- a/src/ustar.c
+++ b/src/ustar.c
@@ -50,7 +50,7 @@ struct _opkg_opk_ustar_header {
struct opkg_opk_ustar {
struct opkg_opk_gzip *gzip;
- int32_t data_size_remaining;
+ int64_t data_size_remaining;
unsigned char read_record[OPKG_OPK_USTAR_RECORD_SIZE];
};
@@ -118,6 +118,7 @@ opkg_opk_ustar_list(struct opkg_opk_ustar *ustar,
memcpy(member->name, header.name, sizeof(header.name));
member->name[sizeof(header.name)] = '\0';
}
+ member->size = ustar->data_size_remaining;
while (ustar->data_size_remaining > 0) {
if (opkg_opk_ustar_read(ustar, NULL, NULL) == OPKG_OPK_ERROR) {