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] domain builder: make mmap() failure messa

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] domain builder: make mmap() failure message more verbose.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 05 Dec 2007 05:40:10 -0800
Delivery-date: Wed, 05 Dec 2007 05:40:38 -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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1196763184 0
# Node ID 6e7cf648f7f3486e532be332bb4d832bbfe9784a
# Parent  01faea565a9b24c819a25fdcf444cd65fc1932f2
domain builder: make mmap() failure message more verbose.
Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx>
---
 tools/libxc/xc_dom_core.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff -r 01faea565a9b -r 6e7cf648f7f3 tools/libxc/xc_dom_core.c
--- a/tools/libxc/xc_dom_core.c Tue Dec 04 10:11:54 2007 +0000
+++ b/tools/libxc/xc_dom_core.c Tue Dec 04 10:13:04 2007 +0000
@@ -352,15 +352,19 @@ void *xc_dom_pfn_to_ptr(struct xc_dom_im
     }
     else
     {
+        int err;
+
         mode = "anonymous memory";
         phys->ptr = mmap(NULL, phys->count << page_shift,
                          PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON,
                          -1, 0);
         if ( phys->ptr == MAP_FAILED )
         {
+            err = errno;
             xc_dom_panic(XC_OUT_OF_MEMORY,
-                         "%s: oom: can't allocate 0x%" PRIpfn " pages\n",
-                         __FUNCTION__, count);
+                         "%s: oom: can't allocate 0x%" PRIpfn " pages"
+                         " [mmap, errno=%i (%s)]\n",
+                         __FUNCTION__, count, err, strerror(err));
             return NULL;
         }
         dom->alloc_mem_map += phys->count << page_shift;

_______________________________________________
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] domain builder: make mmap() failure message more verbose., Xen patchbot-unstable <=