[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 18/40] hmp: 'drive_add -n' for creating a node wi
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PULL 18/40] hmp: 'drive_add -n' for creating a node without BB |
Date: |
Wed, 16 Mar 2016 11:41:15 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 |
> +void hmp_drive_add_node(Monitor *mon, const char *optstr)
> +{
> + QemuOpts *opts;
> + QDict *qdict;
> + Error *local_err = NULL;
> +
> + opts = qemu_opts_parse_noisily(&qemu_drive_opts, optstr, false);
> + if (!opts) {
> + return;
> + }
> +
> + qdict = qemu_opts_to_qdict(opts, NULL);
> +
> + if (!qdict_get_try_str(qdict, "node-name")) {
> + error_report("'node-name' needs to be specified");
qdict is leaked here, says Coverity.
Paolo
> + goto out;
> + }
> +
> + BlockDriverState *bs = bds_tree_init(qdict, &local_err);
> + if (!bs) {
> + error_report_err(local_err);
> + goto out;
> + }
> +
> + QTAILQ_INSERT_TAIL(&monitor_bdrv_states, bs, monitor_list);
> +
> +out:
> + qemu_opts_del(opts);
Paolo
- [Qemu-devel] [PULL 16/40] vmdk: Switch to heap arrays for vmdk_read_cid, (continued)
- [Qemu-devel] [PULL 16/40] vmdk: Switch to heap arrays for vmdk_read_cid, Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 17/40] vmdk: Switch to heap arrays for vmdk_parent_open, Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 21/40] block: Introduce blk_set_allow_write_beyond_eof(), Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 23/40] qcow: Use BB functions in .bdrv_create(), Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 22/40] parallels: Use BB functions in .bdrv_create(), Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 20/40] block: Use writeback in .bdrv_create() implementations, Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 19/40] hmp: Extend drive_del to delete nodes without BB, Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 24/40] qcow2: Use BB functions in .bdrv_create(), Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 25/40] qed: Use BB functions in .bdrv_create(), Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 18/40] hmp: 'drive_add -n' for creating a node without BB, Kevin Wolf, 2016/03/14
- Re: [Qemu-devel] [PULL 18/40] hmp: 'drive_add -n' for creating a node without BB,
Paolo Bonzini <=
- [Qemu-devel] [PULL 29/40] vmdk: Use BB functions in .bdrv_create(), Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 30/40] vpc: Use BB functions in .bdrv_create(), Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 28/40] vhdx: Use BB functions in .bdrv_create(), Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 26/40] sheepdog: Use BB functions in .bdrv_create(), Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 27/40] vdi: Use BB functions in .bdrv_create(), Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 32/40] block: Include hbitmap.h in block.h, Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 33/40] typedefs: Add BdrvDirtyBitmap, Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 37/40] quorum: Fix crash in quorum_aio_cb(), Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 39/40] monitor: Use QEMU_CLOCK_VIRTUAL for the event queue in qtest mode, Kevin Wolf, 2016/03/14