On 31 July 2011 12:51,  <j.scha...@email.de> wrote:
> +    if ((r = getenv("QEMU_STACK_SIZE")) != NULL) {
> +        guest_stack_size = strtoul(r, (char **)&r, 0);
> +        if (guest_stack_size == 0)
> +            usage();
> +        if (*r == 'M')
> +            guest_stack_size *= 1024 * 1024;
> +        else if (*r == 'k' || *r == 'K')
> +            guest_stack_size *= 1024;
> +    }

[etc]

This is all basically duplicating the existing command line
argument parsing code, which (a) makes it very easy for the
two to drift out of sync in future and (b) means command line
options added in future might end up without a corresponding
environment variable.

I think it would be much nicer to have this be table-driven,
to avoid the code duplication. It ought to be possible to
derive most of the extra --help text from the table too.

-- PMM



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to