ia64/xen-unstable

changeset 14242:1b1d0a909abc

[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@us.ibm.com>
Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author Jimi Xenidis <jimix@watson.ibm.com>
date Thu Feb 08 06:46:13 2007 -0500 (2007-02-08)
parents 38b700cca5eb
children fdb3c96eba0f
files tools/libxc/powerpc64/mk_flatdevtree.c
line diff
     1.1 --- a/tools/libxc/powerpc64/mk_flatdevtree.c	Fri Mar 02 18:01:17 2007 -0600
     1.2 +++ b/tools/libxc/powerpc64/mk_flatdevtree.c	Thu Feb 08 06:46:13 2007 -0500
     1.3 @@ -618,7 +618,7 @@ int make_devtree(struct ft_cxt *root,
     1.4      }
     1.5  
     1.6      /* write a copy of the tree to a file */
     1.7 -    if ((dtb_fd = open(DTB_FILE , O_RDWR)) == -1) {
     1.8 +    if ((dtb_fd = open(DTB_FILE , O_CREAT|O_RDWR)) == -1) {
     1.9          PERROR("%s: failed to open file %s", __func__, DTB_FILE);
    1.10          goto error;
    1.11      }