summaryrefslogtreecommitdiff
path: root/src/driver
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-10-24 13:07:39 -0400
committermidipix <writeonce@midipix.org>2016-11-11 00:22:50 -0500
commit99b875dda2bc51ebc832fb9e380d3bdcc1097c8f (patch)
tree037363ba9948e245b2e1897cfcaa12583dc4663d /src/driver
parent461b1f7c8ca47552875770ca4af8609ec8a0e802 (diff)
downloadmdso-99b875dda2bc51ebc832fb9e380d3bdcc1097c8f.tar.bz2
mdso-99b875dda2bc51ebc832fb9e380d3bdcc1097c8f.tar.xz
driver: status codes: refactor and normalize.
Diffstat (limited to 'src/driver')
-rw-r--r--src/driver/mdso_amain.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/driver/mdso_amain.c b/src/driver/mdso_amain.c
index 3dbf215..b2e36f1 100644
--- a/src/driver/mdso_amain.c
+++ b/src/driver/mdso_amain.c
@@ -72,11 +72,13 @@ int mdso_main(int argc, char ** argv, char ** envp)
const char ** unit;
if ((ret = mdso_get_driver_ctx(argv,envp,MDSO_DRIVER_FLAGS,&dctx)))
- return (ret == MDSO_USAGE) ? !--argc : 2;
+ return (ret == MDSO_USAGE)
+ ? !--argc
+ : MDSO_ERROR;
if (dctx->cctx->drvflags & MDSO_DRIVER_VERSION)
if ((mdso_version(dctx)) < 0)
- return mdso_exit(dctx,2);
+ return mdso_exit(dctx,MDSO_ERROR);
for (unit=dctx->units; *unit && !dctx->errv[0]; unit++) {
if (!(mdso_get_unit_ctx(dctx,*unit,&uctx))) {
@@ -88,5 +90,5 @@ int mdso_main(int argc, char ** argv, char ** envp)
if (*dctx->units && !dctx->errv[0])
mdso_create_implib_sources(dctx);
- return mdso_exit(dctx,dctx->errv[0] ? 2 : 0);
+ return mdso_exit(dctx,dctx->errv[0] ? MDSO_ERROR : MDSO_OK);
}