qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com
Subject: [Qemu-devel] [PATCH v2 4/4] blkdebug: Initialize state as 1
Date: Thu,  1 Jul 2010 13:11:34 +0200	[thread overview]
Message-ID: <1277982694-28563-5-git-send-email-kwolf@redhat.com> (raw)
In-Reply-To: <1277982694-28563-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 78cbff4..2a63df9 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) {
-- 
1.6.6.1

  parent reply	other threads:[~2010-07-01 11:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-01 11:11 [Qemu-devel] [PATCH v2 0/4] blkdebug: Fix config with multiple states Kevin Wolf
2010-07-01 11:11 ` [Qemu-devel] [PATCH v2 1/4] qemu-option: New qemu_opts_reset() Kevin Wolf
2010-07-01 11:11 ` [Qemu-devel] [PATCH v2 2/4] blkdebug: Fix set_state_opts definition Kevin Wolf
2010-07-01 11:11 ` [Qemu-devel] [PATCH v2 3/4] blkdebug: Free QemuOpts after having read the config Kevin Wolf
2010-07-01 11:11 ` Kevin Wolf [this message]
2010-07-01 12:08 ` [Qemu-devel] [PATCH v2 0/4] 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=1277982694-28563-5-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).