|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen staging] libxl_dm: Add libxl__qemu_qmp_path()
commit e829d8bac8be98b18c16bd0f41c9530cffbf9b6a
Author: Anthony PERARD <anthony.perard@xxxxxxxxxx>
AuthorDate: Mon Jul 23 12:20:24 2018 +0100
Commit: Anthony PERARD <anthony.perard@xxxxxxxxxx>
CommitDate: Tue Aug 21 11:57:50 2018 +0100
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@xxxxxxxxxx>
Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
tools/libxl/libxl_dm.c | 4 ++--
tools/libxl/libxl_internal.h | 4 ++++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index 70e8b16c2d..abd31ee6f2 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -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");
diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
index 72ab177ce5..1bc9394135 100644
--- a/tools/libxl/libxl_internal.h
+++ b/tools/libxl/libxl_internal.h
@@ -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
/*
--
generated by git-patchbot for /home/xen/git/xen.git#staging
_______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |