tools/xenstore: remove XEN_LIB_STORED and XENSTORED_ROOTDIR

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>
This commit is contained in:
Juergen Gross authored and Jan Beulich committed 2022-11-02 12:07:57 +01:00
1 parent 0d251a1dd1
commit 1283af6465
14 files changed
+6 -54

No files matched your search

-1
View 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@
Vendored
-4
View File
@@ -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
-4
View File
@@ -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
-3
View 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)
+1 -6
View File
@@ -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" ;;
-1
View 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
-6
View 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
-1
View 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
@@ -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
-1
View 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
-4
View File
@@ -1,4 +0,0 @@
set environment XENSTORED_RUNDIR=testsuite/tmp
set environment XENSTORED_ROOTDIR=testsuite/tmp
handle SIGUSR1 noprint nostop
handle SIGPIPE noprint nostop
-4
View 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; \
-1
View 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
+5 -6
View File
@@ -26,18 +26,17 @@
/* 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];
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.