[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[XenPPC] [xenppc-unstable] [LIBXC][POWERPC] use O_CREAT on open call for DTB_FILE



# HG changeset patch
# User Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
# Node ID 51ca40884ed825b0d7fdf81a1e078e32451b4d22
# Parent  20e5f508accc21f6aaf9ade60d9a5510512cb289
[LIBXC][POWERPC] use O_CREAT on open call for  DTB_FILE

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 <jyoung5@xxxxxxxxxx>
Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
---
 tools/libxc/powerpc64/mk_flatdevtree.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r 20e5f508accc -r 51ca40884ed8 tools/libxc/powerpc64/mk_flatdevtree.c
--- a/tools/libxc/powerpc64/mk_flatdevtree.c    Tue Feb 06 13:42:19 2007 -0600
+++ b/tools/libxc/powerpc64/mk_flatdevtree.c    Thu Feb 08 06:46:13 2007 -0500
@@ -618,7 +618,7 @@ int make_devtree(struct ft_cxt *root,
     }
 
     /* 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@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.