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] Added the errno to the messages printed with the ERR mac

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Added the errno to the messages printed with the ERR macro. Tidy the use of
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 30 Nov 2005 21:50:08 +0000
Delivery-date: Wed, 30 Nov 2005 21:50:20 +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 emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID 7acd50d945d7c22f336deaafbeb682a8aa503d5b
# Parent  4268d0ecdde7ed9f47604e66906f9baf79d48f0f
Added the errno to the messages printed with the ERR macro.  Tidy the use of
this macro where newlines have been appended -- the macro does this itself so
there is no need to add another one.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>

diff -r 4268d0ecdde7 -r 7acd50d945d7 tools/libxc/xc_linux_restore.c
--- a/tools/libxc/xc_linux_restore.c    Tue Nov 29 15:03:06 2005
+++ b/tools/libxc/xc_linux_restore.c    Wed Nov 30 18:38:14 2005
@@ -221,7 +221,7 @@
     
     if(xc_domain_memory_increase_reservation(
            xc_handle, dom, max_pfn, 0, 0, NULL) != 0) { 
-        ERR("Failed to increase reservation by %lx KB\n", PFN_TO_KB(max_pfn));
+        ERR("Failed to increase reservation by %lx KB", PFN_TO_KB(max_pfn));
         errno = ENOMEM;
         goto out;
     }
@@ -487,7 +487,7 @@
                 for(k = 0; k < j; k++) {
                     if(!uncanonicalize_pagetable(L1TAB, 
                                                  region_base + k*PAGE_SIZE)) {
-                        ERR("failed uncanonicalize pt!\n"); 
+                        ERR("failed uncanonicalize pt!"); 
                         goto out; 
                     } 
                 }
diff -r 4268d0ecdde7 -r 7acd50d945d7 tools/libxc/xc_linux_save.c
--- a/tools/libxc/xc_linux_save.c       Tue Nov 29 15:03:06 2005
+++ b/tools/libxc/xc_linux_save.c       Wed Nov 30 18:38:14 2005
@@ -523,13 +523,13 @@
 
     xmml.max_extents = m2p_chunks;
     if (!(xmml.extent_start = malloc(m2p_chunks * sizeof(unsigned long)))) { 
-        ERR("failed to allocate space for m2p mfns!\n"); 
+        ERR("failed to allocate space for m2p mfns"); 
         return NULL; 
     } 
 
     if (xc_memory_op(xc_handle, XENMEM_machphys_mfn_list, &xmml) ||
         (xmml.nr_extents != m2p_chunks)) {
-        ERR("xc_get_m2p_mfns:"); 
+        ERR("xc_get_m2p_mfns"); 
         return NULL;
     }
 
@@ -540,7 +540,7 @@
     } 
 
     if (!(entries = malloc(m2p_chunks * sizeof(privcmd_mmap_entry_t)))) { 
-        ERR("failed to allocate space for mmap entries!\n"); 
+        ERR("failed to allocate space for mmap entries"); 
         return NULL; 
     } 
 
@@ -794,7 +794,7 @@
     pfn_batch = calloc(MAX_BATCH_SIZE, sizeof(unsigned long));
 
     if ((pfn_type == NULL) || (pfn_batch == NULL)) {
-        ERR("failed to alloc memory for pfn_type and/or pfn_batch arays."); 
+        ERR("failed to alloc memory for pfn_type and/or pfn_batch arrays"); 
         errno = ENOMEM;
         goto out;
     }
diff -r 4268d0ecdde7 -r 7acd50d945d7 tools/libxc/xg_save_restore.h
--- a/tools/libxc/xg_save_restore.h     Tue Nov 29 15:03:06 2005
+++ b/tools/libxc/xg_save_restore.h     Wed Nov 30 18:38:14 2005
@@ -10,7 +10,7 @@
 #define PROGRESS 0
 
 #define ERR(_f, _a...) do {                     \
-    fprintf(stderr, _f "\n" , ## _a);           \
+    fprintf(stderr, _f ": %d\n" , ## _a, errno);\
     fflush(stderr); }                           \
 while (0)
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Added the errno to the messages printed with the ERR macro. Tidy the use of, Xen patchbot -unstable <=