Skip to contentSkip to conversation

Rename public xenstore headers

PATCH In review Bastian Blank 3 participants 11 messages Apr 16, 2012 – May 14, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Rename public xenstore headers

The xenstore header xs.h is producing conflicts with other software[1].

xs is a too short identifier and does not matche the library. Renaming the headers to xenstore.h and xenstore_lib.h is the easiest way to make them easy recognizable and prevent furthe problems.

Bastian

[1]: http://bugs.debian.org/668550

Signature · 2 lines
Where there's no emotion, there's no motive for violence.
		-- Spock, "Dagger of the Mind", stardate 2715.1
Makefile +1 -1
@@ -237,7 +237,7 @@
 	rm -rf $(D)$(BINDIR)/setsize $(D)$(BINDIR)/tbctl
 	rm -rf $(D)$(BINDIR)/xsls
 	rm -rf $(D)$(INCLUDEDIR)/xenctrl.h $(D)$(INCLUDEDIR)/xenguest.h
-	rm -rf $(D)$(INCLUDEDIR)/xs_lib.h $(D)$(INCLUDEDIR)/xs.h
+	rm -rf $(D)$(INCLUDEDIR)/xenstore_lib.h $(D)$(INCLUDEDIR)/xenstore.h
 	rm -rf $(D)$(INCLUDEDIR)/xen
 	rm -rf $(D)$(LIBDIR)/libxenctrl* $(D)$(LIBDIR)/libxenguest*
 	rm -rf $(D)$(LIBDIR)/libxenstore*
extras/mini-os/lib/sys.c +1 -1
@@ -28,7 +28,7 @@
 #include <blkfront.h>
 #include <fbfront.h>
 #include <xenbus.h>
-#include <xs.h>
+#include <xenstore.h>
 
 #include <sys/types.h>
 #include <sys/unistd.h>
extras/mini-os/lib/xs.c +1 -1
@@ -9,7 +9,7 @@
 #ifdef HAVE_LIBC
 #include <os.h>
 #include <lib.h>
-#include <xs.h>
+#include <xenstore.h>
 #include <xenbus.h>
 #include <stdlib.h>
 #include <unistd.h>
tools/blktap/drivers/blktapctrl.c +1 -1
@@ -47,7 +47,7 @@
 #include <sys/ioctl.h>
 #include <string.h>
 #include <unistd.h>
-#include <xs.h>
+#include <xenstore.h>
 #include <sys/time.h>
 #include <syslog.h>
 #include <memshr.h>
tools/blktap/lib/blktaplib.h +1 -1
@@ -38,7 +38,7 @@
 #include <xen/xen.h>
 #include <xen/io/blkif.h>
 #include <xen/io/ring.h>
-#include <xs.h>
+#include <xenstore.h>
 #include <sys/types.h>
 #include <unistd.h>
 
tools/blktap/lib/xenbus.c +1 -1
@@ -41,7 +41,7 @@
 #include <err.h>
 #include <stdarg.h>
 #include <errno.h>
-#include <xs.h>
+#include <xenstore.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
tools/blktap/lib/xs_api.c +1 -1
@@ -38,7 +38,7 @@
 #include <err.h>
 #include <stdarg.h>
 #include <errno.h>
-#include <xs.h>
+#include <xenstore.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
tools/console/client/main.c +1 -1
@@ -39,7 +39,7 @@
 #include <sys/stropts.h>
 #endif
 
-#include "xs.h"
+#include <xenstore.h>
 #include "xenctrl.h"
 
 #define ESCAPE_CHARACTER 0x1d
tools/console/daemon/io.c +1 -1
@@ -22,7 +22,7 @@
 
 #include "utils.h"
 #include "io.h"
-#include <xs.h>
+#include <xenstore.h>
 #include <xen/io/console.h>
 
 #include <stdlib.h>
tools/console/daemon/utils.h +1 -1
@@ -26,7 +26,7 @@
 #include <stdio.h>
 #include <xenctrl.h>
 
-#include "xs.h"
+#include <xenstore.h>
 
 void daemonize(const char *pidfile);
 bool xen_setup(void);
tools/libvchan/init.c +1 -1
@@ -40,7 +40,7 @@
 #include <unistd.h>
 #include <fcntl.h>
 
-#include <xs.h>
+#include <xenstore.h>
 #include <xen/sys/evtchn.h>
 #include <xen/sys/gntalloc.h>
 #include <xen/sys/gntdev.h>
tools/libxl/libxl_internal.h +1 -1
@@ -43,7 +43,7 @@
 #include <sys/types.h>
 #include <sys/wait.h>
 
-#include <xs.h>
+#include <xenstore.h>
 #include <xenctrl.h>
 
 #include "xentoollog.h"
tools/misc/xen-lowmemd.c +1 -1
@@ -5,7 +5,7 @@
 
 #include <stdio.h>
 #include <xenctrl.h>
-#include <xs.h>
+#include <xenstore.h>
 #include <stdlib.h>
 #include <string.h>
 
tools/python/xen/lowlevel/checkpoint/checkpoint.c +1 -1
@@ -2,7 +2,7 @@
 
 #include <Python.h>
 
-#include <xs.h>
+#include <xenstore.h>
 #include <xenctrl.h>
 
 #include "checkpoint.h"
tools/python/xen/lowlevel/checkpoint/checkpoint.h +1 -1
@@ -8,7 +8,7 @@
 #include <time.h>
 
 #include <xenguest.h>
-#include <xs.h>
+#include <xenstore.h>
 
 typedef enum {
     dt_unknown,
tools/python/xen/lowlevel/checkpoint/libcheckpoint.c +1 -1
@@ -11,7 +11,7 @@
 
 #include <xenctrl.h>
 #include <xenguest.h>
-#include <xs.h>
+#include <xenstore.h>
 
 #include "checkpoint.h"
 
tools/python/xen/lowlevel/xs/xs.c +1 -1
@@ -30,7 +30,7 @@
 #include <fcntl.h>
 #include <errno.h>
 
-#include "xs.h"
+#include <xenstore.h>
 
 /** @file
  * Python interface to the Xen Store Daemon (xs).
tools/tests/mce-test/tools/xen-mceinj.c +1 -1
@@ -38,7 +38,7 @@
 #include <sys/time.h>
 #include <xen/arch-x86/xen-mca.h>
 #include <xg_save_restore.h>
-#include <xs.h>
+#include <xenstore.h>
 
 #define MCi_type_CTL        0x0
 #define MCi_type_STATUS     0x1
tools/xcutils/xc_save.c +1 -1
@@ -19,7 +19,7 @@
 #include <fcntl.h>
 #include <err.h>
 
-#include <xs.h>
+#include <xenstore.h>
 #include <xenctrl.h>
 #include <xenguest.h>
 
tools/xenbackendd/xenbackendd.c +1 -1
@@ -28,7 +28,7 @@
 #include <string.h>
 #include <syslog.h>
 
-#include <xs.h>
+#include <xenstore.h>
 
 #define DEVTYPE_UNKNOWN 0
 #define DEVTYPE_VIF 1
tools/xenpaging/xenpaging.c +1 -1
@@ -29,7 +29,7 @@
 #include <unistd.h>
 #include <poll.h>
 #include <xc_private.h>
-#include <xs.h>
+#include <xenstore.h>
 #include <getopt.h>
 
 #include "xc_bitops.h"
tools/xenpmd/xenpmd.c +1 -1
@@ -40,7 +40,7 @@
 #include <dirent.h>
 #include <unistd.h>
 #include <sys/stat.h>
-#include <xs.h>
+#include <xenstore.h>
 
 /* #define RUN_STANDALONE */
 #define RUN_IN_SIMULATE_MODE
tools/xenstat/libxenstat/src/xenstat_priv.h +1 -1
@@ -24,7 +24,7 @@
 #define XENSTAT_PRIV_H
 
 #include <sys/types.h>
-#include <xs.h>
+#include <xenstore.h>
 #include "xenstat.h"
 
 #include "xenctrl.h"
tools/xenstore/COPYING +2 -2
@@ -1,6 +1,6 @@
 This license (LGPL) applies to the xenstore library which interfaces
-with the xenstore daemon (as stated in xs.c, xs.h, xs_lib.c and
-xs_lib.h).  The remaining files in the directory are licensed as
+with the xenstore daemon (as stated in xs.c, xenstore.h, xs_lib.c and
+xenstore_lib.h).  The remaining files in the directory are licensed as
 stated in the comments (as of this writing, GPL, see ../../COPYING).
 
 
tools/xenstore/Makefile +2 -2
@@ -122,8 +122,8 @@
 	ln -sf libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenstore.so.$(MAJOR)
 	ln -sf libxenstore.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenstore.so
 	$(INSTALL_DATA) libxenstore.a $(DESTDIR)$(LIBDIR)
-	$(INSTALL_DATA) xs.h $(DESTDIR)$(INCLUDEDIR)
-	$(INSTALL_DATA) xs_lib.h $(DESTDIR)$(INCLUDEDIR)
+	$(INSTALL_DATA) xenstore.h $(DESTDIR)$(INCLUDEDIR)
+	$(INSTALL_DATA) xenstore_lib.h $(DESTDIR)$(INCLUDEDIR)
 
 -include $(DEPS)
 
tools/xenstore/init-xenstore-domain.c +1 -1
@@ -7,7 +7,7 @@
 #include <sys/mman.h>
 #include <xenctrl.h>
 #include <xc_dom.h>
-#include <xs.h>
+#include <xenstore.h>
 #include <xen/sys/xenbus_dev.h>
 
 static uint32_t domid = -1;
tools/xenstore/xenstore.h renamed from tools/xenstore/xs.h +4 -4
rename from tools/xenstore/xs.h
rename to tools/xenstore/xenstore.h
@@ -17,10 +17,10 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
 
-#ifndef _XS_H
-#define _XS_H
+#ifndef XENSTORE_H
+#define XENSTORE_H
 
-#include <xs_lib.h>
+#include <xenstore_lib.h>
 
 #define XBT_NULL 0
 
@@ -223,7 +223,7 @@
 		       void *data, unsigned int len);
 
 int xs_suspend_evtchn_port(int domid);
-#endif /* _XS_H */
+#endif /* XENSTORE_H */
 
 /*
  * Local variables:
tools/xenstore/xenstore_client.c +1 -1
@@ -18,7 +18,7 @@
 #include <string.h>
 #include <termios.h>
 #include <unistd.h>
-#include <xs.h>
+#include <xenstore.h>
 
 #include <sys/ioctl.h>
 
tools/xenstore/xenstore_control.c +1 -1
@@ -2,7 +2,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "xs.h"
+#include "xenstore.h"
 
 
 int main(int argc, char **argv)
tools/xenstore/xenstore_lib.h renamed from tools/xenstore/xs_lib.h +3 -3
rename from tools/xenstore/xs_lib.h
rename to tools/xenstore/xenstore_lib.h
@@ -17,8 +17,8 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
 
-#ifndef _XS_LIB_H
-#define _XS_LIB_H
+#ifndef XENSTORE_LIB_H
+#define XENSTORE_LIB_H
 
 #include <stdbool.h>
 #include <limits.h>
@@ -82,4 +82,4 @@
 /* *out_len_r on entry is ignored; out must be at least strlen(in)+1 bytes. */
 void unsanitise_value(char *out, unsigned *out_len_r, const char *in);
 
-#endif /* _XS_LIB_H */
+#endif /* XENSTORE_LIB_H */
tools/xenstore/xenstored_core.c +1 -1
@@ -44,7 +44,7 @@
 #include "utils.h"
 #include "list.h"
 #include "talloc.h"
-#include "xs_lib.h"
+#include "xenstore_lib.h"
 #include "xenstored_core.h"
 #include "xenstored_watch.h"
 #include "xenstored_transaction.h"
tools/xenstore/xenstored_core.h +1 -1
@@ -27,7 +27,7 @@
 #include <stdbool.h>
 #include <stdint.h>
 #include <errno.h>
-#include "xs_lib.h"
+#include "xenstore_lib.h"
 #include "list.h"
 #include "tdb.h"
 
tools/xenstore/xenstored_transaction.c +1 -1
@@ -33,7 +33,7 @@
 #include "xenstored_transaction.h"
 #include "xenstored_watch.h"
 #include "xenstored_domain.h"
-#include "xs_lib.h"
+#include "xenstore_lib.h"
 #include "utils.h"
 
 struct changed_node
tools/xenstore/xenstored_watch.c +1 -1
@@ -27,7 +27,7 @@
 #include "talloc.h"
 #include "list.h"
 #include "xenstored_watch.h"
-#include "xs_lib.h"
+#include "xenstore_lib.h"
 #include "utils.h"
 #include "xenstored_domain.h"
 
tools/xenstore/xs.c +1 -1
@@ -32,7 +32,7 @@
 #include <signal.h>
 #include <stdint.h>
 #include <errno.h>
-#include "xs.h"
+#include "xenstore.h"
 #include "list.h"
 #include "utils.h"
 
tools/xenstore/xs_lib.c +1 -1
@@ -23,7 +23,7 @@
 #include <stdlib.h>
 #include <errno.h>
 #include <assert.h>
-#include "xs_lib.h"
+#include "xenstore_lib.h"
 
 /* Common routines for the Xen store daemon and client library. */
 
tools/xenstore/xs_tdb_dump.c +1 -1
@@ -5,7 +5,7 @@
 #include <stdio.h>
 #include <stdarg.h>
 #include <string.h>
-#include "xs_lib.h"
+#include "xenstore_lib.h"
 #include "tdb.h"
 #include "talloc.h"
 #include "utils.h"

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Bastian Blank

The xenstore header xs.h is producing conflicts with other software[1].

xs is a too short identifier and does not matche the library. Renaming the headers to xenstore.h and xenstore_lib.h is the easiest way to make them easy recognizable and prevent furthe problems.

Thanks Bastian.

This needs a Signed-off-by from you, per the DCO at
http://wiki.xen.org/wiki/SubmittingXenPatches

For my part:

I can't see a good way to do this in a compatible manner for out of tree users[0], so I think if we are going to make this change then we should make a freeze exception and do it in 4.2 (i.e. rip the plaster off quickly rather than have distros solve this their own way while waiting for 4.3).

Ian.

[0] apart perhaps from having /usr/include/xen-compat/xs.h and suggesting that people can use -I/usr/include/xen-compat as a bandaid, but at that point they may as well just sed their code, since they may need to support 4.1 anyhow.

Ian.

Quoted 3 lines

Bastian

[1]: http://bugs.debian.org/668550

Acked-by
#2 lore raw

Ian Campbell writes ("Re: [Xen-devel] [PATCH] Rename public xenstore headers"):

Quoted 7 lines · Bastian Blank
Quoted 5 lines

The xenstore header xs.h is producing conflicts with other software[1].

xs is a too short identifier and does not matche the library. Renaming the headers to xenstore.h and xenstore_lib.h is the easiest way to make them easy recognizable and prevent furthe problems.

Quoted 8 lines

Thanks Bastian.

This needs a Signed-off-by from you, per the DCO at
http://wiki.xen.org/wiki/SubmittingXenPatches

For my part:

I agree.

Quoted 5 lines

I can't see a good way to do this in a compatible manner for out of tree users[0], so I think if we are going to make this change then we should make a freeze exception and do it in 4.2 (i.e. rip the plaster off quickly rather than have distros solve this their own way while waiting for 4.3).

Yes.

Quoted 4 lines

[0] apart perhaps from having /usr/include/xen-compat/xs.h and suggesting that people can use -I/usr/include/xen-compat as a bandaid, but at that point they may as well just sed their code, since they may need to support 4.1 anyhow.

I think this would be a useful thing to add. Providing that would mean that with -I/usr/include/xen-compat, the same code could compile against both 4.1 and 4.2, if it said <xs.h>.

Ian.

#3 lore raw
Quoted 9 lines
Quoted 5 lines

[0] apart perhaps from having /usr/include/xen-compat/xs.h and suggesting that people can use -I/usr/include/xen-compat as a bandaid, but at that point they may as well just sed their code, since they may need to support 4.1 anyhow.

I think this would be a useful thing to add. Providing that would mean that with -I/usr/include/xen-compat, the same code could compile against both 4.1 and 4.2, if it said <xs.h>.

I'm a little concerned about breaking out of tree users (specifically upstream Qemu). How about the following based on Bastian's patch.

This installs the headers as xenstore.h and xenstore_lib.h and provides compat headers in /usr/include/xenstore-compat/xs{,_lib}.h which #warn and then include the new names. This means that upstream code should be buildable using -I/usr/include/xenstore-compat.

However, since we are now frozen for 4.2 I propose that we also create symlinks from the old xs.h and xs_lib.h to the compat versions inorder to not break 3rd party software for the 4.2 release. We will ship these for the 4.2 release only. If distros wish to omit these from their packaging then that's fine, although they should probably check their reverse-build depends etc. We will remove these links early in 4.3.

qemu-xs-compat.patch fixes trad qemu, upstream is fixed when built in our build system by this patch and is fixed when built independently by the symlinks, for now. We can convert these properly at our leisure before 4.3

(NB: git style patch, so the rename is represented in the minimised manner)

8<------------------------------------

# HG changeset patch
# User Ian Campbell <[email protected]> # Date 1336754841 -3600
# Node ID b61d5b46f3a91f7cc9064186e10acacfab10b184 # Parent 15ed8f45c4e57a1e206af020e0ff17b792108e99
xenstore: rename public xenstore headers

The xenstore header xs.h is producing conflicts with other software[1].

xs is a too short identifier and does not matche the library. Renaming the headers to xenstore.h and xenstore_lib.h is the easiest way to make them easy recognizable and prevent furthe problems.

[1]: http://bugs.debian.org/668550

Makefile +2 -0
@@ -241,6 +241,8 @@ uninstall:
 	rm -rf $(D)$(BINDIR)/xenpvnetboot $(D)$(BINDIR)/qemu-*-xen
 	rm -rf $(D)$(INCLUDEDIR)/xenctrl* $(D)$(INCLUDEDIR)/xenguest.h
 	rm -rf $(D)$(INCLUDEDIR)/xs_lib.h $(D)$(INCLUDEDIR)/xs.h
+	rm -rf $(D)$(INCLUDEDIR)/xenstore-compat/xs_lib.h $(D)$(INCLUDEDIR)/xensotre-compat/xs.h
+	rm -rf $(D)$(INCLUDEDIR)/xenstore_lib.h $(D)$(INCLUDEDIR)/xenstore.h
 	rm -rf $(D)$(INCLUDEDIR)/xen
 	rm -rf $(D)$(INCLUDEDIR)/_libxl* $(D)$(INCLUDEDIR)/libxl*
 	rm -rf $(D)$(INCLUDEDIR)/xenstat.h $(D)$(INCLUDEDIR)/xentoollog.h
extras/mini-os/lib/sys.c +1 -1
@@ -28,7 +28,7 @@
 #include <blkfront.h>
 #include <fbfront.h>
 #include <xenbus.h>
-#include <xs.h>
+#include <xenstore.h>
 
 #include <sys/types.h>
 #include <sys/unistd.h>
extras/mini-os/lib/xs.c +1 -1
@@ -9,7 +9,7 @@
 #ifdef HAVE_LIBC
 #include <os.h>
 #include <lib.h>
-#include <xs.h>
+#include <xenstore.h>
 #include <xenbus.h>
 #include <stdlib.h>
 #include <unistd.h>
tools/Makefile +2 -1
@@ -150,7 +150,8 @@ subdir-all-qemu-xen-dir subdir-install-q
 		--source-path=$$source \
 		--extra-cflags="-I$(XEN_ROOT)/tools/include \
 		-I$(XEN_ROOT)/tools/libxc \
-		-I$(XEN_ROOT)/tools/xenstore" \
+		-I$(XEN_ROOT)/tools/xenstore \
+		-I$(XEN_ROOT)/tools/xenstore/compat" \
 		--extra-ldflags="-L$(XEN_ROOT)/tools/libxc \
 		-L$(XEN_ROOT)/tools/xenstore" \
 		--bindir=$(LIBEXEC) \
tools/blktap/drivers/blktapctrl.c +1 -1
@@ -47,7 +47,7 @@
 #include <sys/ioctl.h>
 #include <string.h>
 #include <unistd.h>
-#include <xs.h>
+#include <xenstore.h>
 #include <sys/time.h>
 #include <syslog.h>
 #ifdef MEMSHR
tools/blktap/lib/blktaplib.h +1 -1
@@ -38,7 +38,7 @@
 #include <xen/xen.h>
 #include <xen/io/blkif.h>
 #include <xen/io/ring.h>
-#include <xs.h>
+#include <xenstore.h>
 #include <sys/types.h>
 #include <unistd.h>
 
tools/blktap/lib/xenbus.c +1 -1
@@ -41,7 +41,7 @@
 #include <err.h>
 #include <stdarg.h>
 #include <errno.h>
-#include <xs.h>
+#include <xenstore.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
tools/blktap/lib/xs_api.c +1 -1
@@ -38,7 +38,7 @@
 #include <err.h>
 #include <stdarg.h>
 #include <errno.h>
-#include <xs.h>
+#include <xenstore.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
tools/console/client/main.c +1 -1
@@ -39,7 +39,7 @@
 #include <sys/stropts.h>
 #endif
 
-#include "xs.h"
+#include <xenstore.h>
 #include "xenctrl.h"
 
 #define ESCAPE_CHARACTER 0x1d
tools/console/daemon/io.c +1 -1
@@ -22,7 +22,7 @@
 
 #include "utils.h"
 #include "io.h"
-#include <xs.h>
+#include <xenstore.h>
 #include <xen/io/console.h>
 
 #include <stdlib.h>
tools/console/daemon/utils.h +1 -1
@@ -26,7 +26,7 @@
 #include <stdio.h>
 #include <xenctrl.h>
 
-#include "xs.h"
+#include <xenstore.h>
 
 void daemonize(const char *pidfile);
 bool xen_setup(void);
tools/libvchan/init.c +1 -1
@@ -40,7 +40,7 @@
 #include <unistd.h>
 #include <fcntl.h>
 
-#include <xs.h>
+#include <xenstore.h>
 #include <xen/sys/evtchn.h>
 #include <xen/sys/gntalloc.h>
 #include <xen/sys/gntdev.h>
tools/libxl/libxl_internal.h +1 -1
@@ -43,7 +43,7 @@
 #include <sys/types.h>
 #include <sys/wait.h>
 
-#include <xs.h>
+#include <xenstore.h>
 #include <xenctrl.h>
 
 #include "xentoollog.h"
tools/misc/xen-lowmemd.c +1 -1
@@ -5,7 +5,7 @@
 
 #include <stdio.h>
 #include <xenctrl.h>
-#include <xs.h>
+#include <xenstore.h>
 #include <stdlib.h>
 #include <string.h>
 
tools/python/xen/lowlevel/checkpoint/checkpoint.c +1 -1
@@ -2,7 +2,7 @@
 
 #include <Python.h>
 
-#include <xs.h>
+#include <xenstore.h>
 #include <xenctrl.h>
 
 #include "checkpoint.h"
tools/python/xen/lowlevel/checkpoint/checkpoint.h +1 -1
@@ -8,7 +8,7 @@
 #include <time.h>
 
 #include <xenguest.h>
-#include <xs.h>
+#include <xenstore.h>
 
 typedef enum {
     dt_unknown,
tools/python/xen/lowlevel/checkpoint/libcheckpoint.c +1 -1
@@ -11,7 +11,7 @@
 
 #include <xenctrl.h>
 #include <xenguest.h>
-#include <xs.h>
+#include <xenstore.h>
 
 #include "checkpoint.h"
 
tools/python/xen/lowlevel/xs/xs.c +1 -1
@@ -30,7 +30,7 @@
 #include <fcntl.h>
 #include <errno.h>
 
-#include "xs.h"
+#include <xenstore.h>
 
 /** @file
  * Python interface to the Xen Store Daemon (xs).
tools/tests/mce-test/tools/xen-mceinj.c +1 -1
@@ -38,7 +38,7 @@
 #include <sys/time.h>
 #include <xen/arch-x86/xen-mca.h>
 #include <xg_save_restore.h>
-#include <xs.h>
+#include <xenstore.h>
 
 #define MCi_type_CTL        0x0
 #define MCi_type_STATUS     0x1
tools/xcutils/xc_save.c +1 -1
@@ -19,7 +19,7 @@
 #include <fcntl.h>
 #include <err.h>
 
-#include <xs.h>
+#include <xenstore.h>
 #include <xenctrl.h>
 #include <xenguest.h>
 
tools/xenbackendd/xenbackendd.c +1 -1
@@ -28,7 +28,7 @@
 #include <string.h>
 #include <syslog.h>
 
-#include <xs.h>
+#include <xenstore.h>
 
 #define DEVTYPE_UNKNOWN 0
 #define DEVTYPE_VIF 1
tools/xenpaging/xenpaging.c +1 -1
@@ -29,7 +29,7 @@
 #include <unistd.h>
 #include <poll.h>
 #include <xc_private.h>
-#include <xs.h>
+#include <xenstore.h>
 #include <getopt.h>
 
 #include "xc_bitops.h"
tools/xenpmd/xenpmd.c +1 -1
@@ -40,7 +40,7 @@
 #include <dirent.h>
 #include <unistd.h>
 #include <sys/stat.h>
-#include <xs.h>
+#include <xenstore.h>
 
 /* #define RUN_STANDALONE */
 #define RUN_IN_SIMULATE_MODE
tools/xenstat/libxenstat/src/xenstat_priv.h +1 -1
@@ -24,7 +24,7 @@
 #define XENSTAT_PRIV_H
 
 #include <sys/types.h>
-#include <xs.h>
+#include <xenstore.h>
 #include "xenstat.h"
 
 #include "xenctrl.h"
tools/xenstore/COPYING +2 -2
@@ -1,6 +1,6 @@
 This license (LGPL) applies to the xenstore library which interfaces
-with the xenstore daemon (as stated in xs.c, xs.h, xs_lib.c and
-xs_lib.h).  The remaining files in the directory are licensed as
+with the xenstore daemon (as stated in xs.c, xenstore.h, xs_lib.c and
+xenstore_lib.h).  The remaining files in the directory are licensed as
 stated in the comments (as of this writing, GPL, see ../../COPYING).
 
 
tools/xenstore/Makefile +7 -2
@@ -109,6 +109,7 @@ install: all
 	$(INSTALL_DIR) $(DESTDIR)$(BINDIR)
 	$(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
 	$(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)
+	$(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xenstore-compat
 	$(INSTALL_DIR) $(DESTDIR)/var/run/xenstored
 	$(INSTALL_DIR) $(DESTDIR)/var/lib/xenstored
 	$(INSTALL_PROG) xenstored $(DESTDIR)$(SBINDIR)
@@ -122,8 +123,12 @@ install: all
 	ln -sf libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenstore.so.$(MAJOR)
 	ln -sf libxenstore.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenstore.so
 	$(INSTALL_DATA) libxenstore.a $(DESTDIR)$(LIBDIR)
-	$(INSTALL_DATA) xs.h $(DESTDIR)$(INCLUDEDIR)
-	$(INSTALL_DATA) xs_lib.h $(DESTDIR)$(INCLUDEDIR)
+	$(INSTALL_DATA) xenstore.h $(DESTDIR)$(INCLUDEDIR)
+	$(INSTALL_DATA) xenstore_lib.h $(DESTDIR)$(INCLUDEDIR)
+	$(INSTALL_DATA) compat/xs.h $(DESTDIR)$(INCLUDEDIR)/xenstore-compat/xs.h
+	$(INSTALL_DATA) compat/xs_lib.h $(DESTDIR)$(INCLUDEDIR)/xenstore-compat/xs_lib.h
+	ln -sf xenstore-compat/xs.h  $(DESTDIR)$(INCLUDEDIR)/xs.h
+	ln -sf xenstore-compat/xs_lib.h $(DESTDIR)$(INCLUDEDIR)/xs_lib.h
 
 -include $(DEPS)
 
tools/xenstore/compat/xs.h new file +5 -0
new file mode 100644
@@ -0,0 +1,5 @@
+#ifndef XENSTORE_COMPAT_H
+#define XENSTORE_COMPAT_H
+#warning xs.h is deprecated use xenstore.h instead
+#include <xenstore.h>
+#endif
tools/xenstore/compat/xs_lib.h new file +5 -0
new file mode 100644
@@ -0,0 +1,5 @@
+#ifndef XENSTORE_LIB_COMPAT_H
+#define XENSTORE_LIB_COMPAT_H
+#warning xs_lib.h is deprecated use xenstore_lib.h instead
+#include <xenstore_lib.h>
+#endif
tools/xenstore/init-xenstore-domain.c +1 -1
@@ -7,7 +7,7 @@
 #include <sys/mman.h>
 #include <xenctrl.h>
 #include <xc_dom.h>
-#include <xs.h>
+#include <xenstore.h>
 #include <xen/sys/xenbus_dev.h>
 
 static uint32_t domid = -1;
tools/xenstore/xenstore.h renamed from tools/xenstore/xs.h +4 -4
rename from tools/xenstore/xs.h
rename to tools/xenstore/xenstore.h
@@ -17,10 +17,10 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
 
-#ifndef _XS_H
-#define _XS_H
+#ifndef XENSTORE_H
+#define XENSTORE_H
 
-#include <xs_lib.h>
+#include <xenstore_lib.h>
 
 #define XBT_NULL 0
 
@@ -223,7 +223,7 @@ char *xs_debug_command(struct xs_handle 
 		       void *data, unsigned int len);
 
 int xs_suspend_evtchn_port(int domid);
-#endif /* _XS_H */
+#endif /* XENSTORE_H */
 
 /*
  * Local variables:
tools/xenstore/xenstore_client.c +1 -1
@@ -18,7 +18,7 @@
 #include <string.h>
 #include <termios.h>
 #include <unistd.h>
-#include <xs.h>
+#include <xenstore.h>
 
 #include <sys/ioctl.h>
 
tools/xenstore/xenstore_control.c +1 -1
@@ -2,7 +2,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "xs.h"
+#include "xenstore.h"
 
 
 int main(int argc, char **argv)
tools/xenstore/xenstore_lib.h renamed from tools/xenstore/xs_lib.h +3 -3
rename from tools/xenstore/xs_lib.h
rename to tools/xenstore/xenstore_lib.h
@@ -17,8 +17,8 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
 
-#ifndef _XS_LIB_H
-#define _XS_LIB_H
+#ifndef XENSTORE_LIB_H
+#define XENSTORE_LIB_H
 
 #include <stdbool.h>
 #include <limits.h>
@@ -82,4 +82,4 @@ char *sanitise_value(struct expanding_bu
 /* *out_len_r on entry is ignored; out must be at least strlen(in)+1 bytes. */
 void unsanitise_value(char *out, unsigned *out_len_r, const char *in);
 
-#endif /* _XS_LIB_H */
+#endif /* XENSTORE_LIB_H */
tools/xenstore/xenstored_core.c +1 -1
@@ -44,7 +44,7 @@
 #include "utils.h"
 #include "list.h"
 #include "talloc.h"
-#include "xs_lib.h"
+#include "xenstore_lib.h"
 #include "xenstored_core.h"
 #include "xenstored_watch.h"
 #include "xenstored_transaction.h"
tools/xenstore/xenstored_core.h +1 -1
@@ -27,7 +27,7 @@
 #include <stdbool.h>
 #include <stdint.h>
 #include <errno.h>
-#include "xs_lib.h"
+#include "xenstore_lib.h"
 #include "list.h"
 #include "tdb.h"
 
tools/xenstore/xenstored_transaction.c +1 -1
@@ -33,7 +33,7 @@
 #include "xenstored_transaction.h"
 #include "xenstored_watch.h"
 #include "xenstored_domain.h"
-#include "xs_lib.h"
+#include "xenstore_lib.h"
 #include "utils.h"
 
 struct changed_node
tools/xenstore/xenstored_watch.c +1 -1
@@ -27,7 +27,7 @@
 #include "talloc.h"
 #include "list.h"
 #include "xenstored_watch.h"
-#include "xs_lib.h"
+#include "xenstore_lib.h"
 #include "utils.h"
 #include "xenstored_domain.h"
 
tools/xenstore/xs.c +1 -1
@@ -32,7 +32,7 @@
 #include <signal.h>
 #include <stdint.h>
 #include <errno.h>
-#include "xs.h"
+#include "xenstore.h"
 #include "list.h"
 #include "utils.h"
 
tools/xenstore/xs_lib.c +1 -1
@@ -23,7 +23,7 @@
 #include <stdlib.h>
 #include <errno.h>
 #include <assert.h>
-#include "xs_lib.h"
+#include "xenstore_lib.h"
 
 /* Common routines for the Xen store daemon and client library. */
 
tools/xenstore/xs_tdb_dump.c +1 -1
@@ -5,7 +5,7 @@
 #include <stdio.h>
 #include <stdarg.h>
 #include <string.h>
-#include "xs_lib.h"
+#include "xenstore_lib.h"
 #include "tdb.h"
 #include "talloc.h"
 #include "utils.h"
Makefile +1 -0
index 37c7066..a43ca67 100644
@@ -49,6 +49,7 @@ recurse-all: $(SUBDIR_RULES)
 CPPFLAGS += -I$(XEN_ROOT)/tools/libxc
 CPPFLAGS += -I$(XEN_ROOT)/tools/blktap/lib
 CPPFLAGS += -I$(XEN_ROOT)/tools/xenstore
+CPPFLAGS += -I$(XEN_ROOT)/tools/xenstore/compat
 CPPFLAGS += -I$(XEN_ROOT)/tools/include
 
 tapdisk-ioemu: tapdisk-ioemu.c cutils.c block.c block-raw.c block-cow.c block-qcow.c aes.c block-vmdk.c block-cloop.c block-dmg.c block-bochs.c block-vpc.c block-vvfat.c block-qcow2.c hw/xen_blktap.c osdep.c
xen-hooks.mak +1 -0
index b55f45b..8e9cadf 100644
@@ -1,5 +1,6 @@
 CPPFLAGS+= -I$(XEN_ROOT)/tools/libxc
 CPPFLAGS+= -I$(XEN_ROOT)/tools/xenstore
+CPPFLAGS+= -I$(XEN_ROOT)/tools/xenstore/compat
 CPPFLAGS+= -I$(XEN_ROOT)/tools/include
 
 SSE2 := $(call cc-option,-msse2,)

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#4 lore raw

tools/xenstore/compat/xs.h

Quoted 2 lines · Ian Campbell
tools/xenstore/compat/xs.h new file +0 -0

Why not in tools/xenstore?

tools/xenstore/compat/xs.h line 2

Quoted 2 lines
tools/xenstore/compat/xs.h new file +2 -0
+#ifndef XENSTORE_COMPAT_H
+#define XENSTORE_COMPAT_H

Don't.

Bastian

Signature · 1 line
Well, Jim, I'm not much of an actor either.
#5 lore raw

Bastian Blank writes ("Re: [Xen-devel] [PATCH] Rename public xenstore headers"):

Quoted 5 lines · Ian Campbell

tools/xenstore/compat/xs.h

Quoted 2 lines
tools/xenstore/compat/xs.h new file +0 -0

Why not in tools/xenstore?

Good question. One answer is that this prevents in-tree users from accidentally using the old header - but do we really care about that ?

Quoted 4 lines

tools/xenstore/compat/xs.h line 2

Quoted 2 lines
tools/xenstore/compat/xs.h new file +2 -0
+#ifndef XENSTORE_COMPAT_H
+#define XENSTORE_COMPAT_H

Don't.

I guess you mean that we want a warning each time <xs.h> is #included, rather than only the first time. In which case I agree.

Ian: I tried your patch but it didn't seem to apply to my current tip.

Ian.

#6 lore raw
Quoted 9 lines · Ian Jackson

Bastian Blank writes ("Re: [Xen-devel] [PATCH] Rename public xenstore headers"):

Quoted 5 lines · Ian Campbell

tools/xenstore/compat/xs.h

Quoted 2 lines
tools/xenstore/compat/xs.h new file +0 -0

Why not in tools/xenstore?

Good question. One answer is that this prevents in-tree users from accidentally using the old header - but do we really care about that ?

I thought it was worth doing it -- the cost is minimal.

Quoted 8 lines
Quoted 5 lines

tools/xenstore/compat/xs.h line 2

Quoted 3 lines
tools/xenstore/compat/xs.h new file +2 -0
+#ifndef XENSTORE_COMPAT_H
+#define XENSTORE_COMPAT_H

Don't.

I guess you mean that we want a warning each time <xs.h> is #included, rather than only the first time. In which case I agree.

I'm not convinced that getting multiple warnings+backtraces for each .c file which includes xs.h is any more useful than just getting one, but OK.

Quoted 1 line

Ian: I tried your patch but it didn't seem to apply to my current tip.

You've been shovelling stuff in all day ;-) I'll refresh/resend on Monday.

You did take note of the "git-ness" of the patch though? -- ISTR your tools had trouble with this format last time.

Ian.

#7 lore raw
Quoted 3 lines · Ian Campbell

You've been shovelling stuff in all day ;-) I'll refresh/resend on Monday.

It applied for me this morning so I suspect you hadn't noticed this:

Quoted 2 lines

You did take note of the "git-ness" of the patch though? -- ISTR your tools had trouble with this format last time.

Here it is a gain in non-git format and with the header guards removed from the compat headers as requested. I stuck with the compat subdir.

qemu-xs-compat.patch is again attached.

8<--------------------------------

# HG changeset patch
# User Ian Campbell <[email protected]> # Date 1336984299 -3600
# Node ID e71b19157a4788d8a56bb578f9ddc01cb92c331f # Parent 54fcdee8740f86c9d3ca4f8bf5b780d292cd11f7
xenstore: rename public xenstore headers

The xenstore header xs.h is producing conflicts with other software[1].

xs is a too short identifier and does not matche the library. Renaming the headers to xenstore.h and xenstore_lib.h is the easiest way to make them easy recognizable and prevent furthe problems.

[1]: http://bugs.debian.org/668550

Makefile +2 -0
diff -r 54fcdee8740f -r e71b19157a47 Makefile
@@ -241,6 +241,8 @@ uninstall:
 	rm -rf $(D)$(BINDIR)/xenpvnetboot $(D)$(BINDIR)/qemu-*-xen
 	rm -rf $(D)$(INCLUDEDIR)/xenctrl* $(D)$(INCLUDEDIR)/xenguest.h
 	rm -rf $(D)$(INCLUDEDIR)/xs_lib.h $(D)$(INCLUDEDIR)/xs.h
+	rm -rf $(D)$(INCLUDEDIR)/xenstore-compat/xs_lib.h $(D)$(INCLUDEDIR)/xensotre-compat/xs.h
+	rm -rf $(D)$(INCLUDEDIR)/xenstore_lib.h $(D)$(INCLUDEDIR)/xenstore.h
 	rm -rf $(D)$(INCLUDEDIR)/xen
 	rm -rf $(D)$(INCLUDEDIR)/_libxl* $(D)$(INCLUDEDIR)/libxl*
 	rm -rf $(D)$(INCLUDEDIR)/xenstat.h $(D)$(INCLUDEDIR)/xentoollog.h
extras/mini-os/lib/sys.c +1 -1
diff -r 54fcdee8740f -r e71b19157a47 extras/mini-os/lib/sys.c
@@ -28,7 +28,7 @@
 #include <blkfront.h>
 #include <fbfront.h>
 #include <xenbus.h>
-#include <xs.h>
+#include <xenstore.h>
 
 #include <sys/types.h>
 #include <sys/unistd.h>
extras/mini-os/lib/xs.c +1 -1
diff -r 54fcdee8740f -r e71b19157a47 extras/mini-os/lib/xs.c
@@ -9,7 +9,7 @@
 #ifdef HAVE_LIBC
 #include <os.h>
 #include <lib.h>
-#include <xs.h>
+#include <xenstore.h>
 #include <xenbus.h>
 #include <stdlib.h>
 #include <unistd.h>
tools/Makefile +2 -1
diff -r 54fcdee8740f -r e71b19157a47 tools/Makefile
@@ -150,7 +150,8 @@ subdir-all-qemu-xen-dir subdir-install-q
 		--source-path=$$source \
 		--extra-cflags="-I$(XEN_ROOT)/tools/include \
 		-I$(XEN_ROOT)/tools/libxc \
-		-I$(XEN_ROOT)/tools/xenstore" \
+		-I$(XEN_ROOT)/tools/xenstore \
+		-I$(XEN_ROOT)/tools/xenstore/compat" \
 		--extra-ldflags="-L$(XEN_ROOT)/tools/libxc \
 		-L$(XEN_ROOT)/tools/xenstore" \
 		--bindir=$(LIBEXEC) \
tools/blktap/drivers/blktapctrl.c +1 -1
diff -r 54fcdee8740f -r e71b19157a47 tools/blktap/drivers/blktapctrl.c
@@ -47,7 +47,7 @@
 #include <sys/ioctl.h>
 #include <string.h>
 #include <unistd.h>
-#include <xs.h>
+#include <xenstore.h>
 #include <sys/time.h>
 #include <syslog.h>
 #ifdef MEMSHR
tools/blktap/lib/blktaplib.h +1 -1
diff -r 54fcdee8740f -r e71b19157a47 tools/blktap/lib/blktaplib.h
@@ -38,7 +38,7 @@
 #include <xen/xen.h>
 #include <xen/io/blkif.h>
 #include <xen/io/ring.h>
-#include <xs.h>
+#include <xenstore.h>
 #include <sys/types.h>
 #include <unistd.h>
 
tools/blktap/lib/xenbus.c +1 -1
diff -r 54fcdee8740f -r e71b19157a47 tools/blktap/lib/xenbus.c
@@ -41,7 +41,7 @@
 #include <err.h>
 #include <stdarg.h>
 #include <errno.h>
-#include <xs.h>
+#include <xenstore.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
tools/blktap/lib/xs_api.c +1 -1
diff -r 54fcdee8740f -r e71b19157a47 tools/blktap/lib/xs_api.c
@@ -38,7 +38,7 @@
 #include <err.h>
 #include <stdarg.h>
 #include <errno.h>
-#include <xs.h>
+#include <xenstore.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
tools/console/client/main.c +1 -1
diff -r 54fcdee8740f -r e71b19157a47 tools/console/client/main.c
@@ -39,7 +39,7 @@
 #include <sys/stropts.h>
 #endif
 
-#include "xs.h"
+#include <xenstore.h>
 #include "xenctrl.h"
 
 #define ESCAPE_CHARACTER 0x1d
tools/console/daemon/io.c +1 -1
diff -r 54fcdee8740f -r e71b19157a47 tools/console/daemon/io.c
@@ -22,7 +22,7 @@
 
 #include "utils.h"
 #include "io.h"
-#include <xs.h>
+#include <xenstore.h>
 #include <xen/io/console.h>
 
 #include <stdlib.h>
tools/console/daemon/utils.h +1 -1
diff -r 54fcdee8740f -r e71b19157a47 tools/console/daemon/utils.h
@@ -26,7 +26,7 @@
 #include <stdio.h>
 #include <xenctrl.h>
 
-#include "xs.h"
+#include <xenstore.h>
 
 void daemonize(const char *pidfile);
 bool xen_setup(void);
tools/libvchan/init.c +1 -1
diff -r 54fcdee8740f -r e71b19157a47 tools/libvchan/init.c
@@ -40,7 +40,7 @@
 #include <unistd.h>
 #include <fcntl.h>
 
-#include <xs.h>
+#include <xenstore.h>
 #include <xen/sys/evtchn.h>
 #include <xen/sys/gntalloc.h>
 #include <xen/sys/gntdev.h>
tools/libxl/libxl_internal.h +1 -1
diff -r 54fcdee8740f -r e71b19157a47 tools/libxl/libxl_internal.h
@@ -44,7 +44,7 @@
 #include <sys/wait.h>
 #include <sys/socket.h>
 
-#include <xs.h>
+#include <xenstore.h>
 #include <xenctrl.h>
 
 #include "xentoollog.h"
tools/misc/xen-lowmemd.c +1 -1
diff -r 54fcdee8740f -r e71b19157a47 tools/misc/xen-lowmemd.c
@@ -5,7 +5,7 @@
 
 #include <stdio.h>
 #include <xenctrl.h>
-#include <xs.h>
+#include <xenstore.h>
 #include <stdlib.h>
 #include <string.h>
 
tools/python/xen/lowlevel/checkpoint/checkpoint.c +1 -1
diff -r 54fcdee8740f -r e71b19157a47 tools/python/xen/lowlevel/checkpoint/checkpoint.c
@@ -2,7 +2,7 @@
 
 #include <Python.h>
 
-#include <xs.h>
+#include <xenstore.h>
 #include <xenctrl.h>
 
 #include "checkpoint.h"
tools/python/xen/lowlevel/checkpoint/checkpoint.h +1 -1
diff -r 54fcdee8740f -r e71b19157a47 tools/python/xen/lowlevel/checkpoint/checkpoint.h
@@ -8,7 +8,7 @@
 #include <time.h>
 
 #include <xenguest.h>
-#include <xs.h>
+#include <xenstore.h>
 
 typedef enum {
     dt_unknown,
tools/python/xen/lowlevel/checkpoint/libcheckpoint.c +1 -1
diff -r 54fcdee8740f -r e71b19157a47 tools/python/xen/lowlevel/checkpoint/libcheckpoint.c
@@ -11,7 +11,7 @@
 
 #include <xenctrl.h>
 #include <xenguest.h>
-#include <xs.h>
+#include <xenstore.h>
 
 #include "checkpoint.h"
 
tools/python/xen/lowlevel/xs/xs.c +1 -1
diff -r 54fcdee8740f -r e71b19157a47 tools/python/xen/lowlevel/xs/xs.c
@@ -30,7 +30,7 @@
 #include <fcntl.h>
 #include <errno.h>
 
-#include "xs.h"
+#include <xenstore.h>
 
 /** @file
  * Python interface to the Xen Store Daemon (xs).
tools/tests/mce-test/tools/xen-mceinj.c +1 -1
diff -r 54fcdee8740f -r e71b19157a47 tools/tests/mce-test/tools/xen-mceinj.c
@@ -38,7 +38,7 @@
 #include <sys/time.h>
 #include <xen/arch-x86/xen-mca.h>
 #include <xg_save_restore.h>
-#include <xs.h>
+#include <xenstore.h>
 
 #define MCi_type_CTL        0x0
 #define MCi_type_STATUS     0x1
tools/xcutils/xc_save.c +1 -1
diff -r 54fcdee8740f -r e71b19157a47 tools/xcutils/xc_save.c
@@ -19,7 +19,7 @@
 #include <fcntl.h>
 #include <err.h>
 
-#include <xs.h>
+#include <xenstore.h>
 #include <xenctrl.h>
 #include <xenguest.h>
 
tools/xenbackendd/xenbackendd.c +1 -1
diff -r 54fcdee8740f -r e71b19157a47 tools/xenbackendd/xenbackendd.c
@@ -28,7 +28,7 @@
 #include <string.h>
 #include <syslog.h>
 
-#include <xs.h>
+#include <xenstore.h>
 
 #define DEVTYPE_UNKNOWN 0
 #define DEVTYPE_VIF 1
tools/xenpaging/xenpaging.c +1 -1
diff -r 54fcdee8740f -r e71b19157a47 tools/xenpaging/xenpaging.c
@@ -29,7 +29,7 @@
 #include <unistd.h>
 #include <poll.h>
 #include <xc_private.h>
-#include <xs.h>
+#include <xenstore.h>
 #include <getopt.h>
 
 #include "xc_bitops.h"
tools/xenpmd/xenpmd.c +1 -1
diff -r 54fcdee8740f -r e71b19157a47 tools/xenpmd/xenpmd.c
@@ -40,7 +40,7 @@
 #include <dirent.h>
 #include <unistd.h>
 #include <sys/stat.h>
-#include <xs.h>
+#include <xenstore.h>
 
 /* #define RUN_STANDALONE */
 #define RUN_IN_SIMULATE_MODE
tools/xenstat/libxenstat/src/xenstat_priv.h +1 -1
diff -r 54fcdee8740f -r e71b19157a47 tools/xenstat/libxenstat/src/xenstat_priv.h
@@ -24,7 +24,7 @@
 #define XENSTAT_PRIV_H
 
 #include <sys/types.h>
-#include <xs.h>
+#include <xenstore.h>
 #include "xenstat.h"
 
 #include "xenctrl.h"
tools/xenstore/COPYING +2 -2
diff -r 54fcdee8740f -r e71b19157a47 tools/xenstore/COPYING
@@ -1,6 +1,6 @@
 This license (LGPL) applies to the xenstore library which interfaces
-with the xenstore daemon (as stated in xs.c, xs.h, xs_lib.c and
-xs_lib.h).  The remaining files in the directory are licensed as
+with the xenstore daemon (as stated in xs.c, xenstore.h, xs_lib.c and
+xenstore_lib.h).  The remaining files in the directory are licensed as
 stated in the comments (as of this writing, GPL, see ../../COPYING).
 
 
tools/xenstore/Makefile +7 -2
diff -r 54fcdee8740f -r e71b19157a47 tools/xenstore/Makefile
@@ -109,6 +109,7 @@ install: all
 	$(INSTALL_DIR) $(DESTDIR)$(BINDIR)
 	$(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
 	$(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)
+	$(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xenstore-compat
 	$(INSTALL_DIR) $(DESTDIR)/var/run/xenstored
 	$(INSTALL_DIR) $(DESTDIR)/var/lib/xenstored
 	$(INSTALL_PROG) xenstored $(DESTDIR)$(SBINDIR)
@@ -122,8 +123,12 @@ install: all
 	ln -sf libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenstore.so.$(MAJOR)
 	ln -sf libxenstore.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenstore.so
 	$(INSTALL_DATA) libxenstore.a $(DESTDIR)$(LIBDIR)
-	$(INSTALL_DATA) xs.h $(DESTDIR)$(INCLUDEDIR)
-	$(INSTALL_DATA) xs_lib.h $(DESTDIR)$(INCLUDEDIR)
+	$(INSTALL_DATA) xenstore.h $(DESTDIR)$(INCLUDEDIR)
+	$(INSTALL_DATA) xenstore_lib.h $(DESTDIR)$(INCLUDEDIR)
+	$(INSTALL_DATA) compat/xs.h $(DESTDIR)$(INCLUDEDIR)/xenstore-compat/xs.h
+	$(INSTALL_DATA) compat/xs_lib.h $(DESTDIR)$(INCLUDEDIR)/xenstore-compat/xs_lib.h
+	ln -sf xenstore-compat/xs.h  $(DESTDIR)$(INCLUDEDIR)/xs.h
+	ln -sf xenstore-compat/xs_lib.h $(DESTDIR)$(INCLUDEDIR)/xs_lib.h
 
 -include $(DEPS)
 
tools/xenstore/compat/xs.h new file +2 -0
diff -r 54fcdee8740f -r e71b19157a47 tools/xenstore/compat/xs.h
@@ -0,0 +1,2 @@
+#warning xs.h is deprecated use xenstore.h instead
+#include <xenstore.h>
tools/xenstore/compat/xs_lib.h new file +2 -0
diff -r 54fcdee8740f -r e71b19157a47 tools/xenstore/compat/xs_lib.h
@@ -0,0 +1,2 @@
+#warning xs_lib.h is deprecated use xenstore_lib.h instead
+#include <xenstore_lib.h>
tools/xenstore/init-xenstore-domain.c +1 -1
diff -r 54fcdee8740f -r e71b19157a47 tools/xenstore/init-xenstore-domain.c
@@ -7,7 +7,7 @@
 #include <sys/mman.h>
 #include <xenctrl.h>
 #include <xc_dom.h>
-#include <xs.h>
+#include <xenstore.h>
 #include <xen/sys/xenbus_dev.h>
 
 static uint32_t domid = -1;
tools/xenstore/xenstore.h new file +236 -0

236 lines not on this page · raw message

tools/xenstore/xenstore_client.c +1 -1
diff -r 54fcdee8740f -r e71b19157a47 tools/xenstore/xenstore_client.c
@@ -18,7 +18,7 @@
 #include <string.h>
 #include <termios.h>
 #include <unistd.h>
-#include <xs.h>
+#include <xenstore.h>
 
 #include <sys/ioctl.h>
 
tools/xenstore/xenstore_control.c +1 -1
diff -r 54fcdee8740f -r e71b19157a47 tools/xenstore/xenstore_control.c
@@ -2,7 +2,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "xs.h"
+#include "xenstore.h"
 
 
 int main(int argc, char **argv)
tools/xenstore/xenstore_lib.h new file +85 -0

85 lines not on this page · raw message

tools/xenstore/xenstored_core.c +1 -1
diff -r 54fcdee8740f -r e71b19157a47 tools/xenstore/xenstored_core.c
@@ -44,7 +44,7 @@
 #include "utils.h"
 #include "list.h"
 #include "talloc.h"
-#include "xs_lib.h"
+#include "xenstore_lib.h"
 #include "xenstored_core.h"
 #include "xenstored_watch.h"
 #include "xenstored_transaction.h"
tools/xenstore/xenstored_core.h +1 -1
diff -r 54fcdee8740f -r e71b19157a47 tools/xenstore/xenstored_core.h
@@ -27,7 +27,7 @@
 #include <stdbool.h>
 #include <stdint.h>
 #include <errno.h>
-#include "xs_lib.h"
+#include "xenstore_lib.h"
 #include "list.h"
 #include "tdb.h"
 
tools/xenstore/xenstored_transaction.c +1 -1
diff -r 54fcdee8740f -r e71b19157a47 tools/xenstore/xenstored_transaction.c
@@ -33,7 +33,7 @@
 #include "xenstored_transaction.h"
 #include "xenstored_watch.h"
 #include "xenstored_domain.h"
-#include "xs_lib.h"
+#include "xenstore_lib.h"
 #include "utils.h"
 
 struct changed_node
tools/xenstore/xenstored_watch.c +1 -1
diff -r 54fcdee8740f -r e71b19157a47 tools/xenstore/xenstored_watch.c
@@ -27,7 +27,7 @@
 #include "talloc.h"
 #include "list.h"
 #include "xenstored_watch.h"
-#include "xs_lib.h"
+#include "xenstore_lib.h"
 #include "utils.h"
 #include "xenstored_domain.h"
 
tools/xenstore/xs.c +1 -1
diff -r 54fcdee8740f -r e71b19157a47 tools/xenstore/xs.c
@@ -32,7 +32,7 @@
 #include <signal.h>
 #include <stdint.h>
 #include <errno.h>
-#include "xs.h"
+#include "xenstore.h"
 #include "list.h"
 #include "utils.h"
 
tools/xenstore/xs.h deleted +0 -236

236 lines not on this page · raw message

tools/xenstore/xs_lib.c +1 -1
diff -r 54fcdee8740f -r e71b19157a47 tools/xenstore/xs_lib.c
@@ -23,7 +23,7 @@
 #include <stdlib.h>
 #include <errno.h>
 #include <assert.h>
-#include "xs_lib.h"
+#include "xenstore_lib.h"
 
 /* Common routines for the Xen store daemon and client library. */
 
tools/xenstore/xs_lib.h deleted +0 -85

85 lines not on this page · raw message

tools/xenstore/xs_tdb_dump.c +1 -1
diff -r 54fcdee8740f -r e71b19157a47 tools/xenstore/xs_tdb_dump.c
@@ -5,7 +5,7 @@
 #include <stdio.h>
 #include <stdarg.h>
 #include <string.h>
-#include "xs_lib.h"
+#include "xenstore_lib.h"
 #include "tdb.h"
 #include "talloc.h"
 #include "utils.h"

qemu-xen-traditional: use compat xenstore headers.

Pending a transition to the new names

Makefile +1 -0
index 37c7066..a43ca67 100644
@@ -49,6 +49,7 @@ recurse-all: $(SUBDIR_RULES)
 CPPFLAGS += -I$(XEN_ROOT)/tools/libxc
 CPPFLAGS += -I$(XEN_ROOT)/tools/blktap/lib
 CPPFLAGS += -I$(XEN_ROOT)/tools/xenstore
+CPPFLAGS += -I$(XEN_ROOT)/tools/xenstore/compat
 CPPFLAGS += -I$(XEN_ROOT)/tools/include
 
 tapdisk-ioemu: tapdisk-ioemu.c cutils.c block.c block-raw.c block-cow.c block-qcow.c aes.c block-vmdk.c block-cloop.c block-dmg.c block-bochs.c block-vpc.c block-vvfat.c block-qcow2.c hw/xen_blktap.c osdep.c
xen-hooks.mak +1 -0
index b55f45b..8e9cadf 100644
@@ -1,5 +1,6 @@
 CPPFLAGS+= -I$(XEN_ROOT)/tools/libxc
 CPPFLAGS+= -I$(XEN_ROOT)/tools/xenstore
+CPPFLAGS+= -I$(XEN_ROOT)/tools/xenstore/compat
 CPPFLAGS+= -I$(XEN_ROOT)/tools/include
 
 SSE2 := $(call cc-option,-msse2,)

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#8 lore raw

Ian Campbell writes ("Re: [Xen-devel] [PATCH] Rename public xenstore headers"):

Quoted 5 lines

xenstore: rename public xenstore headers

The xenstore header xs.h is producing conflicts with other software[1].

Quoted 8 lines

xs is a too short identifier and does not matche the library. Renaming the headers to xenstore.h and xenstore_lib.h is the easiest way to make them easy recognizable and prevent furthe problems.

[1]: http://bugs.debian.org/668550

I have applied the xen-unstable.hg part of this. For the qemu-xen-traditional part, I felt the number of warnings that result was really rather excessive for one of our own trees.

I have therefore updated qemu-xen-traditional.git (with the patch below) to immediately use the new name, and included a corresponding update to QEMU_TAG in xen-unstable.hg.

People who are working with xen-unstable will find that they have to update their qemu.

Ian.

commit 7bde54662d45b0bbc2ee78c7a8bf2c97c6655445

Author: Ian Jackson <[email protected]>
Date:   Mon May 14 17:05:48 2012 +0100

xenstore: Use <xenstore.h>

<xs.h> is going away.

This change needs to be made in lockstep with xen-unstable.hg, which will be done by a change to the QEMU_TAG in the xen-unstable.hg changeset.

hw/xen_backend.c +1 -1
index 64dc93a..92b3506 100644
@@ -32,7 +32,7 @@
 #include <sys/mman.h>
 #include <sys/signal.h>
 
-#include <xs.h>
+#include <xenstore.h>
 #include <xenctrl.h>
 #include <xen/grant_table.h>
 
hw/xen_common.h +1 -1
index 7562567..a615052 100644
@@ -5,7 +5,7 @@
 #include <inttypes.h>
 
 #include <xenctrl.h>
-#include <xs.h>
+#include <xenstore.h>
 #include <xen/io/xenbus.h>
 
 #include "hw.h"
hw/xen_console.c +1 -1
index 8d14131..80beb31 100644
@@ -29,7 +29,7 @@
 #include <termios.h>
 #include <stdarg.h>
 #include <sys/mman.h>
-#include <xs.h>
+#include <xenstore.h>
 #include <xen/io/console.h>
 #include <xenctrl.h>
 
hw/xen_disk.c +1 -1
index 5db58ac..04a62e2 100644
@@ -33,7 +33,7 @@
 #include <sys/mman.h>
 #include <sys/uio.h>
 
-#include <xs.h>
+#include <xenstore.h>
 #include <xenctrl.h>
 #include <xen/io/xenbus.h>
 
hw/xenfb.c +1 -1
index 96c2a6f..75b2bc2 100644
@@ -37,7 +37,7 @@
 #include <string.h>
 #include <time.h>
 
-#include <xs.h>
+#include <xenstore.h>
 #include <xenctrl.h>
 #include <xen/event_channel.h>
 #include <xen/io/xenbus.h>
xen-config-host.h +1 -1
index 818f25d..647f6be 100644
@@ -17,7 +17,7 @@ extern int domid, domid_backend;
 #include <stdbool.h>
 
 #include "xenctrl.h"
-#include "xs.h"
+#include "xenstore.h"
 #if !defined(CONFIG_STUBDOM) && !defined(__NetBSD__)
 #include "blktaplib.h"
 #endif
#9 lore raw
Quoted 15 lines · Ian Jackson

Ian Campbell writes ("Re: [Xen-devel] [PATCH] Rename public xenstore headers"):

Quoted 5 lines

xenstore: rename public xenstore headers

The xenstore header xs.h is producing conflicts with other software[1].

Quoted 8 lines

xs is a too short identifier and does not matche the library. Renaming the headers to xenstore.h and xenstore_lib.h is the easiest way to make them easy recognizable and prevent furthe problems.

[1]: http://bugs.debian.org/668550

Quoted 7 lines

I have applied the xen-unstable.hg part of this. For the qemu-xen-traditional part, I felt the number of warnings that result was really rather excessive for one of our own trees.

I have therefore updated qemu-xen-traditional.git (with the patch below) to immediately use the new name, and included a corresponding update to QEMU_TAG in xen-unstable.hg.

Looks fine, thanks. I would Ack but assume it's too late.

Quoted 98 lines

People who are working with xen-unstable will find that they have to update their qemu.

Ian.

commit 7bde54662d45b0bbc2ee78c7a8bf2c97c6655445

Author: Ian Jackson <[email protected]>
Date:   Mon May 14 17:05:48 2012 +0100

xenstore: Use <xenstore.h>

<xs.h> is going away.

This change needs to be made in lockstep with xen-unstable.hg, which will be done by a change to the QEMU_TAG in the xen-unstable.hg changeset.

hw/xen_backend.c +1 -1
index 64dc93a..92b3506 100644
@@ -32,7 +32,7 @@
 #include <sys/mman.h>
 #include <sys/signal.h>
 
-#include <xs.h>
+#include <xenstore.h>
 #include <xenctrl.h>
 #include <xen/grant_table.h>
 
hw/xen_common.h +1 -1
index 7562567..a615052 100644
@@ -5,7 +5,7 @@
 #include <inttypes.h>
 
 #include <xenctrl.h>
-#include <xs.h>
+#include <xenstore.h>
 #include <xen/io/xenbus.h>
 
 #include "hw.h"
hw/xen_console.c +1 -1
index 8d14131..80beb31 100644
@@ -29,7 +29,7 @@
 #include <termios.h>
 #include <stdarg.h>
 #include <sys/mman.h>
-#include <xs.h>
+#include <xenstore.h>
 #include <xen/io/console.h>
 #include <xenctrl.h>
 
hw/xen_disk.c +1 -1
index 5db58ac..04a62e2 100644
@@ -33,7 +33,7 @@
 #include <sys/mman.h>
 #include <sys/uio.h>
 
-#include <xs.h>
+#include <xenstore.h>
 #include <xenctrl.h>
 #include <xen/io/xenbus.h>
 
hw/xenfb.c +1 -1
index 96c2a6f..75b2bc2 100644
@@ -37,7 +37,7 @@
 #include <string.h>
 #include <time.h>
 
-#include <xs.h>
+#include <xenstore.h>
 #include <xenctrl.h>
 #include <xen/event_channel.h>
 #include <xen/io/xenbus.h>
xen-config-host.h +1 -1
index 818f25d..647f6be 100644
@@ -17,7 +17,7 @@ extern int domid, domid_backend;
 #include <stdbool.h>
 
 #include "xenctrl.h"
-#include "xs.h"
+#include "xenstore.h"
 #if !defined(CONFIG_STUBDOM) && !defined(__NetBSD__)
 #include "blktaplib.h"
 #endif
#10 lore raw
In reply to Ian Campbell
Quoted 6 lines · Ian Campbell
Quoted 5 lines · Bastian Blank

The xenstore header xs.h is producing conflicts with other software[1].

xs is a too short identifier and does not matche the library. Renaming the headers to xenstore.h and xenstore_lib.h is the easiest way to make them easy recognizable and prevent furthe problems.

Signature · 2 lines
All your people must learn before you can reach for the stars.
		-- Kirk, "The Gamesters of Triskelion", stardate 3259.2