Message ID | 20170612105101.18223-4-daniel.wagner@siemens.com |
---|---|
State | Accepted |
Delegated to: | David Oberhollenzer |
Headers | show |
diff --git a/jffsX-utils/mkfs.jffs2.c b/jffsX-utils/mkfs.jffs2.c index ca5e0d560f98..c77f19005b3e 100644 --- a/jffsX-utils/mkfs.jffs2.c +++ b/jffsX-utils/mkfs.jffs2.c @@ -1629,9 +1629,11 @@ int main(int argc, char **argv) break; case 'h': - case '?': puts(helptext); exit(EXIT_SUCCESS); + case '?': + puts(helptext); + exit(EXIT_FAILURE); case 'v': verbose = 1;
The tool 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> --- jffsX-utils/mkfs.jffs2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)