summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/perk/perk.h5
-rw-r--r--src/driver/pe_amain.c8
2 files changed, 6 insertions, 7 deletions
diff --git a/include/perk/perk.h b/include/perk/perk.h
index 46ade42..99bdb8f 100644
--- a/include/perk/perk.h
+++ b/include/perk/perk.h
@@ -24,10 +24,7 @@ extern "C" {
/* status codes */
#define PERK_OK 0x00
#define PERK_USAGE 0x01
-#define PERK_BAD_OPT 0x02
-#define PERK_BAD_OPT_VAL 0x03
-#define PERK_IO_ERROR 0xA0
-#define PERK_MAP_ERROR 0xA1
+#define PERK_ERROR 0x02
/* driver flags */
#define PERK_DRIVER_VERBOSITY_NONE 0x0000
diff --git a/src/driver/pe_amain.c b/src/driver/pe_amain.c
index be3d09f..d7f0046 100644
--- a/src/driver/pe_amain.c
+++ b/src/driver/pe_amain.c
@@ -93,11 +93,13 @@ int pe_main(int argc, char ** argv, char ** envp)
const char ** unit;
if ((ret = pe_get_driver_ctx(argv,envp,PERK_DRIVER_FLAGS,&dctx)))
- return (ret == PERK_USAGE) ? !--argc : 2;
+ return (ret == PERK_USAGE)
+ ? !--argc
+ : PERK_ERROR;
if (dctx->cctx->drvflags & PERK_DRIVER_VERSION)
if ((pe_version(dctx)) < 0)
- return pe_exit(dctx,2);
+ return pe_exit(dctx,PERK_ERROR);
for (unit=dctx->units; *unit; unit++) {
if (!(pe_get_unit_ctx(dctx,*unit,&uctx))) {
@@ -106,5 +108,5 @@ int pe_main(int argc, char ** argv, char ** envp)
}
}
- return pe_exit(dctx,dctx->errv[0] ? 2 : 0);
+ return pe_exit(dctx,dctx->errv[0] ? PERK_ERROR : PERK_OK);
}