qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 3/3] blkdebug: Initialize state as 1


From: Kevin Wolf
Subject: [Qemu-devel] [PATCH 3/3] blkdebug: Initialize state as 1
Date: Wed, 30 Jun 2010 17:48:34 +0200

state = 0 in rules means that the rule is valid for any state. Therefore it's
impossible to have a rule that works only in the initial state. This changes
the initial state from 0 to 1 to make this possible.

Signed-off-by: Kevin Wolf <address@hidden>
---
 block/blkdebug.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/block/blkdebug.c b/block/blkdebug.c
index b084782..99340db 100644
--- a/block/blkdebug.c
+++ b/block/blkdebug.c
@@ -306,6 +306,9 @@ static int blkdebug_open(BlockDriverState *bs, const char 
*filename, int flags)
     }
     filename = c + 1;
 
+    /* Set initial state */
+    s->vars.state = 1;
+
     /* Open the backing file */
     ret = bdrv_file_open(&bs->file, filename, flags);
     if (ret < 0) {
-- 
1.6.6.1




reply via email to

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