aboutsummaryrefslogtreecommitdiff
path: root/blockdev.c
diff options
context:
space:
mode:
authorDong Xu Wang <wdongxu@linux.vnet.ibm.com>2012-12-06 14:47:22 +0800
committerKevin Wolf <kwolf@redhat.com>2012-12-11 16:35:47 +0100
commite478b448d7c36046462733ffaeaea0961575790a (patch)
treea2b06f9ce8a74c39da739dbc16eca0a6be4eeb2e /blockdev.c
parentdd39244978627e41a66b98d20eceddb1d7d25def (diff)
downloadqemu-e478b448d7c36046462733ffaeaea0961575790a.zip
qemu-e478b448d7c36046462733ffaeaea0961575790a.tar.gz
qemu-e478b448d7c36046462733ffaeaea0961575790a.tar.bz2
use qemu_opts_create_nofail
We will use qemu_opts_create_nofail function, it can make code more readable. Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'blockdev.c')
-rw-r--r--blockdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/blockdev.c b/blockdev.c
index 463f4c2..9a05e57 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -568,7 +568,7 @@ DriveInfo *drive_init(QemuOpts *opts, BlockInterfaceType block_default_type)
break;
case IF_VIRTIO:
/* add virtio block device */
- opts = qemu_opts_create(qemu_find_opts("device"), NULL, 0, NULL);
+ opts = qemu_opts_create_nofail(qemu_find_opts("device"));
if (arch_type == QEMU_ARCH_S390X) {
qemu_opt_set(opts, "driver", "virtio-blk-s390");
} else {