[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 10/16] Introduce OS specific cmdline argument ha
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH 10/16] Introduce OS specific cmdline argument handling and move SMB arg to os-posix.c |
Date: |
Thu, 03 Jun 2010 13:58:28 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-3.fc13 Thunderbird/3.0.4 |
On 06/03/2010 09:48 AM, address@hidden wrote:
> +/*
> + * Duplicate definition from vl.c to avoid messing up the entire build
> + */
> +enum {
> +#define DEF(option, opt_arg, opt_enum, opt_help, arch_mask) \
> + opt_enum,
> +#define DEFHEADING(text)
> +#include "qemu-options.h"
> +#undef DEF
> +#undef DEFHEADING
> +#undef GEN_DOCS
> +};
There's no header file you can put this in? Or invent to put this in?
Cause this is really kinda gross...
> +
> +/*
> + * Parse OS specific command line options.
> + * return 0 if option handled, -1 otherwise
> + */
> +int os_parse_cmd_args(const QEMUOption *popt, const char *optarg)
> +{
> + int ret = 0;
> + switch (popt->index) {
> +#ifdef CONFIG_SLIRP
> + case QEMU_OPTION_smb:
> + if (net_slirp_smb(optarg) < 0)
> + exit(1);
> + break;
> +#endif
> + default:
> + ret = -1;
> + }
> + return ret;
> +}
Why have a return value at all...
> + default:
> + os_parse_cmd_args(popt, optarg);
... if you're going to ignore the results?
r~
Re: [Qemu-devel] [PATCH 10/16] Introduce OS specific cmdline argument handling and move SMB arg to os-posix.c, Markus Armbruster, 2010/06/04
Re: [Qemu-devel] [PATCH 10/16] Introduce OS specific cmdline argument handling and move SMB arg to os-posix.c, Markus Armbruster, 2010/06/04
Re: [Qemu-devel] [PATCH 10/16] Introduce OS specific cmdline argument handling and move SMB arg to os-posix.c, Jes Sorensen, 2010/06/04
[Qemu-devel] [PATCH 13/16] Move daemonize handling to OS specific files, Jes . Sorensen, 2010/06/03