]> git.proxmox.com Git - mirror_qemu.git/commit - block.c
block: qobject_is_equal() in bdrv_reopen_prepare()
authorMax Reitz <mreitz@redhat.com>
Tue, 14 Nov 2017 18:01:26 +0000 (19:01 +0100)
committerMax Reitz <mreitz@redhat.com>
Fri, 17 Nov 2017 17:21:30 +0000 (18:21 +0100)
commit54fd1b0d260cf9615d3385c93702277e81f0b639
treee4d88946aee3a5b5dcda3674c980b944c9fde383
parentb38dd678a21582e03ecd2dec76ccf8290455628a
block: qobject_is_equal() in bdrv_reopen_prepare()

Currently, bdrv_reopen_prepare() assumes that all BDS options are
strings. However, this is not the case if the BDS has been created
through the json: pseudo-protocol or blockdev-add.

Note that the user-invokable reopen command is an HMP command, so you
can only specify strings there. Therefore, specifying a non-string
option with the "same" value as it was when originally created will now
return an error because the values are supposedly similar (and there is
no way for the user to circumvent this but to just not specify the
option again -- however, this is still strictly better than just
crashing).

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 20171114180128.17076-5-mreitz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
block.c