aboutsummaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-12-02 04:51:10 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-12-02 04:51:10 +0000
commite4bcb14c79fb63a35aef3eb39e02c16c19b8b28d (patch)
tree06bee4b9dbf4c7b50e20c9996924d7d132cdfec2 /monitor.c
parent7233b355571ad2a8e7aec7eb19db5f530e81f052 (diff)
Add -drive parameter, by Laurent Vivier.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3759 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/monitor.c b/monitor.c
index dd85f847d7..bb05ca6baf 100644
--- a/monitor.c
+++ b/monitor.c
@@ -215,16 +215,11 @@ static void do_commit(const char *device)
int i, all_devices;
all_devices = !strcmp(device, "all");
- for (i = 0; i < MAX_DISKS; i++) {
- if (bs_table[i]) {
+ for (i = 0; i < nb_drives; i++) {
if (all_devices ||
- !strcmp(bdrv_get_device_name(bs_table[i]), device))
- bdrv_commit(bs_table[i]);
- }
+ !strcmp(bdrv_get_device_name(drives_table[i].bdrv), device))
+ bdrv_commit(drives_table[i].bdrv);
}
- if (mtd_bdrv)
- if (all_devices || !strcmp(bdrv_get_device_name(mtd_bdrv), device))
- bdrv_commit(mtd_bdrv);
}
static void do_info(const char *item)