projects
/
sdk
/
emulator
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
698f0d5
)
blkdebug: Initialize state as 1
author
Kevin Wolf
<kwolf@redhat.com>
Wed, 30 Jun 2010 15:43:40 +0000
(17:43 +0200)
committer
Kevin Wolf
<kwolf@redhat.com>
Fri, 2 Jul 2010 11:18:02 +0000
(13:18 +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 <kwolf@redhat.com>
block/blkdebug.c
patch
|
blob
|
history
diff --git
a/block/blkdebug.c
b/block/blkdebug.c
index 78cbff4bdc1c3a20ebc723ad4ea160d6bf5d5e6a..2a63df93234deb358d1f8aaea36bff3f5c122be2 100644
(file)
--- 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) {