summaryrefslogtreecommitdiffstats
path: root/src/ustar.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ustar.c')
-rw-r--r--src/ustar.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/ustar.c b/src/ustar.c
index 7fa64e2..e1771c3 100644
--- a/src/ustar.c
+++ b/src/ustar.c
@@ -351,6 +351,19 @@ opkg_opk_ustar_write_data(struct opkg_opk_ustar *ustar, size_t size)
return OPKG_OPK_OK;
}
+int
+opkg_opk_ustar_write_trailer(struct opkg_opk_ustar *ustar)
+{
+ memset(ustar->record, 0, OPKG_OPK_USTAR_RECORD_SIZE);
+ if (opkg_opk_gzip_write(ustar->gzip, ustar->record,
+ OPKG_OPK_USTAR_RECORD_SIZE, 0) != OPKG_OPK_OK ||
+ opkg_opk_gzip_write(ustar->gzip, ustar->record,
+ OPKG_OPK_USTAR_RECORD_SIZE, 0) != OPKG_OPK_OK) {
+ return OPKG_OPK_ERROR;
+ }
+ return OPKG_OPK_OK;
+}
+
void
opkg_opk_ustar_free(struct opkg_opk_ustar *ustar)
{