ia64/xen-unstable

changeset 14243:fdb3c96eba0f

[LIBXC][POWERPC] make sure DTB is truncated and has a decent mode
Also, since we only write to this FD, we mau as well use creat(2)
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 07:05:26 2007 -0500 (2007-02-08)
parents 1b1d0a909abc
children 156f2644eb06
files tools/libxc/powerpc64/mk_flatdevtree.c
line diff
     1.1 --- a/tools/libxc/powerpc64/mk_flatdevtree.c	Thu Feb 08 06:46:13 2007 -0500
     1.2 +++ b/tools/libxc/powerpc64/mk_flatdevtree.c	Thu Feb 08 07:05:26 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_CREAT|O_RDWR)) == -1) {
     1.8 +    if ((dtb_fd = creat(DTB_FILE, S_IRUSR | S_IWUSR)) == -1) {
     1.9          PERROR("%s: failed to open file %s", __func__, DTB_FILE);
    1.10          goto error;
    1.11      }