debuggers.hg

changeset 22248:0afdfb8b460f

Config.mk et al: introduce XEN_LOCK_DIR

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

[fixed up for conflict in Config.mk -iwj]

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
author Stefano Stabellini <stefano.stabellini@eu.citrix.com>
date Wed Sep 22 17:52:34 2010 +0100 (2010-09-22)
parents 4aac6084fdc5
children afe7d12da941
files Config.mk config/NetBSD.mk config/StdGNU.mk tools/libxl/libxl.h tools/libxl/libxl_paths.c
line diff
     1.1 --- a/Config.mk	Wed Sep 22 17:42:01 2010 +0100
     1.2 +++ b/Config.mk	Wed Sep 22 17:52:34 2010 +0100
     1.3 @@ -130,6 +130,7 @@ define buildmakevars2file-closure
     1.4  	echo "XENFIRMWAREDIR=\"$(XENFIRMWAREDIR)\"" >> $(1).tmp;           \
     1.5  	echo "XEN_CONFIG_DIR=\"$(XEN_CONFIG_DIR)\"" >> $(1).tmp;           \
     1.6  	echo "XEN_SCRIPT_DIR=\"$(XEN_SCRIPT_DIR)\"" >> $(1).tmp;           \
     1.7 +	echo "XEN_LOCK_DIR=\"$(XEN_LOCK_DIR)\"" >> $(1).tmp;               \
     1.8  	if ! cmp $(1).tmp $(1); then mv -f $(1).tmp $(1); fi
     1.9  endef
    1.10  
     2.1 --- a/config/NetBSD.mk	Wed Sep 22 17:42:01 2010 +0100
     2.2 +++ b/config/NetBSD.mk	Wed Sep 22 17:52:34 2010 +0100
     2.3 @@ -7,4 +7,10 @@ LIBLEAFDIR_x86_64 = lib
     2.4  LIBEXEC = $(PREFIX)/libexec
     2.5  PRIVATE_BINDIR = $(BINDIR)
     2.6  
     2.7 +ifeq ($(PREFIX),/usr)
     2.8 +XEN_LOCK_DIR = /var/lib
     2.9 +else
    2.10 +XEN_LOCK_DIR = $(PREFIX)/var/lib
    2.11 +endif
    2.12 +
    2.13  WGET = ftp
     3.1 --- a/config/StdGNU.mk	Wed Sep 22 17:42:01 2010 +0100
     3.2 +++ b/config/StdGNU.mk	Wed Sep 22 17:52:34 2010 +0100
     3.3 @@ -45,8 +45,10 @@ PRIVATE_BINDIR = $(PRIVATE_PREFIX)/bin
     3.4  
     3.5  ifeq ($(PREFIX),/usr)
     3.6  CONFIG_DIR = /etc
     3.7 +XEN_LOCK_DIR = /var/lock
     3.8  else
     3.9  CONFIG_DIR = $(PREFIX)/etc
    3.10 +XEN_LOCK_DIR = $(PREFIX)/var/lock
    3.11  endif
    3.12  
    3.13  SYSCONFIG_DIR = $(CONFIG_DIR)/$(CONFIG_LEAF_DIR)
     4.1 --- a/tools/libxl/libxl.h	Wed Sep 22 17:42:01 2010 +0100
     4.2 +++ b/tools/libxl/libxl.h	Wed Sep 22 17:52:34 2010 +0100
     4.3 @@ -508,6 +508,7 @@ const char *libxl_private_bindir_path(vo
     4.4  const char *libxl_xenfirmwaredir_path(void);
     4.5  const char *libxl_xen_config_dir_path(void);
     4.6  const char *libxl_xen_script_dir_path(void);
     4.7 +const char *libxl_lock_dir_path(void);
     4.8  
     4.9  #endif /* LIBXL_H */
    4.10  
     5.1 --- a/tools/libxl/libxl_paths.c	Wed Sep 22 17:42:01 2010 +0100
     5.2 +++ b/tools/libxl/libxl_paths.c	Wed Sep 22 17:52:34 2010 +0100
     5.3 @@ -60,3 +60,7 @@ const char *libxl_xen_script_dir_path(vo
     5.4      return XEN_SCRIPT_DIR;
     5.5  }
     5.6  
     5.7 +const char *libxl_lock_dir_path(void)
     5.8 +{
     5.9 +    return XEN_LOCK_DIR;
    5.10 +}