[XenPPC] [PATCH] Fix bug where dtb database is not created

2007-02-06 Thread Jerone Young
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

Re: [XenPPC] [PATCH] Fix bug where dtb database is not created

2007-02-06 Thread Ryan Harper
* Jerone Young [EMAIL PROTECTED] [2007-02-06 16:52]:
 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.

Nice catch.  Thanks Jerone.


-- 
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
(512) 838-9253   T/L: 678-9253
[EMAIL PROTECTED]

___
Xen-ppc-devel mailing list
Xen-ppc-devel@lists.xensource.com
http://lists.xensource.com/xen-ppc-devel