This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-changelog] Check a write() return value in xenbaked.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Check a write() return value in xenbaked.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 27 Apr 2006 10:33:07 +0000
Delivery-date: Thu, 27 Apr 2006 03:45:58 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID d66dfd584d2f6573103172e4544309e87244631d
# Parent  d265c79031afe9689271c03c56ed20069472f7ff
Check a write() return value in xenbaked.

From: Jeremy Katz

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r d265c79031af -r d66dfd584d2f tools/xenmon/xenbaked.c
--- a/tools/xenmon/xenbaked.c   Thu Apr 27 09:43:49 2006 +0100
+++ b/tools/xenmon/xenbaked.c   Thu Apr 27 09:47:05 2006 +0100
@@ -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), 
                                       MAP_SHARED, qos_fd, off);

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>