summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-05-26 15:02:30 +0000
committermidipix <writeonce@midipix.org>2024-05-26 15:02:30 +0000
commit4cb6ae148e6bd9d832c637a5fdd01d68febdbf67 (patch)
tree18267532c8cb05180ea5f3cc406ee07825f5e1f8
parent3ea04532b867b8ad36e30eed05a5d2fc2630833b (diff)
downloadtpax-4cb6ae148e6bd9d832c637a5fdd01d68febdbf67.tar.bz2
tpax-4cb6ae148e6bd9d832c637a5fdd01d68febdbf67.tar.xz
library api's: _meta_ (archive member meta interfaces) namespace overhaul.
-rw-r--r--include/tpax/tpax.h7
-rw-r--r--project/common.mk2
-rw-r--r--project/tree.mk1
-rw-r--r--src/logic/tpax_archive_write.c2
-rw-r--r--src/meta/tpax_init_ustar_header.c (renamed from src/logic/tpax_init_ustar_header.c)2
5 files changed, 8 insertions, 6 deletions
diff --git a/include/tpax/tpax.h b/include/tpax/tpax.h
index 9dbc73a..3514858 100644
--- a/include/tpax/tpax.h
+++ b/include/tpax/tpax.h
@@ -168,10 +168,11 @@ tpax_api int tpax_main (char **, char **,
tpax_api int tpax_output_error_vector (const struct tpax_driver_ctx *);
tpax_api int tpax_output_error_record (const struct tpax_driver_ctx *, const struct tpax_error_info *);
-/* low-level api */
-tpax_api int tpax_init_ustar_header (const struct tpax_driver_ctx *, const char *, const struct stat *,
- const char *, struct tpax_ustar_header *);
+/* meta interfaces */
+tpax_api int tpax_meta_init_ustar_header (const struct tpax_driver_ctx *, const char *, const struct stat *,
+ const char *, struct tpax_ustar_header *);
+/* low-level api */
tpax_api int tpax_file_create_memory_snapshot (const struct tpax_driver_ctx *, int, const char *,
const struct stat *, void *);
diff --git a/project/common.mk b/project/common.mk
index 637c282..43297fb 100644
--- a/project/common.mk
+++ b/project/common.mk
@@ -4,10 +4,10 @@ API_SRCS = \
src/driver/tpax_unit_ctx.c \
src/logic/tpax_archive_append.c \
src/logic/tpax_archive_write.c \
- src/logic/tpax_init_ustar_header.c \
src/logic/tpax_file_create_memory_snapshot.c \
src/logic/tpax_file_create_tmpfs_snapshot.c \
src/logic/tpax_queue_vector.c \
+ src/meta/tpax_init_ustar_header.c \
src/output/tpax_output_error.c \
src/skin/tpax_skin_default.c \
src/util/tpax_path_copy.c \
diff --git a/project/tree.mk b/project/tree.mk
index 2f68c9e..90a5470 100644
--- a/project/tree.mk
+++ b/project/tree.mk
@@ -2,6 +2,7 @@ TREE_DIRS = bin lib src \
src/driver \
src/internal \
src/logic \
+ src/meta \
src/output \
src/skin \
src/util \
diff --git a/src/logic/tpax_archive_write.c b/src/logic/tpax_archive_write.c
index 707b288..c5109d3 100644
--- a/src/logic/tpax_archive_write.c
+++ b/src/logic/tpax_archive_write.c
@@ -109,7 +109,7 @@ static int tpax_archive_write_impl(
dpos = hpos + sizeof(uhdr);
/* header */
- if (tpax_init_ustar_header(
+ if (tpax_meta_init_ustar_header(
dctx,path,uctx->st,
*uctx->link,&uhdr) < 0)
return tpax_archive_write_ret(
diff --git a/src/logic/tpax_init_ustar_header.c b/src/meta/tpax_init_ustar_header.c
index a02d58f..2479e28 100644
--- a/src/logic/tpax_init_ustar_header.c
+++ b/src/meta/tpax_init_ustar_header.c
@@ -30,7 +30,7 @@ static void tpax_octal_write(char * ch, ssize_t len, uint64_t val)
}
}
-int tpax_init_ustar_header(
+int tpax_meta_init_ustar_header(
const struct tpax_driver_ctx * dctx,
const char * path,
const struct stat * st,