summaryrefslogtreecommitdiff
path: root/misc-utils
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@siemens.com>2017-06-12 12:50:43 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2017-06-14 10:53:15 +0200
commitccffc105b0b361150666f97b59ac72cff8466e9b (patch)
tree4c4b7022317a42172a187fa681896c514b27255e /misc-utils
parent871c2f1e898fc692e2966092372ee9c4ce31bbc0 (diff)
Use defines for exit code values
Make the usage of exit consist. That is use the pre defined exit values. Signed-off-by: Daniel Wagner <daniel.wagner@siemens.com> Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'misc-utils')
-rw-r--r--misc-utils/flash_unlock.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/misc-utils/flash_unlock.c b/misc-utils/flash_unlock.c
index 94f4761..5a3aac5 100644
--- a/misc-utils/flash_unlock.c
+++ b/misc-utils/flash_unlock.c
@@ -87,7 +87,7 @@ static void process_args(int argc, char *argv[])
switch (c) {
case 'h':
- usage(0);
+ usage(EXIT_SUCCESS);
break;
case 'i':
req = REQUEST_ISLOCKED;
@@ -105,14 +105,14 @@ static void process_args(int argc, char *argv[])
common_print_version();
exit(0);
default:
- usage(1);
+ usage(EXIT_FAILURE);
break;
}
}
if (req_set > 1) {
errmsg("cannot specify more than one lock/unlock/islocked option");
- usage(1);
+ usage(EXIT_FAILURE);
}
arg_idx = optind;
@@ -120,10 +120,10 @@ static void process_args(int argc, char *argv[])
/* Sanity checks */
if (argc - arg_idx < 1) {
errmsg("too few arguments");
- usage(1);
+ usage(EXIT_FAILURE);
} else if (argc - arg_idx > 3) {
errmsg("too many arguments");
- usage(1);
+ usage(EXIT_FAILURE);
}
/* First non-option argument */