]> xenbits.xensource.com Git - people/tklengyel/xen.git/commitdiff
tools/xenstore: remove XEN_LIB_STORED and XENSTORED_ROOTDIR
authorJuergen Gross <jgross@suse.com>
Wed, 2 Nov 2022 11:07:57 +0000 (12:07 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 2 Nov 2022 11:07:57 +0000 (12:07 +0100)
XEN_LIB_STORED is serving no real purpose, as it is a mount point for
a tmpfs, so it can be replaced easily by XEN_RUN_STORED.

XENSTORED_ROOTDIR is basically unused already, there is just a single
reference in xs_daemon_rootdir() with a fallback to XEN_LIB_STORED,
and a .gdbinit file setting it.

Remove the .gdbinit file, as it is not known having been used since
ages, and make xs_daemon_rootdir() an alias of xs_daemon_rundir().

Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Release-acked-by: Henry Wang <Henry.Wang@arm.com>
14 files changed:
config/Paths.mk.in
configure
docs/configure
m4/paths.m4
tools/configure
tools/configure.ac
tools/hotplug/FreeBSD/rc.d/xencommons.in
tools/hotplug/Linux/systemd/Makefile
tools/hotplug/Linux/systemd/var-lib-xenstored.mount.in [deleted file]
tools/libs/store/Makefile
tools/xenstore/.gdbinit [deleted file]
tools/xenstore/Makefile
tools/xenstore/Makefile.common
tools/xenstore/xs_lib.c

index 416fc7aab9c3b5dfab12d48ba0892975e1894ef6..44bab1d74830f96e7f3a2ad238216d7a53a87a98 100644 (file)
@@ -41,7 +41,6 @@ MAN8DIR                  := $(mandir)/man8
 XEN_RUN_DIR              := @XEN_RUN_DIR@
 XEN_LOG_DIR              := @XEN_LOG_DIR@
 XEN_LIB_DIR              := @XEN_LIB_DIR@
-XEN_LIB_STORED           := @XEN_LIB_STORED@
 XEN_RUN_STORED           := @XEN_RUN_STORED@
 
 CONFIG_DIR               := @CONFIG_DIR@
index bb7f27ddadb7de29d5b030475106a7649ab2bc21..b51174f2ef33e11e70b3a0a824729bef29c14c99 100755 (executable)
--- a/configure
+++ b/configure
@@ -603,7 +603,6 @@ INITD_DIR
 SHAREDIR
 XEN_LIB_DIR
 XEN_RUN_STORED
-XEN_LIB_STORED
 XEN_LOG_DIR
 XEN_RUN_DIR
 XENFIRMWAREDIR
@@ -2081,9 +2080,6 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
-XEN_LIB_STORED=$localstatedir/lib/xenstored
-
-
 XEN_RUN_STORED=$rundir_path/xenstored
 
 
index d4fced9858c8b81fd550b7a2886704677c979053..f008ca0565a9fbb6e08e5757bf695cbb5d703cc7 100755 (executable)
@@ -601,7 +601,6 @@ INITD_DIR
 SHAREDIR
 XEN_LIB_DIR
 XEN_RUN_STORED
-XEN_LIB_STORED
 XEN_LOG_DIR
 XEN_RUN_DIR
 XENFIRMWAREDIR
@@ -1984,9 +1983,6 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
-XEN_LIB_STORED=$localstatedir/lib/xenstored
-
-
 XEN_RUN_STORED=$rundir_path/xenstored
 
 
index 826faada45a196536f83c6b12c26f583e7285bde..e4104bcce0fbc463adb827039b0916b1b80543bf 100644 (file)
@@ -136,9 +136,6 @@ XEN_LOG_DIR=$localstatedir/log/xen
 AC_SUBST(XEN_LOG_DIR)
 AC_DEFINE_UNQUOTED([XEN_LOG_DIR], ["$XEN_LOG_DIR"], [Xen's log dir])
 
-XEN_LIB_STORED=$localstatedir/lib/xenstored
-AC_SUBST(XEN_LIB_STORED)
-
 XEN_RUN_STORED=$rundir_path/xenstored
 AC_SUBST(XEN_RUN_STORED)
 
index 6199823f5a6d3e101930a9b2fd71be8e0d2a67d4..ffe3f489016aee6e8e4a5305f0d31c1d547d9202 100755 (executable)
@@ -725,7 +725,6 @@ INITD_DIR
 SHAREDIR
 XEN_LIB_DIR
 XEN_RUN_STORED
-XEN_LIB_STORED
 XEN_LOG_DIR
 XEN_RUN_DIR
 XENFIRMWAREDIR
@@ -4065,9 +4064,6 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
-XEN_LIB_STORED=$localstatedir/lib/xenstored
-
-
 XEN_RUN_STORED=$rundir_path/xenstored
 
 
@@ -10085,7 +10081,7 @@ fi
 
 if test "x$systemd" = "xy"; then :
 
-    ac_config_files="$ac_config_files hotplug/Linux/systemd/proc-xen.mount hotplug/Linux/systemd/var-lib-xenstored.mount hotplug/Linux/systemd/xen-init-dom0.service hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service hotplug/Linux/systemd/xen-watchdog.service hotplug/Linux/systemd/xenconsoled.service hotplug/Linux/systemd/xendomains.service hotplug/Linux/systemd/xendriverdomain.service hotplug/Linux/systemd/xenstored.service"
+    ac_config_files="$ac_config_files hotplug/Linux/systemd/proc-xen.mount hotplug/Linux/systemd/xen-init-dom0.service hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service hotplug/Linux/systemd/xen-watchdog.service hotplug/Linux/systemd/xenconsoled.service hotplug/Linux/systemd/xendomains.service hotplug/Linux/systemd/xendriverdomain.service hotplug/Linux/systemd/xenstored.service"
 
 
 fi
@@ -10967,7 +10963,6 @@ do
     "ocaml/xenstored/oxenstored.conf") CONFIG_FILES="$CONFIG_FILES ocaml/xenstored/oxenstored.conf" ;;
     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
     "hotplug/Linux/systemd/proc-xen.mount") CONFIG_FILES="$CONFIG_FILES hotplug/Linux/systemd/proc-xen.mount" ;;
-    "hotplug/Linux/systemd/var-lib-xenstored.mount") CONFIG_FILES="$CONFIG_FILES hotplug/Linux/systemd/var-lib-xenstored.mount" ;;
     "hotplug/Linux/systemd/xen-init-dom0.service") CONFIG_FILES="$CONFIG_FILES hotplug/Linux/systemd/xen-init-dom0.service" ;;
     "hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service") CONFIG_FILES="$CONFIG_FILES hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service" ;;
     "hotplug/Linux/systemd/xen-watchdog.service") CONFIG_FILES="$CONFIG_FILES hotplug/Linux/systemd/xen-watchdog.service" ;;
index 18e481d77e4ce217af34d5017b9377b620b604f4..3a2f6a2da9e000a7a30b9fcb5d4f2b365b446372 100644 (file)
@@ -482,7 +482,6 @@ AX_AVAILABLE_SYSTEMD()
 AS_IF([test "x$systemd" = "xy"], [
     AC_CONFIG_FILES([
     hotplug/Linux/systemd/proc-xen.mount
-    hotplug/Linux/systemd/var-lib-xenstored.mount
     hotplug/Linux/systemd/xen-init-dom0.service
     hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service
     hotplug/Linux/systemd/xen-watchdog.service
index fddcce314c32f341b05cc587a2dbeb2004d1fb8e..7f7cda289f8ab1530dd4cc49660c056c5fc64abd 100644 (file)
@@ -14,7 +14,6 @@ export LD_LIBRARY_PATH
 
 name="xencommons"
 rcvar="xencommons_enable"
-start_precmd="xen_precmd"
 start_cmd="xen_startcmd"
 stop_cmd="xen_stop"
 status_cmd="xen_status"
@@ -30,11 +29,6 @@ XENSTORED_PIDFILE="@XEN_RUN_DIR@/xenstored.pid"
 load_rc_config $name
 : ${xencommons_enable:=no}
 
-xen_precmd()
-{
-       mkdir -p @XEN_LIB_STORED@ || exit 1
-}
-
 xen_startcmd()
 {
        local time=0
index 26df2a43b14b92017fd14a4c5488b2af41bcea6a..e29889156d5c79dff0a0df809d950bdf18a6df87 100644 (file)
@@ -4,7 +4,6 @@ include $(XEN_ROOT)/tools/Rules.mk
 XEN_SYSTEMD_MODULES := xen.conf
 
 XEN_SYSTEMD_MOUNT := proc-xen.mount
-XEN_SYSTEMD_MOUNT += var-lib-xenstored.mount
 
 XEN_SYSTEMD_SERVICE := xenstored.service
 XEN_SYSTEMD_SERVICE += xenconsoled.service
diff --git a/tools/hotplug/Linux/systemd/var-lib-xenstored.mount.in b/tools/hotplug/Linux/systemd/var-lib-xenstored.mount.in
deleted file mode 100644 (file)
index 11a7d50..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-[Unit]
-Description=mount xenstore file system
-Requires=proc-xen.mount
-After=proc-xen.mount
-ConditionPathExists=/proc/xen/capabilities
-RefuseManualStop=true
-
-[Mount]
-What=xenstore
-Where=@XEN_LIB_STORED@
-Type=tmpfs
-Options=mode=755
index 2334c953bb035fb6ecd4846e96ab7b8c8067c557..3557a8c76df7e6036f109fab90d8de95b75e9ad0 100644 (file)
@@ -18,7 +18,6 @@ include ../libs.mk
 # Include configure output (config.h)
 CFLAGS += -include $(XEN_ROOT)/tools/config.h
 CFLAGS += $(CFLAGS_libxentoolcore)
-CFLAGS += -DXEN_LIB_STORED="\"$(XEN_LIB_STORED)\""
 CFLAGS += -DXEN_RUN_STORED="\"$(XEN_RUN_STORED)\""
 
 vpath xs_lib.c $(XEN_ROOT)/tools/xenstore
diff --git a/tools/xenstore/.gdbinit b/tools/xenstore/.gdbinit
deleted file mode 100644 (file)
index 9a71b20..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-set environment XENSTORED_RUNDIR=testsuite/tmp
-set environment XENSTORED_ROOTDIR=testsuite/tmp
-handle SIGUSR1 noprint nostop
-handle SIGPIPE noprint nostop
index 1b66190cc5421330371c784bc77f2d9d148da9c7..ce7a68178f1aded55a40d10e17671f1812a6e358 100644 (file)
@@ -69,7 +69,6 @@ install: all
        $(INSTALL_DIR) $(DESTDIR)$(bindir)
 ifeq ($(XENSTORE_XENSTORED),y)
        $(INSTALL_DIR) $(DESTDIR)$(sbindir)
-       $(INSTALL_DIR) $(DESTDIR)$(XEN_LIB_STORED)
        $(INSTALL_PROG) xenstored $(DESTDIR)$(sbindir)
 endif
        $(INSTALL_PROG) xenstore-control $(DESTDIR)$(bindir)
@@ -85,9 +84,6 @@ uninstall:
        rm -f $(DESTDIR)$(bindir)/xenstore-control
 ifeq ($(XENSTORE_XENSTORED),y)
        rm -f $(DESTDIR)$(sbindir)/xenstored
-       if [ -d $(DESTDIR)$(XEN_LIB_STORED) ]; then \
-               rmdir --ignore-fail-on-non-empty $(DESTDIR)$(XEN_LIB_STORED); \
-       fi
 endif
        if [ -d $(DESTDIR)$(includedir)/xenstore-compat ]; then \
                rmdir --ignore-fail-on-non-empty $(DESTDIR)$(includedir)/xenstore-compat; \
index ddbac052acfbd9df24c5b7dcd6e42b3e2d66c82e..b18f95c1033275db4e8184fbc2376169a95eeeba 100644 (file)
@@ -16,7 +16,6 @@ CFLAGS += $(CFLAGS_libxenevtchn)
 CFLAGS += $(CFLAGS_libxenctrl)
 CFLAGS += $(CFLAGS_libxenguest)
 CFLAGS += $(CFLAGS_libxentoolcore)
-CFLAGS += -DXEN_LIB_STORED="\"$(XEN_LIB_STORED)\""
 CFLAGS += -DXEN_RUN_STORED="\"$(XEN_RUN_STORED)\""
 
 ifdef CONFIG_STUBDOM
index 10fa4c3ad0eb89799328ccb5a25d54315fe2c290..b9941c567cd0559ee76431e9eee525cf0f3ea30c 100644 (file)
 
 /* Common routines for the Xen store daemon and client library. */
 
-const char *xs_daemon_rootdir(void)
-{
-       char *s = getenv("XENSTORED_ROOTDIR");
-       return (s ? s : XEN_LIB_STORED);
-}
-
 const char *xs_daemon_rundir(void)
 {
        char *s = getenv("XENSTORED_RUNDIR");
        return (s ? s : XEN_RUN_STORED);
 }
 
+const char *xs_daemon_rootdir(void)
+{
+       return xs_daemon_rundir();
+}
+
 static const char *xs_daemon_path(void)
 {
        static char buf[PATH_MAX];