[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 05/23] Modify qemu_opt_rename to realize renaming all
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL 05/23] Modify qemu_opt_rename to realize renaming all items in opts |
Date: |
Sat, 4 Oct 2014 21:24:31 +0100 |
From: Jun Li <address@hidden>
Add realization of rename all items in opts for qemu_opt_rename.
e.g:
When add bps twice in command line, need to rename all bps to
throttling.bps-total.
This patch solved following bug:
Bug 1145586 - qemu-kvm will give strange hint when add bps twice for a drive
ref:https://bugzilla.redhat.com/show_bug.cgi?id=1145586
[Resolved conflict with commit 5abbf0ee4d87c695deb1c3fca9bb994b93a3e3be
("block: Catch simultaneous usage of options and their aliases"). Check
for simultaneous use first, and then loop over all options.
--Stefan]
Signed-off-by: Jun Li <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
blockdev.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/blockdev.c b/blockdev.c
index 2f441c5..dc94ad3 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -548,6 +548,10 @@ static void qemu_opt_rename(QemuOpts *opts, const char
*from, const char *to,
"same time", to, from);
return;
}
+ }
+
+ /* rename all items in opts */
+ while ((value = qemu_opt_get(opts, from))) {
qemu_opt_set(opts, to, value);
qemu_opt_unset(opts, from);
}
--
1.9.3
- [Qemu-devel] [PULL 00/23] Block patches, Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 01/23] snapshot: fix referencing wrong variable in while loop in do_delvm, Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 02/23] ssh: Don't crash if either host or path is not specified., Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 04/23] vmdk: Fix integer overflow in offset calculation, Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 03/23] block: Drop superfluous conditionals around qemu_opts_del(), Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 05/23] Modify qemu_opt_rename to realize renaming all items in opts,
Stefan Hajnoczi <=
- [Qemu-devel] [PULL 06/23] make check-block: Use default cache modes, Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 07/23] qemu-iotests: Fix supported cache modes for 052, Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 08/23] blockdev: Orphaned drive search, Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 09/23] blockdev: Allow overriding if_max_dev property, Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 11/23] ide: Update ide_drive_get to be HBA agnostic, Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 12/23] qtest/bios-tables: Correct Q35 command line, Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 10/23] pc/vl: Add units-per-default-bus property, Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 13/23] q35/ahci: Pick up -cdrom and -hda options, Stefan Hajnoczi, 2014/10/04