This fixes a bug in the creating of the flat dev tree. If open is used
and O_CREAT not is specified, it will fail if the file has not already
been created. This patch will create the file if it does not exist
already. Which will allow for DomU creation.
Signed-off-by: Jerone Young [EMAIL PROTECTED]
--- tools/libxc/powerpc64/mk_flatdevtree.c.orig 2007-02-06 16:15:47.0 -0600
+++ tools/libxc/powerpc64/mk_flatdevtree.c 2007-02-06 16:33:06.0 -0600
@@ -618,7 +618,7 @@
}
/* write a copy of the tree to a file */
-if ((dtb_fd = open(DTB_FILE , O_RDWR)) == -1) {
+if ((dtb_fd = open(DTB_FILE, O_CREAT|O_RDWR)) == -1) {
PERROR(%s: failed to open file %s, __func__, DTB_FILE);
goto error;
}
___
Xen-ppc-devel mailing list
Xen-ppc-devel@lists.xensource.com
http://lists.xensource.com/xen-ppc-devel