On 08/21/12 15:30, Lucas Meneghel Rodrigues wrote: > From: Qingtang Zhou <[email protected]> > > Commit 52f94e55 attempts to search the boot option to > a given drive if qemu command line supports the syntax, > but it turns out it was slightly incorrect. This patch > fixes it.
/me is surprised that searching for boot=on in the help text actually works. I suggest to improve commit 15f86164413818b9c5903c4cc1bea65ab91b63bc with the attached patch then. warning: untested. cheers, Gerd
>From 8053d21cdc7c6e36ea579555fb657419b13fd785 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann <[email protected]> Date: Tue, 21 Aug 2012 15:58:13 +0200 Subject: [PATCH] autodetect whenever bootindex should be used --- client/virt/kvm_vm.py | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/client/virt/kvm_vm.py b/client/virt/kvm_vm.py index bb6bf29..ea73ac3 100644 --- a/client/virt/kvm_vm.py +++ b/client/virt/kvm_vm.py @@ -468,7 +468,7 @@ class VM(virt_vm.BaseVM): lun=None): name = None dev = "" - if self.params.get("use_bootindex") in ['yes', 'on', True]: + if not re.search("boot=on\|off", help, re.MULTILINE): if boot in ['yes', 'on', True]: bootindex = "1" boot = "unused" @@ -543,8 +543,7 @@ class VM(virt_vm.BaseVM): cmd += _add_option("werror", werror) cmd += _add_option("serial", serial) cmd += _add_option("snapshot", snapshot, bool) - if has_option(help, "boot=on\|off"): - cmd += _add_option("boot", boot, bool) + cmd += _add_option("boot", boot, bool) cmd += _add_option("id", name) cmd += _add_option("readonly", readonly, bool) return cmd + dev -- 1.7.1
_______________________________________________ Autotest-kernel mailing list [email protected] https://www.redhat.com/mailman/listinfo/autotest-kernel
