qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Fix do_commit() behavior
@ 2009-07-31 18:15 Luiz Capitulino
  2009-08-03  8:47 ` [Qemu-devel] " Gerd Hoffmann
  2009-08-06 15:39 ` [Qemu-devel] " Avi Kivity
  0 siblings, 2 replies; 3+ messages in thread
From: Luiz Capitulino @ 2009-07-31 18:15 UTC (permalink / raw)
  To: qemu-devel; +Cc: aliguori, kraxel


Commit 751c6a17042b5d011013d6963c0505d671cf708e changed the monitor's
'commit' command to this behavior:

1. Any string you type as argument will cause do_commit() to
call bdrv_commit() to all devices

2. If you enter a device name, it will be the only one ignored
by do_commit() :)

The fix is to call bdrv_commit() to the specified device only and
ignore the others (when 'all' is not specified).

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 monitor.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/monitor.c b/monitor.c
index 9093254..32fc26a 100644
--- a/monitor.c
+++ b/monitor.c
@@ -259,7 +259,7 @@ static void do_commit(Monitor *mon, const char *device)
     all_devices = !strcmp(device, "all");
     TAILQ_FOREACH(dinfo, &drives, next) {
         if (!all_devices)
-            if (!strcmp(bdrv_get_device_name(dinfo->bdrv), device))
+            if (strcmp(bdrv_get_device_name(dinfo->bdrv), device))
                 continue;
         bdrv_commit(dinfo->bdrv);
     }
-- 
1.6.4.rc3.12.gdf73a

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-08-06 15:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-31 18:15 [Qemu-devel] [PATCH] Fix do_commit() behavior Luiz Capitulino
2009-08-03  8:47 ` [Qemu-devel] " Gerd Hoffmann
2009-08-06 15:39 ` [Qemu-devel] " Avi Kivity

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).