summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/sofort/sofort.h5
-rw-r--r--src/driver/sfrt_amain.c8
2 files changed, 6 insertions, 7 deletions
diff --git a/include/sofort/sofort.h b/include/sofort/sofort.h
index 4a59e6c..ff1fb60 100644
--- a/include/sofort/sofort.h
+++ b/include/sofort/sofort.h
@@ -21,10 +21,7 @@ extern "C" {
/* status codes */
#define SFRT_OK 0x00
#define SFRT_USAGE 0x01
-#define SFRT_BAD_OPT 0x02
-#define SFRT_BAD_OPT_VAL 0x03
-#define SFRT_IO_ERROR 0xA0
-#define SFRT_MAP_ERROR 0xA1
+#define SFRT_ERROR 0x02
/* driver flags */
#define SFRT_DRIVER_VERBOSITY_NONE 0x0000
diff --git a/src/driver/sfrt_amain.c b/src/driver/sfrt_amain.c
index 324a010..d9ee482 100644
--- a/src/driver/sfrt_amain.c
+++ b/src/driver/sfrt_amain.c
@@ -67,11 +67,13 @@ int sfrt_main(int argc, char ** argv, char ** envp)
const char ** unit;
if ((ret = sfrt_get_driver_ctx(argv,envp,SFRT_DRIVER_FLAGS,&dctx)))
- return (ret == SFRT_USAGE) ? !--argc : 2;
+ return (ret == SFRT_USAGE)
+ ? !--argc
+ : SFRT_ERROR;
if (dctx->cctx->drvflags & SFRT_DRIVER_VERSION)
if ((sfrt_version(dctx)) < 0)
- return sfrt_exit(dctx,2);
+ return sfrt_exit(dctx,SFRT_ERROR);
if (dctx->cctx->anystring) /* dummy */
if ((sfrt_output_dummy(dctx->cctx,stdout)) < 0) /* dummy */
@@ -84,5 +86,5 @@ int sfrt_main(int argc, char ** argv, char ** envp)
}
}
- return sfrt_exit(dctx,dctx->errv[0] ? 2 : 0);
+ return sfrt_exit(dctx,dctx->errv[0] ? SFRT_ERROR : SFRT_OK);
}