summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/driver/mdso_amain.c9
-rw-r--r--src/output/mdso_output_export_symbols.c11
2 files changed, 12 insertions, 8 deletions
diff --git a/src/driver/mdso_amain.c b/src/driver/mdso_amain.c
index a00e2d1..a952b02 100644
--- a/src/driver/mdso_amain.c
+++ b/src/driver/mdso_amain.c
@@ -46,12 +46,15 @@ static ssize_t mdso_version(struct mdso_driver_ctx * dctx)
verclr[4],verinfo->commit,verclr[5]);
}
-static void mdso_perform_unit_actions(struct mdso_unit_ctx * uctx)
+static void mdso_perform_unit_actions(
+ struct mdso_driver_ctx * dctx,
+ struct mdso_unit_ctx * uctx)
{
uint64_t flags = uctx->cctx->fmtflags;
if (flags & MDSO_OUTPUT_EXPORT_SYMS) {
- uctx->status = mdso_output_export_symbols(uctx,uctx->cctx,stdout);
+ uctx->status = mdso_output_export_symbols(
+ dctx,uctx,stdout);
uctx->nerrors += !!uctx->status;
}
}
@@ -78,7 +81,7 @@ int mdso_main(int argc, char ** argv, char ** envp)
for (unit=dctx->units; *unit; unit++) {
if (!(mdso_get_unit_ctx(dctx,*unit,&uctx))) {
- mdso_perform_unit_actions(uctx);
+ mdso_perform_unit_actions(dctx,uctx);
ret += uctx->nerrors;
mdso_free_unit_ctx(uctx);
}
diff --git a/src/output/mdso_output_export_symbols.c b/src/output/mdso_output_export_symbols.c
index 234fce9..097b8a2 100644
--- a/src/output/mdso_output_export_symbols.c
+++ b/src/output/mdso_output_export_symbols.c
@@ -12,6 +12,7 @@
#include <mdso/mdso.h>
#include <mdso/mdso_output.h>
+#include "mdso_errinfo_impl.h"
static int pretty_header(const struct mdso_common_ctx * cctx, FILE * fout)
{
@@ -29,8 +30,8 @@ static int pretty_export_item(const struct mdso_common_ctx * cctx, const char *
}
int mdso_output_export_symbols(
+ const struct mdso_driver_ctx * dctx,
const struct mdso_unit_ctx * uctx,
- const struct mdso_common_ctx * cctx,
FILE * fout)
{
const char * const * sym;
@@ -38,12 +39,12 @@ int mdso_output_export_symbols(
if (!uctx->syms[0])
return 0;
- if ((pretty_header(cctx,fout)) < 0)
- return -1;
+ if ((pretty_header(dctx->cctx,fout)) < 0)
+ return MDSO_FILE_ERROR(dctx);
for (sym=uctx->syms; *sym; sym++)
- if ((pretty_export_item(cctx,*sym,fout)) < 0)
- return -1;
+ if ((pretty_export_item(dctx->cctx,*sym,fout)) < 0)
+ return MDSO_FILE_ERROR(dctx);
return 0;
}