summaryrefslogtreecommitdiffhomepage
path: root/src/helper
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2018-08-03 23:16:42 +0000
committermidipix <writeonce@midipix.org>2018-08-03 21:13:31 -0400
commit2f4c03923b250a3bbf96188ceb91979841a95e91 (patch)
tree0b0a3fe3c47081345b72e9d7caa25b834c1cfbe9 /src/helper
parent1c93c26f73c2e8746defed21d22d83d08ac16eaf (diff)
downloadmdso-2f4c03923b250a3bbf96188ceb91979841a95e91.tar.bz2
mdso-2f4c03923b250a3bbf96188ceb91979841a95e91.tar.xz
library interfaces: archive generation: simplify, re-implement with mmap.
Diffstat (limited to 'src/helper')
-rw-r--r--src/helper/mdso_create_output.c33
1 files changed, 7 insertions, 26 deletions
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);
+}