diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2018-03-27 19:20:57 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2018-03-27 19:20:57 +0100 |
commit | f55e88f2ab09e9348b0d1d233acd9518a7570f16 (patch) | |
tree | 61c2dbca145f58b347bee17738fb046b06b9eefd /block | |
parent | 6cf38cbf2961c57bd85022cf9adf7ef85dae0f02 (diff) | |
parent | 0dfddbb537fcb0fbd045e1c890bc0e95f2ea5177 (diff) |
Merge remote-tracking branch 'remotes/ericb/tags/pull-qapi-2018-03-27-v2' into staging
qapi patches for 2018-03-27, 2.12-rc1
- Marc-André Lureau: qmp-test: fix response leak
- Eric Blake: tests: Silence false positive warning on generated test name
- Laurent Vivier: 0/4 (partial) coccinelle: re-run scripts from scripst/coccinelle
- Peter Xu: 0/8 Monitor: some oob related patches (fixes, new param, tests)
- Satheesh Rajendran: hmp.c: Revert hmp_info_cpus output format change
# gpg: Signature made Tue 27 Mar 2018 16:18:36 BST
# gpg: using RSA key A7A16B4A2527436A
# gpg: Good signature from "Eric Blake <eblake@redhat.com>"
# gpg: aka "Eric Blake (Free Software Programmer) <ebb9@byu.net>"
# gpg: aka "[jpeg image of size 6874]"
# Primary key fingerprint: 71C2 CC22 B1C4 6029 27D2 F3AA A7A1 6B4A 2527 436A
* remotes/ericb/tags/pull-qapi-2018-03-27-v2:
hmp.c: Revert hmp_info_cpus output format change
tests: qmp-test: add test for new "x-oob"
tests: Add parameter to qtest_init_without_qmp_handshake
monitor: new parameter "x-oob"
qmp: cleanup qmp queues properly
tests: add oob-test for qapi-schema
tests: let qapi-schema tests detect oob
qapi: restrict allow-oob value to be "true"
qmp: fix qmp_capabilities error regression
qdict: remove useless cast
error: Remove NULL checks on error_propagate() calls
error: Strip trailing '\n' from error string arguments (again again)
tests: Silence false positive warning on generated test name
qmp-test: fix response leak
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'block')
-rw-r--r-- | block/nvme.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/block/nvme.c b/block/nvme.c index 8bca57aae6..c4f3a7bc94 100644 --- a/block/nvme.c +++ b/block/nvme.c @@ -695,12 +695,11 @@ static void nvme_parse_filename(const char *filename, QDict *options, unsigned long ns; const char *slash = strchr(tmp, '/'); if (!slash) { - qdict_put(options, NVME_BLOCK_OPT_DEVICE, - qstring_from_str(tmp)); + qdict_put_str(options, NVME_BLOCK_OPT_DEVICE, tmp); return; } device = g_strndup(tmp, slash - tmp); - qdict_put(options, NVME_BLOCK_OPT_DEVICE, qstring_from_str(device)); + qdict_put_str(options, NVME_BLOCK_OPT_DEVICE, device); g_free(device); namespace = slash + 1; if (*namespace && qemu_strtoul(namespace, NULL, 10, &ns)) { @@ -708,8 +707,8 @@ static void nvme_parse_filename(const char *filename, QDict *options, namespace); return; } - qdict_put(options, NVME_BLOCK_OPT_NAMESPACE, - qstring_from_str(*namespace ? namespace : "1")); + qdict_put_str(options, NVME_BLOCK_OPT_NAMESPACE, + *namespace ? namespace : "1"); } } @@ -1082,7 +1081,7 @@ static void nvme_refresh_filename(BlockDriverState *bs, QDict *opts) bs->drv->format_name); } - qdict_put(opts, "driver", qstring_from_str(bs->drv->format_name)); + qdict_put_str(opts, "driver", bs->drv->format_name); bs->full_open_options = opts; } |