[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] oxenstored: honour XEN_RUN_STORED in systemd C stub
commit 67a5ab831da2515413ccac810f2f498e5a0c6ca4 Author: Wei Liu <wei.liu2@xxxxxxxxxx> AuthorDate: Mon Jun 13 08:49:15 2016 +0100 Commit: Wei Liu <wei.liu2@xxxxxxxxxx> CommitDate: Fri Jun 17 11:27:21 2016 +0100 oxenstored: honour XEN_RUN_STORED in systemd C stub Generate a _paths.h for that and add proper dependency. Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> Acked-by: David Scott <dave@xxxxxxxxxx> --- .gitignore | 1 + tools/ocaml/xenstored/Makefile | 7 +++++++ tools/ocaml/xenstored/systemd_stubs.c | 6 ++++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 5914bbe..e019f2e 100644 --- a/.gitignore +++ b/.gitignore @@ -349,6 +349,7 @@ tools/ocaml/libs/xentoollog/_xtl_levels.* tools/ocaml/libs/xentoollog/xentoollog.ml tools/ocaml/libs/xentoollog/xentoollog.mli tools/ocaml/libs/xs/paths.ml +tools/ocaml/xenstored/_paths.h tools/ocaml/xenstored/oxenstored tools/ocaml/xenstored/oxenstored.conf tools/ocaml/xenstored/paths.ml diff --git a/tools/ocaml/xenstored/Makefile b/tools/ocaml/xenstored/Makefile index 939dcaa..1769e55 100644 --- a/tools/ocaml/xenstored/Makefile +++ b/tools/ocaml/xenstored/Makefile @@ -30,6 +30,8 @@ systemd_OBJS = systemd systemd_C_OBJS = systemd_stubs OCAML_LIBRARY += systemd +$(foreach obj,$(systemd_C_OBJS),$(obj).o): _paths.h + LIBS_systemd += $(LDFLAGS-y) OBJS = paths \ @@ -93,3 +95,8 @@ genpath-target = $(call buildmakevars2module,paths.ml) $(eval $(genpath-target)) GENERATED_FILES += paths.ml + +genpath-target = $(call buildmakevars2header,_paths.h) +$(eval $(genpath-target)) + +GENERATE_FILES += _paths.h diff --git a/tools/ocaml/xenstored/systemd_stubs.c b/tools/ocaml/xenstored/systemd_stubs.c index a78a72b..322f1e0 100644 --- a/tools/ocaml/xenstored/systemd_stubs.c +++ b/tools/ocaml/xenstored/systemd_stubs.c @@ -28,6 +28,8 @@ #include <sys/socket.h> #include <systemd/sd-daemon.h> +#include "_paths.h" + /* Will work regardless of the order systemd gives them to us */ static int oxen_get_sd_fd(const char *connect_to) { @@ -46,8 +48,8 @@ static int oxen_get_sd_fd(const char *connect_to) static int oxen_verify_socket_socket(const char *connect_to) { - if ((strcmp("/var/run/xenstored/socket_ro", connect_to) != 0) && - (strcmp("/var/run/xenstored/socket", connect_to) != 0)) { + if ((strcmp(XEN_RUN_STORED "/socket_ro", connect_to) != 0) && + (strcmp(XEN_RUN_STORED "/socket", connect_to) != 0)) { sd_notifyf(0, "STATUS=unexpected socket: %s\n" "ERRNO=%i", connect_to, -- 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 |