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] [xen-unstable] Print errno for each of the "Error when w

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Print errno for each of the "Error when writing to state file" messages.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 02 Nov 2006 22:10:12 +0000
Delivery-date: Thu, 02 Nov 2006 21:29:42 -0800
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 Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Node ID 96f51a000ed024728ea5653f9f0f0550affc3f8b
# Parent  4e17bf788e690b1550187c00f8e567153435948c
Print errno for each of the "Error when writing to state file" messages.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
 tools/libxc/xc_linux_save.c |   24 +++++++++++++++---------
 1 files changed, 15 insertions(+), 9 deletions(-)

diff -r 4e17bf788e69 -r 96f51a000ed0 tools/libxc/xc_linux_save.c
--- a/tools/libxc/xc_linux_save.c       Wed Nov 01 18:20:23 2006 +0000
+++ b/tools/libxc/xc_linux_save.c       Wed Nov 01 18:32:45 2006 +0000
@@ -978,12 +978,14 @@ int xc_linux_save(int xc_handle, int io_
             }
 
             if(!write_exact(io_fd, &batch, sizeof(unsigned int))) {
-                ERROR("Error when writing to state file (2)");
+                ERROR("Error when writing to state file (2) (errno %d)",
+                      errno);
                 goto out;
             }
 
             if(!write_exact(io_fd, pfn_type, sizeof(unsigned long)*j)) {
-                ERROR("Error when writing to state file (3)");
+                ERROR("Error when writing to state file (3) (errno %d)",
+                      errno);
                 goto out;
             }
 
@@ -1013,7 +1015,8 @@ int xc_linux_save(int xc_handle, int io_
                         goto out; 
 
                     if (ratewrite(io_fd, page, PAGE_SIZE) != PAGE_SIZE) {
-                        ERROR("Error when writing to state file (4)");
+                        ERROR("Error when writing to state file (4)"
+                              " (errno %d)", errno);
                         goto out;
                     }
 
@@ -1021,7 +1024,8 @@ int xc_linux_save(int xc_handle, int io_
 
                     /* We have a normal page: just write it directly. */
                     if (ratewrite(io_fd, spage, PAGE_SIZE) != PAGE_SIZE) {
-                        ERROR("Error when writing to state file (5)");
+                        ERROR("Error when writing to state file (5)"
+                              " (errno %d)", errno);
                         goto out;
                     }
                 }
@@ -1056,7 +1060,8 @@ int xc_linux_save(int xc_handle, int io_
 
             /* send "-1" to put receiver into debug mode */
             if(!write_exact(io_fd, &minusone, sizeof(int))) {
-                ERROR("Error when writing to state file (6)");
+                ERROR("Error when writing to state file (6) (errno %d)",
+                      errno);
                 goto out;
             }
 
@@ -1110,7 +1115,7 @@ int xc_linux_save(int xc_handle, int io_
     /* Zero terminate */
     i = 0;
     if (!write_exact(io_fd, &i, sizeof(int))) {
-        ERROR("Error when writing to state file (6)");
+        ERROR("Error when writing to state file (6') (errno %d)", errno);
         goto out;
     }
 
@@ -1125,7 +1130,7 @@ int xc_linux_save(int xc_handle, int io_
         }
 
         if(!write_exact(io_fd, &j, sizeof(unsigned int))) {
-            ERROR("Error when writing to state file (6a)");
+            ERROR("Error when writing to state file (6a) (errno %d)", errno);
             goto out;
         }
 
@@ -1137,7 +1142,8 @@ int xc_linux_save(int xc_handle, int io_
             i++;
             if (j == 1024 || i == max_pfn) {
                 if(!write_exact(io_fd, &pfntab, sizeof(unsigned long)*j)) {
-                    ERROR("Error when writing to state file (6b)");
+                    ERROR("Error when writing to state file (6b) (errno %d)",
+                          errno);
                     goto out;
                 }
                 j = 0;
@@ -1170,7 +1176,7 @@ int xc_linux_save(int xc_handle, int io_
 
     if (!write_exact(io_fd, &ctxt, sizeof(ctxt)) ||
         !write_exact(io_fd, live_shinfo, PAGE_SIZE)) {
-        ERROR("Error when writing to state file (1)");
+        ERROR("Error when writing to state file (1) (errno %d)", errno);
         goto out;
     }
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Print errno for each of the "Error when writing to state file" messages., Xen patchbot-unstable <=