WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 7 of 9] introduce XEN_LOCK_DIR

Introduce a OS dependent global variable XEN_LOCK_DIR that points at the
system directory that contains lock files.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>

diff -r 29dbbdc79759 Config.mk
--- a/Config.mk Fri Aug 27 14:17:58 2010 +0100
+++ b/Config.mk Fri Aug 27 14:23:13 2010 +0100
@@ -114,6 +114,7 @@ define buildmakevars2file-closure
        echo "XENFIRMWAREDIR=\"$(XENFIRMWAREDIR)\"" >> $(1);           \
        echo "XEN_CONFIG_DIR=\"$(XEN_CONFIG_DIR)\"" >> $(1);           \
        echo "XEN_SCRIPT_DIR=\"$(XEN_SCRIPT_DIR)\"" >> $(1)
+       echo "XEN_LOCK_DIR=\"$(XEN_LOCK_DIR)\"" >> $(1)
 endef
 
 ifeq ($(debug),y)
diff -r 29dbbdc79759 config/NetBSD.mk
--- a/config/NetBSD.mk  Fri Aug 27 14:17:58 2010 +0100
+++ b/config/NetBSD.mk  Fri Aug 27 14:23:13 2010 +0100
@@ -7,4 +7,10 @@ LIBLEAFDIR_x86_64 = lib
 LIBEXEC = $(PREFIX)/libexec
 PRIVATE_BINDIR = $(BINDIR)
 
+ifeq ($(PREFIX),/usr)
+XEN_LOCK_DIR = /var/lib
+else
+XEN_LOCK_DIR = $(PREFIX)/var/lib
+endif
+
 WGET = ftp
diff -r 29dbbdc79759 config/StdGNU.mk
--- a/config/StdGNU.mk  Fri Aug 27 14:17:58 2010 +0100
+++ b/config/StdGNU.mk  Fri Aug 27 14:23:13 2010 +0100
@@ -45,8 +45,10 @@ PRIVATE_BINDIR = $(PRIVATE_PREFIX)/bin
 
 ifeq ($(PREFIX),/usr)
 CONFIG_DIR = /etc
+XEN_LOCK_DIR = /var/lock
 else
 CONFIG_DIR = $(PREFIX)/etc
+XEN_LOCK_DIR = $(PREFIX)/var/lock
 endif
 
 SYSCONFIG_DIR = $(CONFIG_DIR)/sysconfig
diff -r 29dbbdc79759 tools/libxl/libxl.h
--- a/tools/libxl/libxl.h       Fri Aug 27 14:17:58 2010 +0100
+++ b/tools/libxl/libxl.h       Fri Aug 27 14:23:13 2010 +0100
@@ -495,6 +495,7 @@ const char *libxl_private_bindir_path(vo
 const char *libxl_xenfirmwaredir_path(void);
 const char *libxl_xen_config_dir_path(void);
 const char *libxl_xen_script_dir_path(void);
+const char *libxl_lock_dir_path(void);
 
 #endif /* LIBXL_H */
 
diff -r 29dbbdc79759 tools/libxl/libxl_paths.c
--- a/tools/libxl/libxl_paths.c Fri Aug 27 14:17:58 2010 +0100
+++ b/tools/libxl/libxl_paths.c Fri Aug 27 14:23:13 2010 +0100
@@ -60,3 +60,7 @@ const char *libxl_xen_script_dir_path(vo
     return XEN_SCRIPT_DIR;
 }
 
+const char *libxl_lock_dir_path(void)
+{
+    return XEN_LOCK_DIR;
+}

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel