Skip to contentSkip to conversation

put xenstore headers in linux-public

PATCH New Chris Wright 1 participant 1 message Aug 8, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 put xenstore headers in linux-public

Directly including ../tools breaks building in separate object tree, as well as building from mkpatch patch (I believe Rik hit that one). This puts xenstore headers in linux-public.

linux-2.6-xen-sparse/drivers/xen/xenbus/Makefile +0 -4
@@ -4,7 +4,3 @@
 xenbus-objs += xenbus_comms.o
 xenbus-objs += xenbus_xs.o
 xenbus-objs += xenbus_probe.o 
-
-XEN_TOOLS_DIR := "../tools"
-vpath %.h $(XEN_TOOLS_DIR)
-EXTRA_CFLAGS += -I $(XEN_TOOLS_DIR)
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_xs.c +1 -1
diff -r 0229efe8ffe4 linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_xs.c
@@ -30,7 +30,6 @@
 
 #include <linux/errno.h>
 #include <linux/types.h>
-#include "xenstore/xenstored.h"
 #include <linux/uio.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
@@ -39,6 +38,7 @@
 #include <linux/fcntl.h>
 #include <linux/kthread.h>
 #include <asm-xen/xenbus.h>
+#include <asm-xen/linux-public/xenstored.h>
 #include "xenbus_comms.h"
 
 #define streq(a, b) (strcmp((a), (b)) == 0)
linux-2.6-xen-sparse/mkbuildtree +22 -0
diff -r 0229efe8ffe4 linux-2.6-xen-sparse/mkbuildtree
@@ -74,6 +74,25 @@
   )
 }
 
+# relative_lnfiles <target_dir> <target_files>
+# Creates a tree of symlinks in the current working directory that mirror
+# <target_files> in <target_dir>. <target_dir> should be relative to the current
+# working directory. Symlinks in <target_dir> are ignored. Source-control files
+# are ignored.
+relative_lnfiles ()
+{
+  local SYMLINK_DIR REAL_DIR pref i
+  SYMLINK_DIR=$PWD
+  REAL_DIR=$1
+  shift
+  (
+  cd $REAL_DIR
+  for i in "$*"; do
+    ln -sf ${REAL_DIR}/$i ${SYMLINK_DIR}/$i
+  done
+  )
+}
+
 [ "$1" == "" ] && { echo "Syntax: $0 <linux tree to xenify>"; exit 1; }
 
 # Get absolute path to the destination directory
@@ -109,3 +128,6 @@
 cd     ${AD}/include/asm-xen/xen-public
 relative_lndir ../../../${RS}/../xen/include/public
 
+# More header links, specific to shared defn's for xenbus/xenstore
+cd     ${AD}/include/asm-xen/linux-public
+relative_lnfiles ../../../${RS}/../tools/xenstore xenstored.h