A very simple capabilities dump.
Signed-off-by: Alex Bennée alex.bennee@linaro.org --- tools/vhost-user-rpmb/main.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
diff --git a/tools/vhost-user-rpmb/main.c b/tools/vhost-user-rpmb/main.c index a40a680a74ca..6b1989125bd6 100644 --- a/tools/vhost-user-rpmb/main.c +++ b/tools/vhost-user-rpmb/main.c @@ -7,6 +7,7 @@ */
#include <glib.h> +#include <stdio.h>
static gchar *socket_path; static gint socket_fd; @@ -20,6 +21,14 @@ static GOptionEntry options[] = { NULL } };
+/* Print vhost-user.json backend program capabilities */ +static void print_capabilities(void) +{ + printf("{\n"); + printf(" "type": "block"\n"); + printf("}\n"); +} + int main (int argc, char *argv[]) { GError *error = NULL; @@ -33,5 +42,9 @@ int main (int argc, char *argv[]) exit (1); }
+ if (print_cap) { + print_capabilities(); + exit(0); + }
}