diff options
author | Michele Paolino <m.paolino@virtualopensystems.com> | 2023-12-15 15:48:09 +0000 |
---|---|---|
committer | Michele Paolino <m.paolino@virtualopensystems.com> | 2023-12-18 08:37:14 +0000 |
commit | 330a49da9ec426bd07472266916366053281b4de (patch) | |
tree | 1bfa402a5ba5396b0a1f6b6f6b211d1ed913125e /adapter.c | |
parent | 274aa4832d16af5a6b10ffe6021b278bffca4eb8 (diff) |
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 <m.paolino@virtualopensystems.com>
Diffstat (limited to 'adapter.c')
-rw-r--r-- | adapter.c | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -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); } |