WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Fix libxc warnings with gcc-4.1 and glibc-2.3.90.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fix libxc warnings with gcc-4.1 and glibc-2.3.90.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 03 Mar 2006 01:56:07 +0000
Delivery-date: Fri, 03 Mar 2006 01:56:43 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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 316fafc6d74392358e85abd60eda5c6dbb991794
# Parent  dfa7ba9c1296c232ceced197cee88f9d02237a68
Fix libxc warnings with gcc-4.1 and glibc-2.3.90.

Signed-off-by: Charles Coffing <ccoffing@xxxxxxxxxx>

diff -r dfa7ba9c1296 -r 316fafc6d743 tools/libxc/xc_core.c
--- a/tools/libxc/xc_core.c     Thu Mar  2 20:35:17 2006
+++ b/tools/libxc/xc_core.c     Thu Mar  2 20:36:03 2006
@@ -71,8 +71,12 @@
                                          (sizeof(vcpu_guest_context_t) * 
nr_vcpus) +
                                          (nr_pages * sizeof(unsigned long)));
 
-    write(dump_fd, &header, sizeof(struct xc_core_header));
-    write(dump_fd, &ctxt, sizeof(ctxt[0]) * nr_vcpus);
+    if (write(dump_fd, &header, sizeof(struct xc_core_header)) < 0 ||
+        write(dump_fd, &ctxt, sizeof(ctxt[0]) * nr_vcpus) < 0)
+    {
+        PERROR("write failed");
+        goto error_out;
+    }
 
     if ((page_array = malloc(nr_pages * sizeof(unsigned long))) == NULL) {
         printf("Could not allocate memory\n");
@@ -82,7 +86,11 @@
         printf("Could not get the page frame list\n");
         goto error_out;
     }
-    write(dump_fd, page_array, nr_pages * sizeof(unsigned long));
+    if (write(dump_fd, page_array, nr_pages * sizeof(unsigned long)) < 0)
+    {
+        PERROR("write failed");
+        goto error_out;
+    }
     lseek(dump_fd, header.xch_pages_offset, SEEK_SET);
     for (dump_mem = dump_mem_start, i = 0; i < nr_pages; i++) {
         copy_from_domain_page(xc_handle, domid, page_array, i, dump_mem);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix libxc warnings with gcc-4.1 and glibc-2.3.90., Xen patchbot -unstable <=