On 18.10.23 13:45, Markus Armbruster wrote:
Vladimir Sementsov-Ogievskiy <vsement...@yandex-team.ru> writes:

Add a command that can replace bs in following BdrvChild structures:

  - qdev blk root child
  - block-export blk root child
  - any child of BlockDriverState selected by child-name

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@yandex-team.ru>

[..]

--- /dev/null
+++ b/stubs/blk-by-qdev-id.c
@@ -0,0 +1,9 @@
+#include "qemu/osdep.h"
+#include "qapi/error.h"
+#include "sysemu/block-backend.h"
+
+BlockBackend *blk_by_qdev_id(const char *id, Error **errp)
+{
+    error_setg(errp, "blk '%s' not found", id);

Is this expected to happen?

Yes, if call the command from qemu-storage-daemon, where qdev-monitor is not 
linked in.

Maybe, better message would be

   "devices are not supported"

Maybe, that possible to use some 'if': notation in qapi, to not include support 
for qdev into the new command, when it compiled into qemu-storage-daemon? Seems 
that would not be simple, as we also need to split compilation of the command 
somehow, now it compiled once both for qemu and qemu tools..


+    return NULL;
+}

[...]

QAPI schema
Acked-by: Markus Armbruster <arm...@redhat.com>


--
Best regards,
Vladimir


Reply via email to