ia64/xen-unstable

changeset 15343:33cc64dcaead

[IA64] Create NVRAM save directory

If you use RPM to install XEN, the directory(/usr/lib/xen/boot)
will be removed when you un-install the RPM. This patch create
that directory before NVRAM file creating.

Signed-off-by: Zhang Xin <xing.z.zhang@intel.com>
author Alex Williamson <alex.williamson@hp.com>
date Fri Jun 15 09:25:09 2007 -0600 (2007-06-15)
parents 1623f5f5094f
children fd0103b55504
files tools/libxc/ia64/xc_ia64_hvm_build.c
line diff
     1.1 --- a/tools/libxc/ia64/xc_ia64_hvm_build.c	Thu Jun 14 15:32:22 2007 -0600
     1.2 +++ b/tools/libxc/ia64/xc_ia64_hvm_build.c	Fri Jun 15 09:25:09 2007 -0600
     1.3 @@ -735,6 +735,7 @@ int xc_ia64_save_to_nvram(int xc_handle,
     1.4      return 0;
     1.5  }
     1.6  
     1.7 +#define NVRAM_DIR       "/usr/lib/xen/boot/"
     1.8  #define NVRAM_FILE_PATH	"/usr/lib/xen/boot/nvram_"
     1.9  int xc_ia64_nvram_init(int xc_handle, char *dom_name, uint32_t dom)
    1.10  {
    1.11 @@ -749,6 +750,7 @@ int xc_ia64_nvram_init(int xc_handle, ch
    1.12          return -1;
    1.13      }
    1.14      strcpy(nvram_path + file_path_len, dom_name);
    1.15 +    mkdir(NVRAM_DIR, 0765);
    1.16  
    1.17      nvram_fd = nvram_init(nvram_path);
    1.18      if ( nvram_fd == (uint64_t)(-1) )