aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2010-06-30 17:43:40 +0200
committerKevin Wolf <kwolf@redhat.com>2010-07-02 13:18:02 +0200
commit8db520cee89bb84f21d107cea2d786894901bc54 (patch)
treeaf5a1b1adba7a6dc2188b946fcfc6c7da9dfd070
parent698f0d52cde708557801de3c583cafc4a0497a14 (diff)
blkdebug: Initialize state as 1
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 <kwolf@redhat.com>
-rw-r--r--block/blkdebug.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/block/blkdebug.c b/block/blkdebug.c
index 78cbff4bdc..2a63df9323 100644
--- a/block/blkdebug.c
+++ b/block/blkdebug.c
@@ -301,6 +301,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) {