[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] xenconsoled: honour XEN_LOG_DIR and remove hard-coded path
commit 15574254d21228a030dfc5ffc641d053bc62c9c0 Author: Wei Liu <wei.liu2@xxxxxxxxxx> AuthorDate: Thu Jun 9 13:57:35 2016 +0100 Commit: Wei Liu <wei.liu2@xxxxxxxxxx> CommitDate: Fri Jun 10 10:51:11 2016 +0100 xenconsoled: honour XEN_LOG_DIR and remove hard-coded path Make a _paths.h for xenconsoled as well and use that to generate a default path for log file directory. Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- .gitignore | 1 + tools/console/Makefile | 5 +++++ tools/console/daemon/main.c | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 7347801..b014509 100644 --- a/.gitignore +++ b/.gitignore @@ -111,6 +111,7 @@ tools/blktap2/vhd/vhd-util tools/console/xenconsole tools/console/xenconsoled tools/console/client/_paths.h +tools/console/daemon/_paths.h tools/debugger/gdb/gdb-6.2.1-linux-i386-xen/* tools/debugger/gdb/gdb-6.2.1/* tools/debugger/gdb/gdb-6.2.1.tar.bz2 diff --git a/tools/console/Makefile b/tools/console/Makefile index a7bec75..c8b0300 100644 --- a/tools/console/Makefile +++ b/tools/console/Makefile @@ -22,10 +22,12 @@ clean: $(RM) *.a *.so *.o *.rpm $(BIN) $(DEPS) $(RM) client/*.o daemon/*.o $(RM) client/_paths.h + $(RM) daemon/_paths.h .PHONY: distclean distclean: clean +daemon/main.o: daemon/_paths.h daemon/io.o: CFLAGS += $(CFLAGS_libxenevtchn) $(CFLAGS_libxengnttab) xenconsoled: $(patsubst %.c,%.o,$(wildcard daemon/*.c)) $(CC) $(LDFLAGS) $^ -o $@ $(LDLIBS) $(LDLIBS_libxenevtchn) $(LDLIBS_libxengnttab) $(LDLIBS_xenconsoled) $(APPEND_LDFLAGS) @@ -37,6 +39,9 @@ xenconsole: $(patsubst %.c,%.o,$(wildcard client/*.c)) genpath-target = $(call buildmakevars2header,client/_paths.h) $(eval $(genpath-target)) +genpath-target = $(call buildmakevars2header,daemon/_paths.h) +$(eval $(genpath-target)) + .PHONY: install install: $(BIN) $(INSTALL_DIR) $(DESTDIR)/$(sbindir) diff --git a/tools/console/daemon/main.c b/tools/console/daemon/main.c index 23860d3..20e3513 100644 --- a/tools/console/daemon/main.c +++ b/tools/console/daemon/main.c @@ -31,6 +31,7 @@ #include "utils.h" #include "io.h" +#include "_paths.h" int log_reload = 0; int log_guest = 0; @@ -176,7 +177,7 @@ int main(int argc, char **argv) } if (!log_dir) { - log_dir = strdup("/var/log/xen/console"); + log_dir = strdup(XEN_LOG_DIR "/console"); } if (geteuid() != 0) { -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |