qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: anthony@codemonkey.ws
Cc: kwolf@redhat.com, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 15/23] blkdebug: Initialize state as 1
Date: Fri,  2 Jul 2010 18:38:24 +0200	[thread overview]
Message-ID: <1278088712-12302-16-git-send-email-kwolf@redhat.com> (raw)
In-Reply-To: <1278088712-12302-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-02 16:56 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-02 16:38 [Qemu-devel] [PULL 00/23] Block patches Kevin Wolf
2010-07-02 16:38 ` [Qemu-devel] [PATCH 01/23] qcow2: Fix error handling during metadata preallocation Kevin Wolf
2010-07-02 16:38 ` [Qemu-devel] [PATCH 02/23] block: allow filenames with colons again for host devices Kevin Wolf
2010-07-02 16:38 ` [Qemu-devel] [PATCH 03/23] scsi: scsi_bus_legacy_handle_cmdline() can fail, fix callers Kevin Wolf
2010-07-02 16:38 ` [Qemu-devel] [PATCH 04/23] ide: Make it explicit that ide_create_drive() can't fail Kevin Wolf
2010-07-02 16:38 ` [Qemu-devel] [PATCH 05/23] blockdev: Remove drive_get_serial() Kevin Wolf
2010-07-02 16:38 ` [Qemu-devel] [PATCH 06/23] Don't reset bs->is_temporary in bdrv_open_common Kevin Wolf
2010-07-02 16:38 ` [Qemu-devel] [PATCH 07/23] blockdev: New drive_get_by_blockdev() Kevin Wolf
2010-07-02 16:38 ` [Qemu-devel] [PATCH 08/23] blockdev: Clean up automatic drive deletion Kevin Wolf
2010-07-02 16:38 ` [Qemu-devel] [PATCH 09/23] qdev: Decouple qdev_prop_drive from DriveInfo Kevin Wolf
2010-07-02 16:38 ` [Qemu-devel] [PATCH 10/23] blockdev: drive_get_by_id() is no longer used, remove Kevin Wolf
2010-07-02 16:38 ` [Qemu-devel] [PATCH 11/23] block: Catch attempt to attach multiple devices to a blockdev Kevin Wolf
2010-07-02 16:38 ` [Qemu-devel] [PATCH 12/23] qemu-option: New qemu_opts_reset() Kevin Wolf
2010-07-02 16:38 ` [Qemu-devel] [PATCH 13/23] blkdebug: Fix set_state_opts definition Kevin Wolf
2010-07-02 16:38 ` [Qemu-devel] [PATCH 14/23] blkdebug: Free QemuOpts after having read the config Kevin Wolf
2010-07-02 16:38 ` Kevin Wolf [this message]
2010-07-02 16:38 ` [Qemu-devel] [PATCH 16/23] savevm: Survive hot-unplug of snapshot device Kevin Wolf
2010-07-02 16:38 ` [Qemu-devel] [PATCH 17/23] block: Clean up bdrv_snapshots() Kevin Wolf
2010-07-02 16:38 ` [Qemu-devel] [PATCH 18/23] block: Fix virtual media change for if=none Kevin Wolf
2010-07-02 16:38 ` [Qemu-devel] [PATCH 19/23] ide: Make PIIX and ISA IDE init functions return the qdev Kevin Wolf
2010-07-02 16:38 ` [Qemu-devel] [PATCH 20/23] pc: Fix CMOS info for drives defined with -device Kevin Wolf
2010-07-02 16:38 ` [Qemu-devel] [PATCH 21/23] qemu-img: avoid calling exit(1) to release resources properly Kevin Wolf
2010-07-02 16:38 ` [Qemu-devel] [PATCH 22/23] block: Fix early failure in multiwrite Kevin Wolf
2010-07-02 16:38 ` [Qemu-devel] [PATCH 23/23] block: Handle multiwrite errors only when all requests have completed Kevin Wolf

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=1278088712-12302-16-git-send-email-kwolf@redhat.com \
    --to=kwolf@redhat.com \
    --cc=anthony@codemonkey.ws \
    --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).