aboutgitcodebugslistschat
diff options
context:
space:
mode:
-rw-r--r--qrap.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/qrap.c b/qrap.c
index 27c12ed..d0e2fb2 100644
--- a/qrap.c
+++ b/qrap.c
@@ -311,7 +311,11 @@ int main(int argc, char **argv)
}
qemu_argv[qemu_argc++] = "-netdev";
- qemu_argv[qemu_argc++] = "socket,fd=" STR(DEFAULT_FD) ",id=hostnet0";
+ if (!has_json) {
+ qemu_argv[qemu_argc++] = "socket,fd=" STR(DEFAULT_FD) ",id=hostnet0";
+ } else {
+ qemu_argv[qemu_argc++] = "{\"type\":\"socket\",\"fd\":\"" STR(DEFAULT_FD) "\",\"id\":\"hostnet0\"}";
+ }
qemu_argv[qemu_argc] = NULL;
valid_args: