aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Heimpold <mhei@heimpold.de>2017-12-21 23:59:30 +0100
committerJohn Crispin <john@phrozen.org>2018-01-02 07:14:09 +0100
commit498285922e19d1df55ddef204caced48fef26135 (patch)
tree840e36f7cbffcfc8594f00b90139a18272e2fe37
parent83f729dfb267d5e22aefbba50af06d58057e5c53 (diff)
downloadupstream-498285922e19d1df55ddef204caced48fef26135.tar.gz
upstream-498285922e19d1df55ddef204caced48fef26135.tar.bz2
upstream-498285922e19d1df55ddef204caced48fef26135.zip
firmware-tools/ptgen: use portable exit codes
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
-rw-r--r--tools/firmware-utils/src/ptgen.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/firmware-utils/src/ptgen.c b/tools/firmware-utils/src/ptgen.c
index 93d66ebd1a..13e0eda622 100644
--- a/tools/firmware-utils/src/ptgen.c
+++ b/tools/firmware-utils/src/ptgen.c
@@ -197,7 +197,7 @@ fail:
static void usage(char *prog)
{
fprintf(stderr, "Usage: %s [-v] -h <heads> -s <sectors> -o <outputfile> [-a 0..4] [-l <align kB>] [[-t <type>] -p <size>...] \n", prog);
- exit(1);
+ exit(EXIT_FAILURE);
}
int main (int argc, char **argv)
@@ -224,7 +224,7 @@ int main (int argc, char **argv)
case 'p':
if (part > 3) {
fprintf(stderr, "Too many partitions\n");
- exit(1);
+ exit(EXIT_FAILURE);
}
parts[part].size = to_kbytes(optarg);
parts[part++].type = type;
@@ -252,5 +252,5 @@ int main (int argc, char **argv)
if (argc || (heads <= 0) || (sectors <= 0) || !filename)
usage(argv[0]);
- return gen_ptable(signature, part);
+ return gen_ptable(signature, part) ? EXIT_FAILURE : EXIT_SUCCESS;
}