diff options
author | midipix <writeonce@midipix.org> | 2024-02-19 02:47:06 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2024-02-19 02:59:31 +0000 |
commit | 932ec07826884a89addd9d0f3b436748dba65881 (patch) | |
tree | c896d5e3f78eca4c9485664a2b574d3f08ecd09e | |
parent | f0270acfad9d499f6a701d1df1cb08f09412eb93 (diff) | |
download | slibtool-932ec07826884a89addd9d0f3b436748dba65881.tar.bz2 slibtool-932ec07826884a89addd9d0f3b436748dba65881.tar.xz |
library api's: _fs_ (file system and raw input interfaces) namespace overhaul.
-rw-r--r-- | include/slibtool/slibtool.h | 4 | ||||
-rw-r--r-- | src/arbits/slbt_archive_ctx.c | 4 | ||||
-rw-r--r-- | src/util/slbt_map_input.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/include/slibtool/slibtool.h b/include/slibtool/slibtool.h index f26e4aa..0ba929b 100644 --- a/include/slibtool/slibtool.h +++ b/include/slibtool/slibtool.h @@ -339,11 +339,11 @@ struct slbt_archive_ctx { }; /* raw input api */ -slbt_api int slbt_map_input (const struct slbt_driver_ctx *, +slbt_api int slbt_fs_map_input (const struct slbt_driver_ctx *, int, const char *, int, struct slbt_input *); -slbt_api int slbt_unmap_input (struct slbt_input *); +slbt_api int slbt_fs_unmap_input (struct slbt_input *); /* driver api */ slbt_api int slbt_lib_get_driver_ctx (char ** argv, char ** envp, uint64_t flags, diff --git a/src/arbits/slbt_archive_ctx.c b/src/arbits/slbt_archive_ctx.c index 777b0d5..a110e97 100644 --- a/src/arbits/slbt_archive_ctx.c +++ b/src/arbits/slbt_archive_ctx.c @@ -23,7 +23,7 @@ static int slbt_map_raw_archive( { struct slbt_input mapinfo = {0,0}; - if (slbt_map_input(dctx,fd,path,prot,&mapinfo) < 0) + if (slbt_fs_map_input(dctx,fd,path,prot,&mapinfo) < 0) return SLBT_NESTED_ERROR(dctx); if (mapinfo.size == 0) @@ -44,7 +44,7 @@ static int slbt_unmap_raw_archive(struct slbt_raw_archive * map) mapinfo.addr = map->map_addr; mapinfo.size = map->map_size; - return slbt_unmap_input(&mapinfo); + return slbt_fs_unmap_input(&mapinfo); } static int slbt_ar_free_archive_ctx_impl(struct slbt_archive_ctx_impl * ctx, int ret) diff --git a/src/util/slbt_map_input.c b/src/util/slbt_map_input.c index ca0b06b..0a7b6d3 100644 --- a/src/util/slbt_map_input.c +++ b/src/util/slbt_map_input.c @@ -16,7 +16,7 @@ #include "slibtool_driver_impl.h" #include "slibtool_errinfo_impl.h" -int slbt_map_input( +int slbt_fs_map_input( const struct slbt_driver_ctx * dctx, int fd, const char * path, @@ -61,7 +61,7 @@ int slbt_map_input( : 0; } -int slbt_unmap_input(struct slbt_input * map) +int slbt_fs_unmap_input(struct slbt_input * map) { return map->size ? munmap(map->addr,map->size) : 0; } |