David Wilder wrote:
> This patches changes argument parsing for ppc64 for the command "kexec
> -p". We now ignore unrecognized options. This allows for more
> consistency
> of the command line between archs. For example Intel platforms
> use the --args-linux option ppc64 dose not. With this change the same
> command-line can used now on both system types.
>
>------------------------------------------------------------------------
>
>This patches changes argument parsing for ppc64 for the command "kexec -p".
>We now ignore unrecognized options. This allows for more consistency
>of the command line between archs. For example Intel platforms
>use the --args-linux option ppc64 dose not. With this change the same
>command-line can used now on both system types.
>
>Signed-off-by: David Wilder <[EMAIL PROTECTED]>
>
>diff --git a/kexec/arch/ppc64/kexec-elf-ppc64.c
>b/kexec/arch/ppc64/kexec-elf-ppc64.c
>index 471257d..1709980 100644
>--- a/kexec/arch/ppc64/kexec-elf-ppc64.c
>+++ b/kexec/arch/ppc64/kexec-elf-ppc64.c
>@@ -115,6 +115,7 @@ int elf_ppc64_load(int argc, char **argv
> max_addr = 0xFFFFFFFFFFFFFFFFUL;
> hole_addr = 0;
>
>+ opterr = 0; /* Don't complain about unrecognized options here */
> while ((opt = getopt_long(argc, argv, short_options,
> options, 0)) != -1) {
> switch (opt) {
>@@ -123,8 +124,7 @@ int elf_ppc64_load(int argc, char **argv
> if (opt < OPT_ARCH_MAX)
> break;
> case '?':
>- usage();
>- return -1;
>+ break;
> case OPT_APPEND:
> cmdline = optarg;
> break;
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>fastboot mailing list
>[email protected]
>https://lists.osdl.org/mailman/listinfo/fastboot
>
>
Haren, suggested that I just ignore the args-linux option for ppc64
rather than ignore all unknown options. Since this is what I am trying
to accomplish. The advantage being that that malformed arguments and
typos will still generate an error. I agree, I will be posting a new
patch with a new subject.
--
David Wilder
IBM Linux Technology Center
Beaverton, Oregon, USA
[EMAIL PROTECTED]
(503)578-3789
_______________________________________________
fastboot mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/fastboot