diff mbox series

[v2,1/2] stubs/monitor: add monitor_fd_param()

Message ID 20230504092843.62493-2-sgarzare@redhat.com (mailing list archive)
State New, archived
Headers show
Series block/blkio: add 'fd' option to virtio-blk-vhost-vdpa driver | expand

Commit Message

Stefano Garzarella May 4, 2023, 9:28 a.m. UTC
The blkio block driver will use monitor_fd_param() to support
file descriptor passing. This is possible in builds (e.g. softmmu)
where the monitor API is available.

Add the monitor_fd_param() stub so tools and tests that link the
block layer can build successfully.

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
---

Notes:
    v2:
    - added this patch to use monitor_fd_param() in the blkio module

 stubs/monitor.c | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/stubs/monitor.c b/stubs/monitor.c
index 20786ac4ff..0bcd49e41e 100644
--- a/stubs/monitor.c
+++ b/stubs/monitor.c
@@ -9,6 +9,12 @@  int monitor_get_fd(Monitor *mon, const char *name, Error **errp)
     return -1;
 }
 
+int monitor_fd_param(Monitor *mon, const char *fdname, Error **errp)
+{
+    error_setg(errp, "only QEMU supports file descriptor passing");
+    return -1;
+}
+
 void monitor_init_hmp(Chardev *chr, bool use_readline, Error **errp)
 {
 }