Skip to content

Commit

Permalink
utils: fix qemu spawning with one vhost interface
Browse files Browse the repository at this point in the history
Signed-off-by: Jerome Jutteau <[email protected]>
  • Loading branch information
jerome-jutteau committed Feb 9, 2017
1 parent a18381c commit dc590f8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/utils/qemu.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ int pg_util_spawn_qemu(const char *socket_path_0,
GError *error = NULL;

g_assert(g_file_test(socket_path_0, G_FILE_TEST_EXISTS));
g_assert(g_file_test(socket_path_1, G_FILE_TEST_EXISTS));
if (socket_path_1)
g_assert(g_file_test(socket_path_1, G_FILE_TEST_EXISTS));
g_assert(g_file_test(vm_image_path, G_FILE_TEST_EXISTS));
g_assert(g_file_test(vm_key_path, G_FILE_TEST_EXISTS));
g_assert(g_file_test(hugepages_path, G_FILE_TEST_EXISTS));
Expand Down Expand Up @@ -107,7 +108,7 @@ int pg_util_spawn_qemu(const char *socket_path_0,
" -drive file=", vm_image_path,
" -netdev user,id=net0,hostfwd=tcp::", vm_id + 65000, "-:22",
" -device e1000,netdev=net0",
argv_sock_0, argv_sock_1);
argv_sock_0, argv_sock_1 ? argv_sock_1 : "");

argv = g_strsplit(argv_qemu, " ", 0);

Expand Down

0 comments on commit dc590f8

Please sign in to comment.