[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT PATCH] plat/drivers: Fix spurious bus driver initialization error message.



Initializing the virtio bus without driver results in a "Failed to
initialize bus driver" error message. This is confusing, since users
may think that an error actually happened when in fact the unikernel
may be up and running without problems (albeit without virtio drivers
of course). This patch has the virtio_bus_init function return 0 if no
drivers were found.

Signed-off-by: Felipe Huici <felipe.huici@xxxxxxxxx>
---
 plat/drivers/virtio/virtio_bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plat/drivers/virtio/virtio_bus.c b/plat/drivers/virtio/virtio_bus.c
index 3fc86ea8..1c34487f 100644
--- a/plat/drivers/virtio/virtio_bus.c
+++ b/plat/drivers/virtio/virtio_bus.c
@@ -208,7 +208,7 @@ static int virtio_bus_init(struct uk_alloc *mem_alloc)
                                dev_count++;
                }
        }
-       return (dev_count > 0) ? dev_count : -1;
+       return (dev_count > 0) ? dev_count : 0;
 }
 
 /**
-- 
2.20.1


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.