Return error code in case of invalid command line option
Subsystems (2)
PATCH 1/1 Return error code in case of invalid command line option
Currently kexec returns success even if an invalid command line option is encountered. Kexec currently prints usage message and then returns
0. That's not right. It is an error and error code 1 should be returned.
Due to this wrapper script thinks that kdump succeeded but that's not the case.
--- kexec/kexec.c | 2 ++ 1 file changed, 2 insertions(+)
kexec/kexec.c +2 -0
@@ -1209,6 +1209,8 @@ int main(int argc, char *argv[]) options, 0)) != -1) {switch (opt) {case '?' : +usage (); +return 1 ;case OPT_HELP :usage ();return 0 ;
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Simon Horman
AppliedQuoted 8 lines · Vivek Goyal
Currently kexec returns success even if an invalid command line option is encountered. Kexec currently prints usage message and then returns
0. That's not right. It is an error and error code 1 should be returned.Due to this wrapper script thinks that kdump succeeded but that's not the case.
Signed-off-by Vivek Goyal <[email protected]>
Thanks, applied.
Quoted 10 lines
--- kexec/kexec.c | 2 ++ 1 file changed, 2 insertions(+)Index:
kexec-tools/kexec/kexec.c
===================================================================
kexec/kexec.c int main(int argc, char *argv[]) · line 1216
Quoted 8 lines
kexec/kexec.c +2
-0@@ -1209,6 +1209,8 @@ int main(int argc, char *argv[]) options, 0)) != -1) {switch (opt) {case '?' : +usage (); +return 1 ;case OPT_HELP :usage ();return 0 ;
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec