ia64/xen-unstable

changeset 9870:d66dfd584d2f

Check a write() return value in xenbaked.

From: Jeremy Katz

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu Apr 27 09:47:05 2006 +0100 (2006-04-27)
parents d265c79031af
children e42ed4332053
files tools/xenmon/xenbaked.c
line diff
     1.1 --- a/tools/xenmon/xenbaked.c	Thu Apr 27 09:43:49 2006 +0100
     1.2 +++ b/tools/xenmon/xenbaked.c	Thu Apr 27 09:47:05 2006 +0100
     1.3 @@ -677,7 +677,10 @@ void alloc_qos_data(int ncpu)
     1.4      for (n=0; n<ncpu; n++) {
     1.5  
     1.6        for (i=0; i<sizeof(_new_qos_data); i=i+pgsize)
     1.7 -        write(qos_fd, dummy, pgsize);
     1.8 +          if ((write(qos_fd, dummy, pgsize)) != pgsize) {
     1.9 +              PERROR(SHARED_MEM_FILE);
    1.10 +              exit(2);
    1.11 +          }
    1.12  
    1.13        new_qos = (_new_qos_data *) mmap(0, sizeof(_new_qos_data), PROT_READ|PROT_WRITE, 
    1.14  				       MAP_SHARED, qos_fd, off);