qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [COMMIT 73006d2] Fix do_commit() behavior


From: Anthony Liguori
Subject: [Qemu-commits] [COMMIT 73006d2] Fix do_commit() behavior
Date: Mon, 10 Aug 2009 21:48:47 -0000

From: Luiz Capitulino <address@hidden>

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 <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>
Message-Id: 

diff --git a/monitor.c b/monitor.c
index aac8878..4b270d9 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);
     }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]