[libvirt] [PATCHv6 2/2] qemu: Disk Geometry Override Support
Eric Blake
eblake at redhat.com
Tue Aug 21 21:36:20 UTC 2012
On 08/21/2012 10:27 AM, Daniel P. Berrange wrote:
> On Mon, Aug 20, 2012 at 03:58:51PM +0200, Viktor Mihajlovski wrote:
>> From: J.B. Joret <jb at linux.vnet.ibm.com>
>>
>> Qemu command line generation for geometry override and testcases.
>>
>> V2 Changes: squashed qemu code and testcases.
>>
>> V3 Changes: use virReportError.
>>
>> V4 Changes: rebase
>>
>> V5 Changes: Fixed test invocation for geometry.
>>
>> V6 Changes: Remove conditional geometry handling.
Again, I trimmed the commit message.
>>
>> Signed-off-by: J.B. Joret <jb at linux.vnet.ibm.com>
>> Signed-off-by: Viktor Mihajlovski <mihajlov at linux.vnet.ibm.com>
>> ---
>> src/qemu/qemu_command.c | 56 ++++++++++++++++++++
>> .../qemuxml2argv-disk-geometry.args | 4 ++
>> .../qemuxml2argv-disk-geometry.xml | 26 +++++++++
>> tests/qemuxml2argvtest.c | 2 +
>> 4 files changed, 88 insertions(+), 0 deletions(-)
>> create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-geometry.args
>> create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-geometry.xml
>
> + /* generate geometry command string*/
Space before */
> +-no-acpi -boot c -drive file=/dev/HostVG/QEMUGuest1,if=ide,bus=0,unit=0,cyls=16383,heads=16,secs=63,trans=lba \
Long line; I added \-newline to split it.
> ACK
Pushed with this squashed in:
diff --git i/src/qemu/qemu_command.c w/src/qemu/qemu_command.c
index cdc8e55..ca62f0c 100644
--- i/src/qemu/qemu_command.c
+++ w/src/qemu/qemu_command.c
@@ -2281,7 +2281,7 @@ qemuBuildDriveStr(virConnectPtr conn ATTRIBUTE_UNUSED,
qemuCapsGet(qemuCaps, QEMU_CAPS_DRIVE_FORMAT))
virBufferAsprintf(&opt, ",format=%s", disk->driverType);
- /* generate geometry command string*/
+ /* generate geometry command string */
if (disk->geometry.cylinders > 0 &&
disk->geometry.heads > 0 &&
disk->geometry.sectors > 0) {
diff --git i/tests/qemuxml2argvdata/qemuxml2argv-disk-geometry.args
w/tests/qemuxml2argvdata/qemuxml2argv-disk-geometry.args
index 7cd6650..c0de2ed 100644
--- i/tests/qemuxml2argvdata/qemuxml2argv-disk-geometry.args
+++ w/tests/qemuxml2argvdata/qemuxml2argv-disk-geometry.args
@@ -1,4 +1,5 @@
LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu
-S -M \
pc -m 214 -smp 1 -nographic -monitor unix:/tmp/test-monitor,server,nowait \
--no-acpi -boot c -drive
file=/dev/HostVG/QEMUGuest1,if=ide,bus=0,unit=0,cyls=16383,heads=16,secs=63,trans=lba
\
+-no-acpi -boot c -drive file=/dev/HostVG/QEMUGuest1,if=ide,bus=0,unit=0,\
+cyls=16383,heads=16,secs=63,trans=lba \
-net none -serial none -parallel none -usb
--
Eric Blake eblake at redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120821/2cc00b34/attachment-0001.sig>
More information about the libvir-list
mailing list