qdev-monitor: add option to report GenericError from find_device_state
authorVladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Fri, 20 Sep 2024 09:49:34 +0000 (12:49 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 4 Nov 2024 21:03:24 +0000 (16:03 -0500)
commit9e4cc917e0be9c757d834a0e40c66def1fed5adc
tree99f454cb8b9a335306b1f4d536155f3db2c318fc
parentfa19fe4e3a61765ff60914ee00fc1e7a6a38dba9
qdev-monitor: add option to report GenericError from find_device_state

Here we just prepare for the following patch, making possible to report
GenericError as recommended.

This patch doesn't aim to prevent further use of DeviceNotFound by
future interfaces:

 - find_device_state() is used in blk_by_qdev_id() and qmp_get_blk()
   functions, which may lead to spread of DeviceNotFound anyway
 - also, nothing prevent simply copy-pasting find_device_state() calls
   with false argument

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Raphael Norwitz <raphael@enfabrica.net>
Message-Id: <20240920094936.450987-2-vsementsov@yandex-team.ru>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
system/qdev-monitor.c