* [Qemu-devel] [PATCH] qemu-options: Allow -no-user-config again
@ 2018-05-14 13:45 Michal Privoznik
2018-05-14 14:43 ` Thomas Huth
2018-05-14 17:26 ` Marc-André Lureau
0 siblings, 2 replies; 3+ messages in thread
From: Michal Privoznik @ 2018-05-14 13:45 UTC (permalink / raw)
To: qemu-devel; +Cc: thuth, pbonzini, qemu-trivial
After 1217d6ca2bf28c0febe1bd7d5b3fa912bbf6af2a we error out
explicitly if an unknown -option was passed on the command line.
However, we are doing two pass command line option parsing. In
the first pass we just look for -no-user-config or -nodefconfig
being present which determines whether we load user config or
not. Then in the second pass we finally parse everything else
throwing an error if an unsupported -option was found. Problem is
that in the second pass -no-user-config and -nodefconfig are not
handled explicitly which makes us throw the unsupported option
error.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
vl.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/vl.c b/vl.c
index b9f6b42779..846cd29d8a 100644
--- a/vl.c
+++ b/vl.c
@@ -4015,6 +4015,10 @@ int main(int argc, char **argv, char **envp)
exit(1);
}
break;
+ case QEMU_OPTION_nodefconfig:
+ case QEMU_OPTION_nouserconfig:
+ /* Nothing to be parsed here. Especially, do not error out below. */
+ break;
default:
if (os_parse_cmd_args(popt->index, optarg)) {
error_report("Option not supported in this build");
--
2.16.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu-options: Allow -no-user-config again
2018-05-14 13:45 [Qemu-devel] [PATCH] qemu-options: Allow -no-user-config again Michal Privoznik
@ 2018-05-14 14:43 ` Thomas Huth
2018-05-14 17:26 ` Marc-André Lureau
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Huth @ 2018-05-14 14:43 UTC (permalink / raw)
To: Michal Privoznik, qemu-devel; +Cc: qemu-trivial, pbonzini
On 14.05.2018 15:45, Michal Privoznik wrote:
> After 1217d6ca2bf28c0febe1bd7d5b3fa912bbf6af2a we error out
> explicitly if an unknown -option was passed on the command line.
> However, we are doing two pass command line option parsing. In
> the first pass we just look for -no-user-config or -nodefconfig
> being present which determines whether we load user config or
> not. Then in the second pass we finally parse everything else
> throwing an error if an unsupported -option was found. Problem is
> that in the second pass -no-user-config and -nodefconfig are not
> handled explicitly which makes us throw the unsupported option
> error.
>
> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
> ---
> vl.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/vl.c b/vl.c
> index b9f6b42779..846cd29d8a 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -4015,6 +4015,10 @@ int main(int argc, char **argv, char **envp)
> exit(1);
> }
> break;
> + case QEMU_OPTION_nodefconfig:
> + case QEMU_OPTION_nouserconfig:
> + /* Nothing to be parsed here. Especially, do not error out below. */
> + break;
> default:
> if (os_parse_cmd_args(popt->index, optarg)) {
> error_report("Option not supported in this build");
>
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu-options: Allow -no-user-config again
2018-05-14 13:45 [Qemu-devel] [PATCH] qemu-options: Allow -no-user-config again Michal Privoznik
2018-05-14 14:43 ` Thomas Huth
@ 2018-05-14 17:26 ` Marc-André Lureau
1 sibling, 0 replies; 3+ messages in thread
From: Marc-André Lureau @ 2018-05-14 17:26 UTC (permalink / raw)
To: Michal Privoznik; +Cc: QEMU, qemu trival, Paolo Bonzini, Thomas Huth
On Mon, May 14, 2018 at 3:45 PM, Michal Privoznik <mprivozn@redhat.com> wrote:
> After 1217d6ca2bf28c0febe1bd7d5b3fa912bbf6af2a we error out
> explicitly if an unknown -option was passed on the command line.
> However, we are doing two pass command line option parsing. In
> the first pass we just look for -no-user-config or -nodefconfig
> being present which determines whether we load user config or
> not. Then in the second pass we finally parse everything else
> throwing an error if an unsupported -option was found. Problem is
> that in the second pass -no-user-config and -nodefconfig are not
> handled explicitly which makes us throw the unsupported option
> error.
>
> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> vl.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/vl.c b/vl.c
> index b9f6b42779..846cd29d8a 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -4015,6 +4015,10 @@ int main(int argc, char **argv, char **envp)
> exit(1);
> }
> break;
> + case QEMU_OPTION_nodefconfig:
> + case QEMU_OPTION_nouserconfig:
> + /* Nothing to be parsed here. Especially, do not error out below. */
> + break;
> default:
> if (os_parse_cmd_args(popt->index, optarg)) {
> error_report("Option not supported in this build");
> --
> 2.16.1
>
>
--
Marc-André Lureau
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-05-14 17:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-14 13:45 [Qemu-devel] [PATCH] qemu-options: Allow -no-user-config again Michal Privoznik
2018-05-14 14:43 ` Thomas Huth
2018-05-14 17:26 ` Marc-André Lureau
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.