libxl_dm: Add libxl__qemu_qmp_path()

... which generates the path to a QMP socket that libxl uses.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
This commit is contained in:
Anthony PERARD committed 2018-08-21 11:57:50 +01:00
1 parent 043b1bc312
commit e829d8bac8
2 files changed
+6 -2

No files matched your search

+2 -2
View File
@@ -946,8 +946,8 @@ static int libxl__build_device_model_args_new(libxl__gc *gc,
flexarray_append(dm_args, "-chardev");
flexarray_append(dm_args,
GCSPRINTF("socket,id=libxl-cmd,"
"path=%s/qmp-libxl-%d,server,nowait",
libxl__run_dir_path(), guest_domid));
"path=%s,server,nowait",
libxl__qemu_qmp_path(gc, guest_domid)));
flexarray_append(dm_args, "-no-shutdown");
flexarray_append(dm_args, "-mon");
+4
View File
@@ -4424,6 +4424,10 @@ static inline bool libxl__string_is_default(char **s)
_hidden int libxl__prepare_sockaddr_un(libxl__gc *gc, struct sockaddr_un *un,
const char *path, const char *what);
static inline const char *libxl__qemu_qmp_path(libxl__gc *gc, int domid)
{
return GCSPRINTF("%s/qmp-libxl-%d", libxl__run_dir_path(), domid);
}
#endif
/*
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.