diff mbox

[05/11] xenbackendd: honour XEN_{RUN,LOG}_DIR

Message ID 1465477062-28805-6-git-send-email-wei.liu2@citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Wei Liu June 9, 2016, 12:57 p.m. UTC
Also added a gitignore entry for xenbackendd binary while I was there.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
---
 .gitignore                      | 2 ++
 tools/xenbackendd/Makefile      | 6 +++++-
 tools/xenbackendd/xenbackendd.c | 6 ++++--
 3 files changed, 11 insertions(+), 3 deletions(-)

Comments

Ian Jackson June 9, 2016, 3:48 p.m. UTC | #1
Wei Liu writes ("[PATCH 05/11] xenbackendd: honour XEN_{RUN,LOG}_DIR"):
> Also added a gitignore entry for xenbackendd binary while I was there.

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
diff mbox

Patch

diff --git a/.gitignore b/.gitignore
index b014509..af0e0a8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -210,6 +210,8 @@  tools/tests/mem-sharing/memshrtool
 tools/tests/mce-test/tools/xen-mceinj
 tools/xcutils/lsevtchn
 tools/xcutils/readnotes
+tools/xenbackendd/_paths.h
+tools/xenbackendd/xenbackendd
 tools/xenmon/xentrace_setmask
 tools/xenmon/xenbaked
 tools/xenpaging/xenpaging
diff --git a/tools/xenbackendd/Makefile b/tools/xenbackendd/Makefile
index f52be74..80ac7f4 100644
--- a/tools/xenbackendd/Makefile
+++ b/tools/xenbackendd/Makefile
@@ -30,12 +30,16 @@  install: build
 
 .PHONY: clean
 clean:
-	$(RM) *.a *.so *.o $(DEPS) xenbackendd
+	$(RM) *.a *.so *.o $(DEPS) xenbackendd _paths.h
 
 .PHONY: distclean
 distclean: clean
 
+xenbackendd.o: _paths.h
 xenbackendd: xenbackendd.o
 	$(CC) $(LDFLAGS) $< -o $@ $(LDLIBS) $(APPEND_LDFLAGS)
 
+genpath-target = $(call buildmakevars2header,_paths.h)
+$(eval $(genpath-target))
+
 -include $(DEPS)
diff --git a/tools/xenbackendd/xenbackendd.c b/tools/xenbackendd/xenbackendd.c
index e21464b..b6d9298 100644
--- a/tools/xenbackendd/xenbackendd.c
+++ b/tools/xenbackendd/xenbackendd.c
@@ -29,6 +29,8 @@ 
 
 #include <xenstore.h>
 
+#include "_paths.h"
+
 #define DEVTYPE_UNKNOWN 0
 #define DEVTYPE_VIF 1
 #define DEVTYPE_VBD 2
@@ -44,10 +46,10 @@ 
 #define VBD_SCRIPT XEN_SCRIPT_DIR"/block"
 #endif
 #ifndef LOG_FILE
-#define LOG_FILE "/var/log/xen/xenbackendd.log"
+#define LOG_FILE XEN_LOG_DIR "xenbackendd.log"
 #endif
 #ifndef PID_FILE
-#define PID_FILE "/var/run/xenbackendd.pid"
+#define PID_FILE XEN_RUN_DIR "xenbackendd.pid"
 #endif