summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2020-07-28 09:15:44 +0100
committerPeter Maydell <peter.maydell@linaro.org>2020-07-28 09:15:44 +0100
commit23ae28783f4674e98f7539d1c05d793166c2fc12 (patch)
treee09b0157015b6030d305d117eb01e0eb54706e2a /block
parent93ea484375ab473379dd9c836261ef484bd71ab1 (diff)
parent1855536256eb0a5708b04b85f744de69559ea323 (diff)
downloadqemu-23ae28783f4674e98f7539d1c05d793166c2fc12.zip
Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2020-07-27' into staging
Block patches for 5.1: - Coverity fix - iotests fix for rx and avr - iotests fix for qcow2 -o compat=0.10 # gpg: Signature made Mon 27 Jul 2020 15:36:23 BST # gpg: using RSA key 91BEB60A30DB3E8857D11829F407DB0061D5CF40 # gpg: issuer "mreitz@redhat.com" # gpg: Good signature from "Max Reitz <mreitz@redhat.com>" [full] # Primary key fingerprint: 91BE B60A 30DB 3E88 57D1 1829 F407 DB00 61D5 CF40 * remotes/maxreitz/tags/pull-block-2020-07-27: iotests/197: Fix for compat=0.10 iotests: Select a default machine for the rx and avr targets block/amend: Check whether the node exists Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'block')
-rw-r--r--block/amend.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/block/amend.c b/block/amend.c
index f4612dcf08..392df9ef83 100644
--- a/block/amend.c
+++ b/block/amend.c
@@ -69,8 +69,12 @@ void qmp_x_blockdev_amend(const char *job_id,
BlockdevAmendJob *s;
const char *fmt = BlockdevDriver_str(options->driver);
BlockDriver *drv = bdrv_find_format(fmt);
- BlockDriverState *bs = bdrv_find_node(node_name);
+ BlockDriverState *bs;
+ bs = bdrv_lookup_bs(NULL, node_name, errp);
+ if (!bs) {
+ return;
+ }
if (!drv) {
error_setg(errp, "Block driver '%s' not found or not supported", fmt);