From 409008f8960e24f5f2b25a84642cbb0c043f0ab9 Mon Sep 17 00:00:00 2001 From: midipix Date: Sat, 23 May 2020 00:19:30 -0400 Subject: library api: tpax_archive_seal(): initial implementation and integration. --- include/tpax/tpax.h | 4 ++++ include/tpax/tpax_specs.h | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'include') diff --git a/include/tpax/tpax.h b/include/tpax/tpax.h index 9e9fa38..8897818 100644 --- a/include/tpax/tpax.h +++ b/include/tpax/tpax.h @@ -119,6 +119,7 @@ struct tpax_driver_ctx { const char * module; const struct tpax_common_ctx * cctx; struct tpax_error_info ** errv; + const off_t * cpos; void * any; }; @@ -128,6 +129,8 @@ struct tpax_unit_ctx { const struct tpax_ustar_header *uhdr; const struct tpax_cpio_header * chdr; const struct stat * st; + const off_t * hpos; + const off_t * dpos; void * any; }; @@ -148,6 +151,7 @@ tpax_api int tpax_set_driver_fdctx (struct tpax_driver_ctx *, const struct /* core api */ tpax_api int tpax_archive_append (const struct tpax_driver_ctx *, const struct tpax_unit_ctx *); +tpax_api int tpax_archive_seal (const struct tpax_driver_ctx *); /* helper api */ tpax_api int tpax_path_copy (char *, const char *, size_t, uint32_t, size_t *); diff --git a/include/tpax/tpax_specs.h b/include/tpax/tpax_specs.h index d0ac5a4..e30b36b 100644 --- a/include/tpax/tpax_specs.h +++ b/include/tpax/tpax_specs.h @@ -5,6 +5,10 @@ extern "C" { #endif +#define TPAX_PAX_BLOCK_SIZE 5120 +#define TPAX_CPIO_BLOCK_SIZE 5120 +#define TPAX_USTAR_BLOCK_SIZE 10240 + #define TPAX_USTAR_MAGIC {'u','s','t','a','r',0} #define TPAX_USTAR_VERSION {'0','0'} -- cgit v1.2.3