[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] libxc: improve error message when starting a domain and mmap() fails



# HG changeset patch
# User Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1190391815 -3600
# Node ID f7c1758b8b163eaec1d9720da2c8eb1b057697b6
# Parent  ca13600946540d2cfbe727473704499b629bda20
libxc: improve error message when starting a domain and mmap() fails
Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx>
---
 tools/libxc/xc_dom_boot.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff -r ca1360094654 -r f7c1758b8b16 tools/libxc/xc_dom_boot.c
--- a/tools/libxc/xc_dom_boot.c Fri Sep 21 17:22:15 2007 +0100
+++ b/tools/libxc/xc_dom_boot.c Fri Sep 21 17:23:35 2007 +0100
@@ -152,6 +152,7 @@ void *xc_dom_boot_domU_map(struct xc_dom
     privcmd_mmap_entry_t *entries;
     void *ptr;
     int i, rc;
+    int err;
 
     entries = xc_dom_malloc(dom, count * sizeof(privcmd_mmap_entry_t));
     if ( entries == NULL )
@@ -166,9 +167,11 @@ void *xc_dom_boot_domU_map(struct xc_dom
                MAP_SHARED, dom->guest_xc, 0);
     if ( ptr == MAP_FAILED )
     {
-        xc_dom_panic(XC_INTERNAL_ERROR,
-                     "%s: failed to mmap domU pages 0x%" PRIpfn "+0x%" PRIpfn
-                     " [mmap]\n", __FUNCTION__, pfn, count);
+        err = errno;
+        xc_dom_panic(XC_INTERNAL_ERROR,
+                     "%s: failed to mmap domU pages 0x%" PRIpfn "+0x%" PRIpfn
+                     " [mmap, errno=%i (%s)]\n", __FUNCTION__, pfn, count,
+                     err, strerror(err));
         return NULL;
     }
 

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.