diff options
Diffstat (limited to 'include/tpax/tpax.h')
-rw-r--r-- | include/tpax/tpax.h | 72 |
1 files changed, 43 insertions, 29 deletions
diff --git a/include/tpax/tpax.h b/include/tpax/tpax.h index 85cb5cf..00271cb 100644 --- a/include/tpax/tpax.h +++ b/include/tpax/tpax.h @@ -34,7 +34,8 @@ extern "C" { #define TPAX_DRIVER_CLONE_VECTOR 0x0008 #define TPAX_DRIVER_VERSION 0x0010 -#define TPAX_DRIVER_DRY_RUN 0x0020 +#define TPAX_DRIVER_VERBOSE 0x0020 +#define TPAX_DRIVER_DRY_RUN 0x0080 #define TPAX_DRIVER_EXEC_MODE_LIST 0x0100 #define TPAX_DRIVER_EXEC_MODE_READ 0x0200 @@ -54,6 +55,13 @@ extern "C" { #define TPAX_DRIVER_STRICT_PATH_INPUT 0x200000 #define TPAX_DRIVER_PURE_PATH_OUTPUT 0x400000 +#define TPAX_DRIVER_PRESERVE_ATIME 0x1000000 +#define TPAX_DRIVER_PRESERVE_MTIME 0x2000000 +#define TPAX_DRIVER_PAX_SYMLINK_ARGS 0x4000000 +#define TPAX_DRIVER_PAX_SYMLINK_ITEMS 0x8000000 + +#define TPAX_DRIVER_STRICT_DEVICE_ID 0X10000000 + /* error flags */ #define TPAX_ERROR_TOP_LEVEL 0x0001 #define TPAX_ERROR_NESTED 0x0002 @@ -117,6 +125,7 @@ struct tpax_driver_ctx { const char ** units; const char * program; const char * module; + const char * const * file; const struct tpax_common_ctx * cctx; struct tpax_error_info ** errv; const off_t * cpos; @@ -135,49 +144,54 @@ struct tpax_unit_ctx { }; /* driver api */ -tpax_api int tpax_get_driver_ctx (char ** argv, char ** envp, uint32_t flags, - const struct tpax_fd_ctx *, - struct tpax_driver_ctx **); +tpax_api int tpax_lib_get_driver_ctx (char ** argv, char ** envp, uint32_t flags, + const struct tpax_fd_ctx *, + struct tpax_driver_ctx **); + +tpax_api void tpax_lib_free_driver_ctx (struct tpax_driver_ctx *); -tpax_api void tpax_free_driver_ctx (struct tpax_driver_ctx *); +tpax_api int tpax_lib_get_unit_ctx (const struct tpax_driver_ctx *, int, const char * path, + struct tpax_unit_ctx **); -tpax_api int tpax_get_unit_ctx (const struct tpax_driver_ctx *, int, const char * path, - struct tpax_unit_ctx **); +tpax_api void tpax_lib_free_unit_ctx (struct tpax_unit_ctx *); -tpax_api void tpax_free_unit_ctx (struct tpax_unit_ctx *); +tpax_api int tpax_lib_get_driver_fdctx (const struct tpax_driver_ctx *, struct tpax_fd_ctx *); -tpax_api int tpax_get_driver_fdctx (const struct tpax_driver_ctx *, struct tpax_fd_ctx *); -tpax_api int tpax_set_driver_fdctx (struct tpax_driver_ctx *, const struct tpax_fd_ctx *); +tpax_api int tpax_lib_set_driver_fdctx (struct tpax_driver_ctx *, const struct tpax_fd_ctx *); /* core api */ -tpax_api int tpax_archive_append (const struct tpax_driver_ctx *, const struct tpax_unit_ctx *, - const char *); +tpax_api int tpax_archive_enqueue (const struct tpax_driver_ctx *, const struct tpax_unit_ctx *); -tpax_api int tpax_archive_seal (const struct tpax_driver_ctx *); +tpax_api int tpax_archive_write (const struct tpax_driver_ctx *); -/* helper api */ -tpax_api int tpax_path_copy (char *, const char *, size_t, uint32_t, size_t *); -tpax_api int tpax_stat_compare (const struct stat *, const struct stat *); +tpax_api int tpax_archive_reset (const struct tpax_driver_ctx *); + +tpax_api int tpax_archive_seal (const struct tpax_driver_ctx *); + +/* utility helper interfaces */ +tpax_api int tpax_util_path_copy (char *, const char *, size_t, uint32_t, size_t *); +tpax_api int tpax_util_stat_compare (const struct stat *, const struct stat *); /* utility api */ -tpax_api int tpax_main (char **, char **, - const struct tpax_fd_ctx *); -/* error trace api */ -tpax_api int tpax_output_error_record (const struct tpax_driver_ctx *, const struct tpax_error_info *); -tpax_api int tpax_output_error_vector (const struct tpax_driver_ctx *); +tpax_api int tpax_main (char **, char **, + const struct tpax_fd_ctx *); + +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 *); -tpax_api int tpax_file_create_memory_snapshot (const struct tpax_driver_ctx *, int, const char *, - const struct stat *, void *); +/* low-level interfaces */ +tpax_api int tpax_io_create_memory_snapshot(const struct tpax_driver_ctx *, int, const char *, + const struct stat *, void *); -tpax_api int tpax_file_create_tmpfs_snapshot (const struct tpax_driver_ctx *, int, const char *, - const struct stat *); +tpax_api int tpax_io_create_tmpfs_snapshot (const struct tpax_driver_ctx *, int, const char *, + const struct stat *); /* package info */ -tpax_api const struct tpax_source_version * tpax_source_version(void); +tpax_api const struct tpax_source_version * tpax_api_source_version(void); #ifdef __cplusplus } |