summaryrefslogtreecommitdiff
path: root/src/driver
diff options
context:
space:
mode:
Diffstat (limited to 'src/driver')
-rw-r--r--src/driver/amgc_amain.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/driver/amgc_amain.c b/src/driver/amgc_amain.c
index 41b174c..41e188f 100644
--- a/src/driver/amgc_amain.c
+++ b/src/driver/amgc_amain.c
@@ -68,11 +68,13 @@ int amgc_main(int argc, char ** argv, char ** envp)
const char ** unit;
if ((ret = amgc_get_driver_ctx(argv,envp,AMGC_DRIVER_FLAGS,&dctx)))
- return (ret == AMGC_USAGE) ? !--argc : 2;
+ return (ret == AMGC_USAGE)
+ ? !--argc
+ : AMGC_ERROR;
if (dctx->cctx->drvflags & AMGC_DRIVER_VERSION)
if ((amgc_version(dctx)) < 0)
- return amgc_exit(dctx,2);
+ return amgc_exit(dctx,AMGC_ERROR);
for (unit=dctx->units; *unit; unit++) {
if (!(amgc_get_unit_ctx(dctx,*unit,&uctx))) {
@@ -81,5 +83,5 @@ int amgc_main(int argc, char ** argv, char ** envp)
}
}
- return amgc_exit(dctx,dctx->errv[0] ? 2 : 0);
+ return amgc_exit(dctx,dctx->errv[0] ? AMGC_ERROR : AMGC_OK);
}