libxc: make mmap() failure message more verbose
PATCH 1/1 libxc: make mmap() failure message more verbose
Hi!
Attached patch makes mmap() failure message more verbose.
Signed-off-by Christoph Egger <[email protected]>
Signature · 12 lines
AMD Saxony, Dresden, Germany Operating System Research Center Legal Information: AMD Saxony Limited Liability Company & Co. KG Sitz (Geschäftsanschrift): Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland Registergericht Dresden: HRA 4896 vertretungsberechtigter Komplementär: AMD Saxony LLC (Sitz Wilmington, Delaware, USA) Geschäftsführer der AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy
tools/libxc/xc_dom_core.c +6 -2
@@ -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-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel