[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.6] libxenstat: honour XEN_RUN_DIR
commit 77a9be97f5238a48f2b73b145c0a7ceaef22e0d6 Author: Wei Liu <wei.liu2@xxxxxxxxxx> AuthorDate: Mon Jul 11 18:28:08 2016 +0100 Commit: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> CommitDate: Mon Aug 15 11:30:24 2016 +0100 libxenstat: honour XEN_RUN_DIR This is because libxl uses XEN_RUN_DIR to generate the socket path for libxenstat while libxenstat itself uses hard-coded path, which is not necessarily the same path as XEN_RUN_DIR. The default configuration happened to work because XEN_RUN_DIR defaulted to /var/run/xen, which matched the hard-coded path. We should make libxenstat use XEN_RUN_DIR so that it works with non-default configuration. Generate a _paths.h because it is required to make this change work. Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> (cherry picked from commit dedb221889dbdd96f1d3c1155c3eb492d329bb53) (cherry picked from commit ab75cdf635da31012f822260c607f5b4ceaf7668) Conflicts: tools/xenstat/libxenstat/src/xenstat_qmp.c Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- .gitignore | 1 + tools/xenstat/libxenstat/Makefile | 7 ++++++- tools/xenstat/libxenstat/src/xenstat_qmp.c | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 9ead7c4..8c98b01 100644 --- a/.gitignore +++ b/.gitignore @@ -199,6 +199,7 @@ tools/xenmon/xentrace_setmask tools/xenmon/xenbaked tools/xenpaging/xenpaging tools/xenpmd/xenpmd +tools/xenstat/libxenstat/src/_paths.h tools/xenstat/xentop/xentop tools/xenstore/init-xenstore-domain tools/xenstore/xenstore diff --git a/tools/xenstat/libxenstat/Makefile b/tools/xenstat/libxenstat/Makefile index 850d24a..213d998 100644 --- a/tools/xenstat/libxenstat/Makefile +++ b/tools/xenstat/libxenstat/Makefile @@ -40,6 +40,8 @@ LDLIBS-$(CONFIG_SunOS) += -lkstat .PHONY: all all: $(LIB) $(SHLIB) $(SHLIB_LINKS) +$(OBJECTS-y): src/_paths.h + $(LIB): $(OBJECTS-y) $(AR) rc $@ $^ $(RANLIB) $@ @@ -135,9 +137,12 @@ endif .PHONY: clean clean: rm -f $(LIB) $(SHLIB) $(SHLIB_LINKS) $(OBJECTS-y) \ - $(BINDINGS) $(BINDINGSRC) $(DEPS) + $(BINDINGS) $(BINDINGSRC) $(DEPS) src/_paths.h .PHONY: distclean distclean: clean -include $(DEPS) + +genpath-target = $(call buildmakevars2header,src/_paths.h) +$(eval $(genpath-target)) diff --git a/tools/xenstat/libxenstat/src/xenstat_qmp.c b/tools/xenstat/libxenstat/src/xenstat_qmp.c index 5e261af..8c35983 100644 --- a/tools/xenstat/libxenstat/src/xenstat_qmp.c +++ b/tools/xenstat/libxenstat/src/xenstat_qmp.c @@ -23,6 +23,7 @@ #include <xenctrl.h> #include "xenstat_priv.h" +#include "_paths.h" #ifdef HAVE_YAJL_YAJL_VERSION_H # include <yajl/yajl_version.h> @@ -418,7 +419,7 @@ void read_attributes_qdisk(xenstat_node * node) free(val); /* Connect to this VMs QMP socket */ - snprintf(path, sizeof(path), "/var/run/xen/qmp-libxenstat-%i", dominfo[i].domain); + snprintf(path, sizeof(path), XEN_RUN_DIR "/qmp-libxenstat-%i", dominfo[i].domain); if ((qfd = qmp_connect(path)) < 0) { continue; } -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.6 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |