From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Christoph Egger" Subject: [PATCH] libxc: improve error message Date: Fri, 21 Sep 2007 14:18:48 +0200 Message-ID: <200709211418.48487.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_oa78Gr/2PtIFn3S" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --Boundary-00=_oa78Gr/2PtIFn3S Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi! Attached patch improves error message when starting a domain and mmap() fails, which may happen on too rigorous rlimit settings. Signed-off-by: Christoph Egger =2D-=20 AMD Saxony, Dresden, Germany Operating System Research Center Legal Information: AMD Saxony Limited Liability Company & Co. KG Sitz (Gesch=E4ftsanschrift): Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland Registergericht Dresden: HRA 4896 vertretungsberechtigter Komplement=E4r: AMD Saxony LLC (Sitz Wilmington, Delaware, USA) Gesch=E4ftsf=FChrer der AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy --Boundary-00=_oa78Gr/2PtIFn3S Content-Type: text/plain; charset=us-ascii; name=libxc_dom.diff Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=libxc_dom.diff diff -r 40bf3ffff484 tools/libxc/xc_dom_boot.c --- a/tools/libxc/xc_dom_boot.c Thu Sep 20 16:02:22 2007 +0100 +++ b/tools/libxc/xc_dom_boot.c Fri Sep 21 14:17:26 2007 +0000 @@ -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; } --Boundary-00=_oa78Gr/2PtIFn3S Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-00=_oa78Gr/2PtIFn3S--