From nobody Wed May 15 01:17:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1692605694; cv=none; d=zohomail.com; s=zohoarc; b=g1LjT3ayQ6bc3s9bFdueG5FIol1BuopC8QOMtWlcq7iFCx4GIq+t3oz+nJ1ICJcTBeewYeJp9zbYfZTlqJtvgIzuscYiMfHESlnpBsNpOMsRGAL1JhuQyZ2LYHq41iDU6l2mihi7PExIXBcj/m2VuoWFGju4Z6e2nSpepa7o/Y0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1692605694; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=+vTyPY5xV3EpZsT+eQ8CKSxQi7BMW4ZGxy5ay15TpBI=; b=b+mhFDY1UUj1u/qQ6GoVekI/qXbhGmqJ3/MIZe5MqKvBnTToTsllVEr4H1+HJQtcGYvtRglnffMDjtARrHUXo0EnPYMxwdCuuewMQIe1yeQ/XnYZfTstJUgp+qxcpFZ5a6eRkl5GUV7n3LybNOTsEIe/ifK9NlXnoJPylOLqh0g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1692605694374156.59468253293085; Mon, 21 Aug 2023 01:14:54 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.587361.918710 (Exim 4.92) (envelope-from ) id 1qY03Q-0007gx-21; Mon, 21 Aug 2023 08:14:28 +0000 Received: by outflank-mailman (output) from mailman id 587361.918710; Mon, 21 Aug 2023 08:14:28 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qY03P-0007gq-VS; Mon, 21 Aug 2023 08:14:27 +0000 Received: by outflank-mailman (input) for mailman id 587361; Mon, 21 Aug 2023 08:14:26 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qY03N-0007gk-TN for xen-devel@lists.xenproject.org; Mon, 21 Aug 2023 08:14:26 +0000 Received: from smtp-out2.suse.de (smtp-out2.suse.de [2001:67c:2178:6::1d]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id bd2c032e-3ffa-11ee-8782-cb3800f73035; Mon, 21 Aug 2023 10:14:24 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 2F1142057E; Mon, 21 Aug 2023 08:14:24 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id CC0A213421; Mon, 21 Aug 2023 08:14:23 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id a1eTMN8c42T3NAAAMHmgww (envelope-from ); Mon, 21 Aug 2023 08:14:23 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: bd2c032e-3ffa-11ee-8782-cb3800f73035 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1692605664; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=+vTyPY5xV3EpZsT+eQ8CKSxQi7BMW4ZGxy5ay15TpBI=; b=e/k+dIxMN8BqdSwph5z3S/Is1hPl59ksRD4izXnD76kRHhsdTeK3Ou8Hy0Qa9dLj47zu2T gLuXXMruKMiz594bJXb/pVpe/095H52Qpa21XtHbYEuVg4nI2Jrzp2itPTSdUDf9B8RBzD liXahbFZhND8xTfT561rlYIdNgL2+gU= From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , Anthony PERARD , Samuel Thibault , Julien Grall Subject: [PATCH v6] tools/xenstore: move xenstored sources into dedicated directory Date: Mon, 21 Aug 2023 10:14:22 +0200 Message-Id: <20230821081422.17027-1-jgross@suse.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1692605696042100001 Content-Type: text/plain; charset="utf-8" In tools/xenstore there are living xenstored and xenstore clients. They are no longer sharing anything apart from the "xenstore" in their names. Move the xenstored sources into a new directory tools/xenstored while dropping the "xenstored_" prefix from their names. This will make it clearer that xenstore clients and xenstored are independent from each other. In order to avoid two very similar named directories below tools, rename tools/xenstore to tools/xs-clients. Signed-off-by: Juergen Gross Reviewed-by: Julien Grall Acked-by: Anthony PERARD --- After the large overhaul of xenstored I think such a reorg would make sense to go into the same Xen version. Delaying it until the next version would make potential backports for 4.18 harder. V4: - new patch V5: - rename xenstore directory to xs-clients (Julien Grall) V6: - use local .gitignore files (Andrew Cooper) --- .gitignore | 11 ----- MAINTAINERS | 3 +- stubdom/Makefile | 4 +- tools/Makefile | 3 +- tools/xenstored/.gitignore | 1 + tools/xenstored/Makefile | 48 +++++++++++++++++++ tools/{xenstore =3D> xenstored}/Makefile.common | 13 +++-- tools/{xenstore =3D> xenstored}/README | 0 .../control.c} | 8 ++-- .../control.h} | 0 .../xenstored_core.c =3D> xenstored/core.c} | 14 +++--- .../xenstored_core.h =3D> xenstored/core.h} | 0 .../xenstored_domain.c =3D> xenstored/domain.c} | 10 ++-- .../xenstored_domain.h =3D> xenstored/domain.h} | 0 tools/{xenstore =3D> xenstored}/hashtable.c | 0 tools/{xenstore =3D> xenstored}/hashtable.h | 0 tools/{xenstore =3D> xenstored}/list.h | 0 .../xenstored_lu.c =3D> xenstored/lu.c} | 8 ++-- .../xenstored_lu.h =3D> xenstored/lu.h} | 0 .../lu_daemon.c} | 4 +- .../lu_minios.c} | 2 +- .../xenstored_minios.c =3D> xenstored/minios.c} | 2 +- .../xenstored_osdep.h =3D> xenstored/osdep.h} | 0 .../xenstored_posix.c =3D> xenstored/posix.c} | 4 +- tools/{xenstore =3D> xenstored}/talloc.c | 0 tools/{xenstore =3D> xenstored}/talloc.h | 0 .../{xenstore =3D> xenstored}/talloc_guide.txt | 0 .../transaction.c} | 6 +-- .../transaction.h} | 2 +- tools/{xenstore =3D> xenstored}/utils.c | 0 tools/{xenstore =3D> xenstored}/utils.h | 0 .../xenstored_watch.c =3D> xenstored/watch.c} | 6 +-- .../xenstored_watch.h =3D> xenstored/watch.h} | 2 +- .../include =3D> xenstored}/xenstore_state.h | 0 tools/xs-clients/.gitignore | 10 ++++ tools/{xenstore =3D> xs-clients}/Makefile | 30 ++---------- .../xenstore_client.c | 0 .../xenstore_control.c | 0 38 files changed, 110 insertions(+), 81 deletions(-) create mode 100644 tools/xenstored/.gitignore create mode 100644 tools/xenstored/Makefile rename tools/{xenstore =3D> xenstored}/Makefile.common (50%) rename tools/{xenstore =3D> xenstored}/README (100%) rename tools/{xenstore/xenstored_control.c =3D> xenstored/control.c} (98%) rename tools/{xenstore/xenstored_control.h =3D> xenstored/control.h} (100%) rename tools/{xenstore/xenstored_core.c =3D> xenstored/core.c} (99%) rename tools/{xenstore/xenstored_core.h =3D> xenstored/core.h} (100%) rename tools/{xenstore/xenstored_domain.c =3D> xenstored/domain.c} (99%) rename tools/{xenstore/xenstored_domain.h =3D> xenstored/domain.h} (100%) rename tools/{xenstore =3D> xenstored}/hashtable.c (100%) rename tools/{xenstore =3D> xenstored}/hashtable.h (100%) rename tools/{xenstore =3D> xenstored}/list.h (100%) rename tools/{xenstore/xenstored_lu.c =3D> xenstored/lu.c} (98%) rename tools/{xenstore/xenstored_lu.h =3D> xenstored/lu.h} (100%) rename tools/{xenstore/xenstored_lu_daemon.c =3D> xenstored/lu_daemon.c} (= 97%) rename tools/{xenstore/xenstored_lu_minios.c =3D> xenstored/lu_minios.c} (= 98%) rename tools/{xenstore/xenstored_minios.c =3D> xenstored/minios.c} (97%) rename tools/{xenstore/xenstored_osdep.h =3D> xenstored/osdep.h} (100%) rename tools/{xenstore/xenstored_posix.c =3D> xenstored/posix.c} (98%) rename tools/{xenstore =3D> xenstored}/talloc.c (100%) rename tools/{xenstore =3D> xenstored}/talloc.h (100%) rename tools/{xenstore =3D> xenstored}/talloc_guide.txt (100%) rename tools/{xenstore/xenstored_transaction.c =3D> xenstored/transaction.= c} (99%) rename tools/{xenstore/xenstored_transaction.h =3D> xenstored/transaction.= h} (98%) rename tools/{xenstore =3D> xenstored}/utils.c (100%) rename tools/{xenstore =3D> xenstored}/utils.h (100%) rename tools/{xenstore/xenstored_watch.c =3D> xenstored/watch.c} (98%) rename tools/{xenstore/xenstored_watch.h =3D> xenstored/watch.h} (98%) rename tools/{xenstore/include =3D> xenstored}/xenstore_state.h (100%) create mode 100644 tools/xs-clients/.gitignore rename tools/{xenstore =3D> xs-clients}/Makefile (74%) rename tools/{xenstore =3D> xs-clients}/xenstore_client.c (100%) rename tools/{xenstore =3D> xs-clients}/xenstore_control.c (100%) diff --git a/.gitignore b/.gitignore index c1b73b0968..50273adb8d 100644 --- a/.gitignore +++ b/.gitignore @@ -237,17 +237,6 @@ tools/xenmon/xentrace_setmask tools/xenmon/xenbaked tools/xenpaging/xenpaging tools/xenpmd/xenpmd -tools/xenstore/xenstore -tools/xenstore/xenstore-chmod -tools/xenstore/xenstore-control -tools/xenstore/xenstore-exists -tools/xenstore/xenstore-list -tools/xenstore/xenstore-ls -tools/xenstore/xenstore-read -tools/xenstore/xenstore-rm -tools/xenstore/xenstore-watch -tools/xenstore/xenstore-write -tools/xenstore/xenstored tools/xentop/xentop tools/xentrace/xentrace_setsize tools/xentrace/tbctl diff --git a/MAINTAINERS b/MAINTAINERS index a0805d35cd..bf71ac144c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -669,7 +669,8 @@ F: tools/include/xenstore.h F: tools/include/xenstore_lib.h F: tools/include/xen-tools/xenstore-common.h F: tools/libs/store/ -F: tools/xenstore/ +F: tools/xenstored/ +F: tools/xs-clients/ =20 XENTRACE M: George Dunlap diff --git a/stubdom/Makefile b/stubdom/Makefile index d5fb354e7e..52bf7f0e21 100644 --- a/stubdom/Makefile +++ b/stubdom/Makefile @@ -371,10 +371,10 @@ endef =20 $(foreach lib,$(STUB_LIBS),$(eval $(call BUILD_lib,$(lib)))) =20 -xenstore/stamp: $(XEN_ROOT)/tools/xenstore/Makefile.common +xenstore/stamp: $(XEN_ROOT)/tools/xenstored/Makefile.common $(do_links) =20 -xenstorepvh/stamp: $(XEN_ROOT)/tools/xenstore/Makefile.common +xenstorepvh/stamp: $(XEN_ROOT)/tools/xenstored/Makefile.common $(do_links) =20 LINK_DIRS :=3D xenstore xenstorepvh $(foreach dir,$(STUB_LIBS),libs-$(XEN_= TARGET_ARCH)/$(dir)) diff --git a/tools/Makefile b/tools/Makefile index 311a9098d7..3a510663a0 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -8,7 +8,8 @@ SUBDIRS-y :=3D SUBDIRS-y +=3D libs SUBDIRS-y +=3D flask SUBDIRS-y +=3D fuzz -SUBDIRS-y +=3D xenstore +SUBDIRS-y +=3D xs-clients +SUBDIRS-$(XENSTORE_XENSTORED) +=3D xenstored SUBDIRS-y +=3D misc SUBDIRS-y +=3D examples SUBDIRS-y +=3D hotplug diff --git a/tools/xenstored/.gitignore b/tools/xenstored/.gitignore new file mode 100644 index 0000000000..edbb5d79fe --- /dev/null +++ b/tools/xenstored/.gitignore @@ -0,0 +1 @@ +xenstored diff --git a/tools/xenstored/Makefile b/tools/xenstored/Makefile new file mode 100644 index 0000000000..f3bd3d43c4 --- /dev/null +++ b/tools/xenstored/Makefile @@ -0,0 +1,48 @@ +XEN_ROOT=3D$(CURDIR)/../.. +include $(XEN_ROOT)/tools/Rules.mk + +include Makefile.common + +xenstored: LDLIBS +=3D $(LDLIBS_libxenevtchn) +xenstored: LDLIBS +=3D $(LDLIBS_libxengnttab) +xenstored: LDLIBS +=3D $(LDLIBS_libxenctrl) +xenstored: LDLIBS +=3D -lrt +xenstored: LDLIBS +=3D $(SOCKET_LIBS) + +ifeq ($(CONFIG_SYSTEMD),y) +$(XENSTORED_OBJS-y): CFLAGS +=3D $(SYSTEMD_CFLAGS) +xenstored: LDLIBS +=3D $(SYSTEMD_LIBS) +endif + +TARGETS +=3D xenstored + +.PHONY: all +all: $(TARGETS) + +xenstored: $(XENSTORED_OBJS-y) + $(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@ $(APPEND_LDFLAGS) + +.PHONY: clean +clean:: + $(RM) $(TARGETS) $(DEPS_RM) + +.PHONY: distclean +distclean: clean + +.PHONY: TAGS +TAGS: + etags `find . -name '*.[ch]'` + +.PHONY: install +install: all + $(INSTALL_DIR) $(DESTDIR)$(sbindir) + $(INSTALL_PROG) xenstored $(DESTDIR)$(sbindir) + +.PHONY: uninstall +uninstall: + rm -f $(DESTDIR)$(sbindir)/xenstored + if [ -d $(DESTDIR)$(includedir)/xenstore-compat ]; then \ + rmdir --ignore-fail-on-non-empty $(DESTDIR)$(includedir)/xenstore-compat= ; \ + fi + +-include $(DEPS_INCLUDE) diff --git a/tools/xenstore/Makefile.common b/tools/xenstored/Makefile.comm= on similarity index 50% rename from tools/xenstore/Makefile.common rename to tools/xenstored/Makefile.common index 41973a8a5e..189ab81b8d 100644 --- a/tools/xenstore/Makefile.common +++ b/tools/xenstored/Makefile.common @@ -1,17 +1,16 @@ # Makefile shared with stubdom =20 -XENSTORED_OBJS-y :=3D xenstored_core.o xenstored_watch.o xenstored_domain.o -XENSTORED_OBJS-y +=3D xenstored_transaction.o xenstored_control.o xenstore= d_lu.o +XENSTORED_OBJS-y :=3D core.o watch.o domain.o +XENSTORED_OBJS-y +=3D transaction.o control.o lu.o XENSTORED_OBJS-y +=3D talloc.o utils.o hashtable.o =20 -XENSTORED_OBJS-$(CONFIG_Linux) +=3D xenstored_posix.o xenstored_lu_daemon.o -XENSTORED_OBJS-$(CONFIG_NetBSD) +=3D xenstored_posix.o xenstored_lu_daemon= .o -XENSTORED_OBJS-$(CONFIG_FreeBSD) +=3D xenstored_posix.o xenstored_lu_daemo= n.o -XENSTORED_OBJS-$(CONFIG_MiniOS) +=3D xenstored_minios.o xenstored_lu_minio= s.o +XENSTORED_OBJS-$(CONFIG_Linux) +=3D posix.o lu_daemon.o +XENSTORED_OBJS-$(CONFIG_NetBSD) +=3D posix.o lu_daemon.o +XENSTORED_OBJS-$(CONFIG_FreeBSD) +=3D posix.o lu_daemon.o +XENSTORED_OBJS-$(CONFIG_MiniOS) +=3D minios.o lu_minios.o =20 # Include configure output (config.h) CFLAGS +=3D -include $(XEN_ROOT)/tools/config.h -CFLAGS +=3D -I./include CFLAGS +=3D $(CFLAGS_libxenevtchn) CFLAGS +=3D $(CFLAGS_libxenctrl) CFLAGS +=3D $(CFLAGS_libxenguest) diff --git a/tools/xenstore/README b/tools/xenstored/README similarity index 100% rename from tools/xenstore/README rename to tools/xenstored/README diff --git a/tools/xenstore/xenstored_control.c b/tools/xenstored/control.c similarity index 98% rename from tools/xenstore/xenstored_control.c rename to tools/xenstored/control.c index 3bdf2edc34..b2f64d674f 100644 --- a/tools/xenstore/xenstored_control.c +++ b/tools/xenstored/control.c @@ -27,10 +27,10 @@ =20 #include "utils.h" #include "talloc.h" -#include "xenstored_core.h" -#include "xenstored_control.h" -#include "xenstored_domain.h" -#include "xenstored_lu.h" +#include "core.h" +#include "control.h" +#include "domain.h" +#include "lu.h" =20 struct cmd_s { char *cmd; diff --git a/tools/xenstore/xenstored_control.h b/tools/xenstored/control.h similarity index 100% rename from tools/xenstore/xenstored_control.h rename to tools/xenstored/control.h diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstored/core.c similarity index 99% rename from tools/xenstore/xenstored_core.c rename to tools/xenstored/core.c index 7de4df2f28..092de76a2e 100644 --- a/tools/xenstore/xenstored_core.c +++ b/tools/xenstored/core.c @@ -47,12 +47,12 @@ #include "utils.h" #include "list.h" #include "talloc.h" -#include "xenstored_core.h" -#include "xenstored_watch.h" -#include "xenstored_transaction.h" -#include "xenstored_domain.h" -#include "xenstored_control.h" -#include "xenstored_lu.h" +#include "core.h" +#include "watch.h" +#include "transaction.h" +#include "domain.h" +#include "control.h" +#include "lu.h" =20 #ifndef NO_SOCKETS #if defined(HAVE_SYSTEMD) @@ -64,7 +64,7 @@ #include #endif =20 -extern xenevtchn_handle *xce_handle; /* in xenstored_domain.c */ +extern xenevtchn_handle *xce_handle; /* in domain.c */ static int xce_pollfd_idx =3D -1; static struct pollfd *fds; static unsigned int current_array_size; diff --git a/tools/xenstore/xenstored_core.h b/tools/xenstored/core.h similarity index 100% rename from tools/xenstore/xenstored_core.h rename to tools/xenstored/core.h diff --git a/tools/xenstore/xenstored_domain.c b/tools/xenstored/domain.c similarity index 99% rename from tools/xenstore/xenstored_domain.c rename to tools/xenstored/domain.c index 1bf138c8b1..a6cd199fdc 100644 --- a/tools/xenstore/xenstored_domain.c +++ b/tools/xenstored/domain.c @@ -27,11 +27,11 @@ =20 #include "utils.h" #include "talloc.h" -#include "xenstored_core.h" -#include "xenstored_domain.h" -#include "xenstored_transaction.h" -#include "xenstored_watch.h" -#include "xenstored_control.h" +#include "core.h" +#include "domain.h" +#include "transaction.h" +#include "watch.h" +#include "control.h" =20 #include #include diff --git a/tools/xenstore/xenstored_domain.h b/tools/xenstored/domain.h similarity index 100% rename from tools/xenstore/xenstored_domain.h rename to tools/xenstored/domain.h diff --git a/tools/xenstore/hashtable.c b/tools/xenstored/hashtable.c similarity index 100% rename from tools/xenstore/hashtable.c rename to tools/xenstored/hashtable.c diff --git a/tools/xenstore/hashtable.h b/tools/xenstored/hashtable.h similarity index 100% rename from tools/xenstore/hashtable.h rename to tools/xenstored/hashtable.h diff --git a/tools/xenstore/list.h b/tools/xenstored/list.h similarity index 100% rename from tools/xenstore/list.h rename to tools/xenstored/list.h diff --git a/tools/xenstore/xenstored_lu.c b/tools/xenstored/lu.c similarity index 98% rename from tools/xenstore/xenstored_lu.c rename to tools/xenstored/lu.c index f7f76acbf9..2f41d10c95 100644 --- a/tools/xenstore/xenstored_lu.c +++ b/tools/xenstored/lu.c @@ -13,10 +13,10 @@ #include =20 #include "talloc.h" -#include "xenstored_core.h" -#include "xenstored_domain.h" -#include "xenstored_lu.h" -#include "xenstored_watch.h" +#include "core.h" +#include "domain.h" +#include "lu.h" +#include "watch.h" =20 #ifndef NO_LIVE_UPDATE struct live_update *lu_status; diff --git a/tools/xenstore/xenstored_lu.h b/tools/xenstored/lu.h similarity index 100% rename from tools/xenstore/xenstored_lu.h rename to tools/xenstored/lu.h diff --git a/tools/xenstore/xenstored_lu_daemon.c b/tools/xenstored/lu_daem= on.c similarity index 97% rename from tools/xenstore/xenstored_lu_daemon.c rename to tools/xenstored/lu_daemon.c index 8c7522b0e1..71bcabadd3 100644 --- a/tools/xenstore/xenstored_lu_daemon.c +++ b/tools/xenstored/lu_daemon.c @@ -13,8 +13,8 @@ #include =20 #include "talloc.h" -#include "xenstored_core.h" -#include "xenstored_lu.h" +#include "core.h" +#include "lu.h" =20 #ifndef NO_LIVE_UPDATE void lu_get_dump_state(struct lu_dump_state *state) diff --git a/tools/xenstore/xenstored_lu_minios.c b/tools/xenstored/lu_mini= os.c similarity index 98% rename from tools/xenstore/xenstored_lu_minios.c rename to tools/xenstored/lu_minios.c index ae0483575e..ede8b4dd47 100644 --- a/tools/xenstore/xenstored_lu_minios.c +++ b/tools/xenstored/lu_minios.c @@ -14,7 +14,7 @@ #include =20 #include "talloc.h" -#include "xenstored_lu.h" +#include "lu.h" =20 /* Mini-OS only knows about MAP_ANON. */ #ifndef MAP_ANONYMOUS diff --git a/tools/xenstore/xenstored_minios.c b/tools/xenstored/minios.c similarity index 97% rename from tools/xenstore/xenstored_minios.c rename to tools/xenstored/minios.c index aa384e50c8..b5c3a205e6 100644 --- a/tools/xenstore/xenstored_minios.c +++ b/tools/xenstored/minios.c @@ -17,7 +17,7 @@ */ #include #include -#include "xenstored_core.h" +#include "core.h" #include =20 void write_pidfile(const char *pidfile) diff --git a/tools/xenstore/xenstored_osdep.h b/tools/xenstored/osdep.h similarity index 100% rename from tools/xenstore/xenstored_osdep.h rename to tools/xenstored/osdep.h diff --git a/tools/xenstore/xenstored_posix.c b/tools/xenstored/posix.c similarity index 98% rename from tools/xenstore/xenstored_posix.c rename to tools/xenstored/posix.c index b20504d1b6..6ac45fdb45 100644 --- a/tools/xenstore/xenstored_posix.c +++ b/tools/xenstored/posix.c @@ -24,8 +24,8 @@ #include =20 #include "utils.h" -#include "xenstored_core.h" -#include "xenstored_osdep.h" +#include "core.h" +#include "osdep.h" =20 void write_pidfile(const char *pidfile) { diff --git a/tools/xenstore/talloc.c b/tools/xenstored/talloc.c similarity index 100% rename from tools/xenstore/talloc.c rename to tools/xenstored/talloc.c diff --git a/tools/xenstore/talloc.h b/tools/xenstored/talloc.h similarity index 100% rename from tools/xenstore/talloc.h rename to tools/xenstored/talloc.h diff --git a/tools/xenstore/talloc_guide.txt b/tools/xenstored/talloc_guide= .txt similarity index 100% rename from tools/xenstore/talloc_guide.txt rename to tools/xenstored/talloc_guide.txt diff --git a/tools/xenstore/xenstored_transaction.c b/tools/xenstored/trans= action.c similarity index 99% rename from tools/xenstore/xenstored_transaction.c rename to tools/xenstored/transaction.c index 1f892b002d..167cd597fd 100644 --- a/tools/xenstore/xenstored_transaction.c +++ b/tools/xenstored/transaction.c @@ -30,9 +30,9 @@ #include #include "talloc.h" #include "list.h" -#include "xenstored_transaction.h" -#include "xenstored_watch.h" -#include "xenstored_domain.h" +#include "transaction.h" +#include "watch.h" +#include "domain.h" #include "xenstore_lib.h" #include "utils.h" =20 diff --git a/tools/xenstore/xenstored_transaction.h b/tools/xenstored/trans= action.h similarity index 98% rename from tools/xenstore/xenstored_transaction.h rename to tools/xenstored/transaction.h index b196b1ab07..90435b4fc9 100644 --- a/tools/xenstore/xenstored_transaction.h +++ b/tools/xenstored/transaction.h @@ -17,7 +17,7 @@ */ #ifndef _XENSTORED_TRANSACTION_H #define _XENSTORED_TRANSACTION_H -#include "xenstored_core.h" +#include "core.h" =20 enum node_access_type { NODE_ACCESS_READ, diff --git a/tools/xenstore/utils.c b/tools/xenstored/utils.c similarity index 100% rename from tools/xenstore/utils.c rename to tools/xenstored/utils.c diff --git a/tools/xenstore/utils.h b/tools/xenstored/utils.h similarity index 100% rename from tools/xenstore/utils.h rename to tools/xenstored/utils.h diff --git a/tools/xenstore/xenstored_watch.c b/tools/xenstored/watch.c similarity index 98% rename from tools/xenstore/xenstored_watch.c rename to tools/xenstored/watch.c index 7d4d097cf9..b66a9f1a39 100644 --- a/tools/xenstore/xenstored_watch.c +++ b/tools/xenstored/watch.c @@ -25,11 +25,11 @@ #include #include "talloc.h" #include "list.h" -#include "xenstored_watch.h" +#include "watch.h" #include "xenstore_lib.h" #include "utils.h" -#include "xenstored_domain.h" -#include "xenstored_transaction.h" +#include "domain.h" +#include "transaction.h" =20 struct watch { diff --git a/tools/xenstore/xenstored_watch.h b/tools/xenstored/watch.h similarity index 98% rename from tools/xenstore/xenstored_watch.h rename to tools/xenstored/watch.h index ea247997ad..d9ac6a334a 100644 --- a/tools/xenstore/xenstored_watch.h +++ b/tools/xenstored/watch.h @@ -19,7 +19,7 @@ #ifndef _XENSTORED_WATCH_H #define _XENSTORED_WATCH_H =20 -#include "xenstored_core.h" +#include "core.h" =20 int do_watch(const void *ctx, struct connection *conn, struct buffered_data *in); diff --git a/tools/xenstore/include/xenstore_state.h b/tools/xenstored/xens= tore_state.h similarity index 100% rename from tools/xenstore/include/xenstore_state.h rename to tools/xenstored/xenstore_state.h diff --git a/tools/xs-clients/.gitignore b/tools/xs-clients/.gitignore new file mode 100644 index 0000000000..233fd8228a --- /dev/null +++ b/tools/xs-clients/.gitignore @@ -0,0 +1,10 @@ +xenstore +xenstore-chmod +xenstore-control +xenstore-exists +xenstore-list +xenstore-ls +xenstore-read +xenstore-rm +xenstore-watch +xenstore-write diff --git a/tools/xenstore/Makefile b/tools/xs-clients/Makefile similarity index 74% rename from tools/xenstore/Makefile rename to tools/xs-clients/Makefile index dc39b6cb31..1c5740450a 100644 --- a/tools/xenstore/Makefile +++ b/tools/xs-clients/Makefile @@ -1,18 +1,11 @@ XEN_ROOT=3D$(CURDIR)/../.. include $(XEN_ROOT)/tools/Rules.mk =20 -include Makefile.common - -xenstored: LDLIBS +=3D $(LDLIBS_libxenevtchn) -xenstored: LDLIBS +=3D $(LDLIBS_libxengnttab) -xenstored: LDLIBS +=3D $(LDLIBS_libxenctrl) -xenstored: LDLIBS +=3D -lrt -xenstored: LDLIBS +=3D $(SOCKET_LIBS) - -ifeq ($(CONFIG_SYSTEMD),y) -$(XENSTORED_OBJS-y): CFLAGS +=3D $(SYSTEMD_CFLAGS) -xenstored: LDLIBS +=3D $(SYSTEMD_LIBS) -endif +CFLAGS +=3D -include $(XEN_ROOT)/tools/config.h +CFLAGS +=3D $(CFLAGS_libxenctrl) +CFLAGS +=3D $(CFLAGS_libxenguest) +CFLAGS +=3D $(CFLAGS_libxentoolcore) +CFLAGS +=3D $(CFLAGS_libxenstore) =20 xenstore: LDLIBS +=3D $(LDLIBS_libxenstore) xenstore: LDLIBS +=3D $(LDLIBS_libxentoolcore) @@ -28,9 +21,6 @@ CLIENTS :=3D xenstore-exists xenstore-list xenstore-read = xenstore-rm xenstore-chmo CLIENTS +=3D xenstore-write xenstore-ls xenstore-watch =20 TARGETS :=3D xenstore $(CLIENTS) xenstore-control -ifeq ($(XENSTORE_XENSTORED),y) -TARGETS +=3D xenstored -endif =20 .PHONY: all all: $(TARGETS) @@ -38,9 +28,6 @@ all: $(TARGETS) .PHONY: clients clients: xenstore $(CLIENTS) xenstore-control =20 -xenstored: $(XENSTORED_OBJS-y) - $(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@ $(APPEND_LDFLAGS) - $(CLIENTS): xenstore ln -f xenstore $@ =20 @@ -64,10 +51,6 @@ TAGS: .PHONY: install install: all $(INSTALL_DIR) $(DESTDIR)$(bindir) -ifeq ($(XENSTORE_XENSTORED),y) - $(INSTALL_DIR) $(DESTDIR)$(sbindir) - $(INSTALL_PROG) xenstored $(DESTDIR)$(sbindir) -endif $(INSTALL_PROG) xenstore-control $(DESTDIR)$(bindir) $(INSTALL_PROG) xenstore $(DESTDIR)$(bindir) set -e ; for c in $(CLIENTS) ; do \ @@ -79,9 +62,6 @@ uninstall: rm -f $(addprefix $(DESTDIR)$(bindir)/, $(CLIENTS)) rm -f $(DESTDIR)$(bindir)/xenstore rm -f $(DESTDIR)$(bindir)/xenstore-control -ifeq ($(XENSTORE_XENSTORED),y) - rm -f $(DESTDIR)$(sbindir)/xenstored -endif if [ -d $(DESTDIR)$(includedir)/xenstore-compat ]; then \ rmdir --ignore-fail-on-non-empty $(DESTDIR)$(includedir)/xenstore-compat= ; \ fi diff --git a/tools/xenstore/xenstore_client.c b/tools/xs-clients/xenstore_c= lient.c similarity index 100% rename from tools/xenstore/xenstore_client.c rename to tools/xs-clients/xenstore_client.c diff --git a/tools/xenstore/xenstore_control.c b/tools/xs-clients/xenstore_= control.c similarity index 100% rename from tools/xenstore/xenstore_control.c rename to tools/xs-clients/xenstore_control.c --=20 2.35.3