[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>
This commit is contained in:
Alex Williamson committed 2007-06-15 09:25:09 -06:00
1 parent 2a46c653b1
commit 2d66d8efcf
1 file changed
+2
+2
View File
@@ -735,6 +735,7 @@ int xc_ia64_save_to_nvram(int xc_handle, uint32_t dom)
return 0;
}
#define NVRAM_DIR "/usr/lib/xen/boot/"
#define NVRAM_FILE_PATH "/usr/lib/xen/boot/nvram_"
int xc_ia64_nvram_init(int xc_handle, char *dom_name, uint32_t dom)
{
@@ -749,6 +750,7 @@ int xc_ia64_nvram_init(int xc_handle, char *dom_name, uint32_t dom)
return -1;
}
strcpy(nvram_path + file_path_len, dom_name);
mkdir(NVRAM_DIR, 0765);
nvram_fd = nvram_init(nvram_path);
if ( nvram_fd == (uint64_t)(-1) )
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.