From: Phil Yang <phil.yang@arm.com>
To: dts@dpdk.org
Cc: nd@arm.com, phil.yang@arm.com, yong.liu@intel.com
Subject: [dts] [PATCH] framwork/qemu_kvm: Fix add_vm_disk single field parameter support.
Date: Fri, 5 Jan 2018 18:28:02 +0800 [thread overview]
Message-ID: <1515148082-28353-1-git-send-email-phil.yang@arm.com> (raw)
Fix add_vm_disk: Should allow single field parameter configuration for disk.
Signed-off-by: Phil Yang <phil.yang@arm.com>
---
framework/qemu_kvm.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/framework/qemu_kvm.py b/framework/qemu_kvm.py
index 84f961b..5671de8 100644
--- a/framework/qemu_kvm.py
+++ b/framework/qemu_kvm.py
@@ -362,6 +362,9 @@ class QEMUKvm(VirtBase):
if 'file' in options.keys() and \
options['file']:
disk_boot_line = '-drive file=%s' % options['file']
+ else:
+ return False
+
if 'opt_format' in options.keys() and \
options['opt_format']:
disk_boot_line += separator + 'format=%s' % options['opt_format']
@@ -375,8 +378,7 @@ class QEMUKvm(VirtBase):
options['opt_media']:
disk_boot_line += separator + 'media=%s' % options['opt_media']
- if self.__string_has_multi_fields(disk_boot_line, separator):
- self.__add_boot_line(disk_boot_line)
+ self.__add_boot_line(disk_boot_line)
def add_vm_pflash(self, **options):
"""
--
2.7.4
next reply other threads:[~2018-01-05 10:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-05 10:28 Phil Yang [this message]
2018-01-09 13:06 ` Liu, Yong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1515148082-28353-1-git-send-email-phil.yang@arm.com \
--to=phil.yang@arm.com \
--cc=dts@dpdk.org \
--cc=nd@arm.com \
--cc=yong.liu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).