From 330a49da9ec426bd07472266916366053281b4de Mon Sep 17 00:00:00 2001 From: Michele Paolino Date: Fri, 15 Dec 2023 15:48:09 +0000 Subject: Adding virtio-console support and small sound fixes This commit adds adapter support for vhost-user-console Bug-AGL: SPEC-4834 Change-Id: I96eb95ffbf858b0ad410f49e586af0bb81b74dd2 Signed-off-by: Michele Paolino --- adapter.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'adapter.c') diff --git a/adapter.c b/adapter.c index 68effcd..ebf3171 100644 --- a/adapter.c +++ b/adapter.c @@ -50,6 +50,7 @@ #include "vhost_user_gpio.h" #include "vhost_user_sound.h" #include "vhost_user_can.h" +#include "vhost_user_console.h" #ifdef DEBUG @@ -141,7 +142,7 @@ static void help_args(void) "\t\t [ -qn number of queues ]\n" "\t\t [ -qs size of queues ]\n" "The 'device_name' can be one of the following:\n" - "\tvrng, vhurng, vhublk, vhuinput, vhusnd, vhugpio\n"); + "\tvrng, vhurng, vhublk, vhuinput, vhusnd, vhugpio, vhucan, vhuconsole\n"); } int find_arg(int argc, char **argv, char *str) @@ -159,10 +160,10 @@ int find_arg(int argc, char **argv, char *str) int val_device_arg(char *str) { char *adapter_devices[] = {"vrng", "vhurng", "vhublk", "vhuinput", - "vhusnd", "vhugpio", "vhucan"}; + "vhusnd", "vhugpio", "vhucan", "vhuconsole"}; char *vhu_devices[] = {"vhurng", "vhublk", "vhuinput", "vhusnd", - "vhugpio", "vhucan"}; - int adapter_devices_num = 7, i; + "vhugpio", "vhucan", "vhuconsole"}; + int adapter_devices_num = 8, i; for (i = 0; i < adapter_devices_num; i++) { if (!strcmp(adapter_devices[i], str)) { @@ -176,8 +177,8 @@ int val_device_arg(char *str) bool check_vhu_device(char *str) { char *vhu_devices[] = {"vhurng", "vhublk", "vhuinput", "vhusnd", - "vhugpio", "vhucan"}; - int vhu_devices_num = 6, i; + "vhugpio", "vhucan", "vhuconsole"}; + int vhu_devices_num = 7, i; for (i = 0; i < vhu_devices_num; i++) { if (!strcmp(vhu_devices[i], str)) { @@ -303,6 +304,9 @@ int main(int argc, char **argv) case 7: vhost_user_can_realize(); break; + case 8: + vhost_user_console_realize(); + break; default: exit(1); } -- cgit