qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 05/16] qemu-io: Don't use global bs in command i


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH 05/16] qemu-io: Don't use global bs in command implementations
Date: Tue, 28 May 2013 17:37:14 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Am 28.05.2013 um 17:27 hat Kevin Wolf geschrieben:
> Pass in the BlockDriverState to the command handlers instead of using
> the global variable. This is an important step to make the commands
> usable outside of qemu-io.
> 
> Signed-off-by: Kevin Wolf <address@hidden>

> @@ -1793,7 +1808,7 @@ static const cmdinfo_t abort_cmd = {
>         .oneline        = "simulate a program crash using abort(3)",
>  };
>  
> -static int close_f(int argc, char **argv)
> +static int close_f(BlockDriverState *bs, int argc, char **argv)
>  {
>      bdrv_delete(bs);
>      bs = NULL;

Here I missed the following hunk that I've applied locally now:

--- a/qemu-io.c
+++ b/qemu-io.c
@@ -1811,7 +1811,7 @@ static const cmdinfo_t abort_cmd = {
 static int close_f(BlockDriverState *bs, int argc, char **argv)
 {
     bdrv_delete(bs);
-    bs = NULL;
+    qemuio_bs = NULL;
     return 0;
 }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]