Patchwork [1/2] vl.c: call bdrv_init_with_whitelist() before cmdline parsing

login
register
mail settings
Submitter Peter Lieven
Date March 21, 2013, 12:07 p.m.
Message ID <1363867631-5859-1-git-send-email-pl@kamp.de>
Download mbox | patch
Permalink /patch/229640/
State New
Headers show

Comments

Peter Lieven - March 21, 2013, 12:07 p.m.
commit 4d454574 "qemu-option: move standard option definitions
out of qemu-config.c" broke support for commandline option
groups that where registered during bdrv_init(). In particular
support for -iscsi options was broken since that commit.

Fix by moving the bdrv_init_with_whitelist() before command
line argument parsing.

Signed-off-by: Peter Lieven <pl@kamp.de>
---
 vl.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Stefan Hajnoczi - March 25, 2013, 2:09 p.m.
On Thu, Mar 21, 2013 at 01:07:10PM +0100, Peter Lieven wrote:
> commit 4d454574 "qemu-option: move standard option definitions
> out of qemu-config.c" broke support for commandline option
> groups that where registered during bdrv_init(). In particular
> support for -iscsi options was broken since that commit.
> 
> Fix by moving the bdrv_init_with_whitelist() before command
> line argument parsing.
> 
> Signed-off-by: Peter Lieven <pl@kamp.de>
> ---
>  vl.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block

> diff --git a/vl.c b/vl.c
> index aeed7f4..315d43d 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -2935,6 +2935,8 @@ int main(int argc, char **argv, char **envp)
>  
>      nb_numa_nodes = 0;
>      nb_nics = 0;
> +    

I removed the trailing whitespace here.  git-am(1) warns about it.

Patch

diff --git a/vl.c b/vl.c
index aeed7f4..315d43d 100644
--- a/vl.c
+++ b/vl.c
@@ -2935,6 +2935,8 @@  int main(int argc, char **argv, char **envp)
 
     nb_numa_nodes = 0;
     nb_nics = 0;
+    
+    bdrv_init_with_whitelist();
 
     autostart= 1;
 
@@ -4194,8 +4196,6 @@  int main(int argc, char **argv, char **envp)
 
     cpu_exec_init_all();
 
-    bdrv_init_with_whitelist();
-
     blk_mig_init();
 
     /* open the virtual block devices */