From 2f4c03923b250a3bbf96188ceb91979841a95e91 Mon Sep 17 00:00:00 2001 From: midipix Date: Fri, 3 Aug 2018 23:16:42 +0000 Subject: library interfaces: archive generation: simplify, re-implement with mmap. --- src/helper/mdso_create_output.c | 33 +++++++-------------------------- 1 file changed, 7 insertions(+), 26 deletions(-) (limited to 'src/helper') diff --git a/src/helper/mdso_create_output.c b/src/helper/mdso_create_output.c index 3b9fe5d..d508cc3 100644 --- a/src/helper/mdso_create_output.c +++ b/src/helper/mdso_create_output.c @@ -60,25 +60,6 @@ static int mdso_map_output( return 0; } -static FILE * mdso_create_output_stream( - const struct mdso_driver_ctx * dctx, - const char * name) -{ - int fdout; - FILE * fout; - - if ((fdout = mdso_create_output(dctx,name)) < 0) - return 0; - - if (!(fout = fdopen(fdout,"w"))) { - close(fdout); - MDSO_SYSTEM_ERROR(dctx); - return 0; - } - - return fout; -} - static int mdso_create_mapped_output( const struct mdso_driver_ctx * dctx, struct mdso_object * obj) @@ -94,13 +75,6 @@ static int mdso_create_mapped_output( return 0; } -FILE * mdso_create_archive( - const struct mdso_driver_ctx * dctx, - const char * arname) -{ - return mdso_create_output_stream(dctx,arname); -} - int mdso_create_asmsrc( const struct mdso_driver_ctx * dctx, const char * asmname) @@ -121,3 +95,10 @@ int mdso_create_object( { return mdso_create_mapped_output(dctx,obj); } + +int mdso_create_archive( + const struct mdso_driver_ctx * dctx, + struct mdso_object * obj) +{ + return mdso_create_mapped_output(dctx,obj); +} -- cgit v1.2.3