aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenmon
diff options
context:
space:
mode:
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2006-04-27 09:47:05 +0100
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2006-04-27 09:47:05 +0100
commit067abcc94959473c9b2e6f6085bc225481f6d238 (patch)
tree58c7d8e82f69208487f92953443809cccdfb83fa /tools/xenmon
parentc7e3f5818f210bc404194d093dcd6ca1f377ccd4 (diff)
downloadxen-067abcc94959473c9b2e6f6085bc225481f6d238.tar.gz
xen-067abcc94959473c9b2e6f6085bc225481f6d238.tar.bz2
xen-067abcc94959473c9b2e6f6085bc225481f6d238.zip
Check a write() return value in xenbaked.
From: Jeremy Katz Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'tools/xenmon')
-rw-r--r--tools/xenmon/xenbaked.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/xenmon/xenbaked.c b/tools/xenmon/xenbaked.c
index 876be1d68e..41db7def3a 100644
--- a/tools/xenmon/xenbaked.c
+++ b/tools/xenmon/xenbaked.c
@@ -677,7 +677,10 @@ void alloc_qos_data(int ncpu)
for (n=0; n<ncpu; n++) {
for (i=0; i<sizeof(_new_qos_data); i=i+pgsize)
- write(qos_fd, dummy, pgsize);
+ if ((write(qos_fd, dummy, pgsize)) != pgsize) {
+ PERROR(SHARED_MEM_FILE);
+ exit(2);
+ }
new_qos = (_new_qos_data *) mmap(0, sizeof(_new_qos_data), PROT_READ|PROT_WRITE,
MAP_SHARED, qos_fd, off);