From: Wei Liu <wei.liu2@citrix.com> To: Xen-devel <xen-devel@lists.xenproject.org> Cc: Ian Jackson <ian.jackson@eu.citrix.com>, Wei Liu <wei.liu2@citrix.com> Subject: [PATCH 6/7] libxenstat: honour XEN_RUN_DIR Date: Wed, 15 Jun 2016 12:15:08 +0100 [thread overview] Message-ID: <1465989309-12418-7-git-send-email-wei.liu2@citrix.com> (raw) In-Reply-To: <1465989309-12418-1-git-send-email-wei.liu2@citrix.com> 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 necessary in sync with libxl. Generate a _paths.h because it is required to make this change work. Signed-off-by: Wei Liu <wei.liu2@citrix.com> --- Cc: Ian Jackson <ian.jackson@eu.citrix.com> --- .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 d4ffaa6..9b8dece 100644 --- a/.gitignore +++ b/.gitignore @@ -220,6 +220,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/xenstore tools/xenstore/xenstore-chmod 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 c12929a..a87c937 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> @@ -398,7 +399,7 @@ static void read_attributes_qdisk_dom(xenstat_node *node, domid_t domain) free(val); /* Connect to this VMs QMP socket */ - snprintf(path, sizeof(path), "/var/run/xen/qmp-libxenstat-%i", domain); + snprintf(path, sizeof(path), XEN_RUN_DIR "/qmp-libxenstat-%i", domain); if ((qfd = qmp_connect(path)) < 0) return; -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-06-15 11:15 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-06-15 11:15 [PATCH 0/7] Honour more configure variables in various places (iteration 3) Wei Liu 2016-06-15 11:15 ` [PATCH 1/7] xenconsoled: honour XEN_RUN_DIR Wei Liu 2016-06-15 11:15 ` [PATCH 2/7] tools/helper: honour XEN_RUN_DIR in init-xenstore-domain.c Wei Liu 2016-07-08 17:25 ` Ian Jackson 2016-07-11 10:38 ` Wei Liu 2016-06-15 11:15 ` [PATCH 3/7] hotplug/FreeBSD: honour XEN_RUN_DIR Wei Liu 2016-06-15 16:18 ` Roger Pau Monné 2016-07-08 17:25 ` Ian Jackson 2016-06-15 11:15 ` [PATCH 4/7] hotplug/NetBSD: " Wei Liu 2016-06-15 16:16 ` Roger Pau Monné 2016-07-08 17:26 ` Ian Jackson 2016-06-15 11:15 ` [PATCH 5/7] hotplug/Linux: " Wei Liu 2016-06-15 16:17 ` Roger Pau Monné 2016-07-08 17:26 ` Ian Jackson 2016-06-15 11:15 ` Wei Liu [this message] 2016-07-08 17:27 ` [PATCH 6/7] libxenstat: " Ian Jackson 2016-07-11 10:38 ` Wei Liu 2016-06-15 11:15 ` [PATCH 7/7] oxenstored: " Wei Liu 2016-06-15 19:43 ` David Scott 2016-07-08 17:27 ` Ian Jackson 2016-07-08 17:28 ` Ian Jackson 2016-07-11 10:38 ` Wei Liu 2016-07-02 10:21 ` [PATCH 0/7] Honour more configure variables in various places (iteration 3) Wei Liu 2016-07-08 17:25 ` Ian Jackson
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1465989309-12418-7-git-send-email-wei.liu2@citrix.com \ --to=wei.liu2@citrix.com \ --cc=ian.jackson@eu.citrix.com \ --cc=xen-devel@lists.xenproject.org \ --subject='Re: [PATCH 6/7] libxenstat: honour XEN_RUN_DIR' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).