From ee2f3df2ffe03e374c05febb84df19bd345dafc0 Mon Sep 17 00:00:00 2001 From: rongyichang Date: Sat, 11 Jan 2025 18:24:00 +0800 Subject: [PATCH] drivers/vhost: fix compile error while get vhost status. vhost/vhost.c: In function 'vhost_status_driver_ok': vhost/vhost.c:86:20: error: too few arguments to function 'virtio_get_status' 86 | uint8_t status = vhost_get_status(hdev); Signed-off-by: rongyichang --- drivers/vhost/vhost.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index eebcf24303..6c19cdbdd3 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -83,8 +83,15 @@ static struct vhost_bus_s g_vhost_bus = static bool vhost_status_driver_ok(FAR struct vhost_device *hdev) { - uint8_t status = vhost_get_status(hdev); bool driver_ok = false; + uint8_t status; + int ret; + + ret = vhost_get_status(hdev, &status); + if (ret) + { + return driver_ok; + } /* Busy wait until the remote is ready */