Vladimir Sementsov-Ogievskiy <[email protected]> writes: > 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
A possible way to reduce the likelihood of further spread: 1. Rename find_device_state() to find_device_state_legacy(). 2. New find_device_state() that reports GenericError. Could also be done in a follow-up. > > Signed-off-by: Vladimir Sementsov-Ogievskiy <[email protected]> The patch does what it says on the tin, so Reviewed-by: Markus Armbruster <[email protected]>
