From: Kevin Wolf <kwolf@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com
Subject: [Qemu-devel] [PATCH 3/3] blkdebug: Initialize state as 1
Date: Wed, 30 Jun 2010 17:48:34 +0200 [thread overview]
Message-ID: <1277912914-21771-4-git-send-email-kwolf@redhat.com> (raw)
In-Reply-To: <1277912914-21771-1-git-send-email-kwolf@redhat.com>
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 | 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
next prev parent reply other threads:[~2010-06-30 15:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-30 15:48 [Qemu-devel] [PATCH 0/3] blkdebug: Fix config with multiple states Kevin Wolf
2010-06-30 15:48 ` [Qemu-devel] [PATCH 1/3] blkdebug: Fix set_state_opts definition Kevin Wolf
2010-06-30 15:48 ` [Qemu-devel] [PATCH 2/3] blkdebug: Free QemuOpts after having read the config Kevin Wolf
2010-07-01 6:47 ` Markus Armbruster
2010-07-01 7:29 ` Kevin Wolf
2010-06-30 15:48 ` Kevin Wolf [this message]
2010-07-01 6:50 ` [Qemu-devel] [PATCH 0/3] blkdebug: Fix config with multiple states Markus Armbruster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1277912914-21771-4-git-send-email-kwolf@redhat.com \
--to=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).