diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/driver/sfrt_amain.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/driver/sfrt_amain.c b/src/driver/sfrt_amain.c index ebed412..324a010 100644 --- a/src/driver/sfrt_amain.c +++ b/src/driver/sfrt_amain.c @@ -45,22 +45,18 @@ static void sfrt_perform_unit_actions( { uint64_t flags = dctx->cctx->actflags; /* dummy */ /* dummy */ - if (flags & SFRT_OUTPUT_NAME) { /* dummy */ - uctx->status = sfrt_output_name(uctx,stdout); /* dummy */ - uctx->nerrors += !!uctx->status; /* dummy */ - } /* dummy */ + if (flags & SFRT_OUTPUT_NAME) /* dummy */ + sfrt_output_name(uctx,stdout); /* dummy */ /* dummy */ - if (flags & SFRT_OUTPUT_ADDRESS) { /* dummy */ - uctx->status = sfrt_output_address(uctx,stdout);/* dummy */ - uctx->nerrors += !!uctx->status; /* dummy */ - } /* dummy */ - (void)uctx; + if (flags & SFRT_OUTPUT_ADDRESS) /* dummy */ + sfrt_output_address(uctx,stdout); /* dummy */ } -static int sfrt_exit(struct sfrt_driver_ctx * dctx, int nerrors) +static int sfrt_exit(struct sfrt_driver_ctx * dctx, int ret) { + sfrt_output_error_vector(dctx); sfrt_free_driver_ctx(dctx); - return nerrors ? 2 : 0; + return ret; } int sfrt_main(int argc, char ** argv, char ** envp) @@ -84,10 +80,9 @@ int sfrt_main(int argc, char ** argv, char ** envp) for (unit=dctx->units; *unit; unit++) { if (!(sfrt_get_unit_ctx(dctx,*unit,&uctx))) { sfrt_perform_unit_actions(dctx,uctx); - ret += uctx->nerrors; sfrt_free_unit_ctx(uctx); } } - return sfrt_exit(dctx,ret); + return sfrt_exit(dctx,dctx->errv[0] ? 2 : 0); } |