summaryrefslogtreecommitdiff
path: root/jffsX-utils/sumtool.c
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@siemens.com>2017-06-12 12:50:42 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2017-06-14 10:55:26 +0200
commit12e27a1b2adf14c33694db82e1f6f8bde560b9a2 (patch)
treed101a43c524488d1a146ecd3e7ac547f3ec67f32 /jffsX-utils/sumtool.c
parent9a357ee3b12e180ab116ac811c20c153e7aed254 (diff)
jffsX-utils: Return error code if command line option is unknown
The tools in question will quit with an exit code 0 if the command line option was not recognized. By returning an error code a calling script has the possibility to distinguish between a real success and an invalid invocation. Signed-off-by: Daniel Wagner <daniel.wagner@siemens.com> Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'jffsX-utils/sumtool.c')
-rw-r--r--jffsX-utils/sumtool.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/jffsX-utils/sumtool.c b/jffsX-utils/sumtool.c
index 0958615..a995bdf 100644
--- a/jffsX-utils/sumtool.c
+++ b/jffsX-utils/sumtool.c
@@ -156,9 +156,11 @@ void process_options (int argc, char **argv)
target_endian = __LITTLE_ENDIAN;
break;
case 'h':
- case '?':
puts(helptext);
exit(EXIT_SUCCESS);
+ case '?':
+ puts(helptext);
+ exit(EXIT_FAILURE);
case 'v':
verbose = 1;
break;