domain builder: make mmap() failure message more verbose.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
This commit is contained in:
Keir Fraser committed 2007-12-04 10:13:04 +00:00
1 parent 85b3f5270f
commit 9f0c829d98
1 file changed
+6 -2
+6 -2
View File
@@ -352,15 +352,19 @@ void *xc_dom_pfn_to_ptr(struct xc_dom_image *dom, xen_pfn_t pfn,
}
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;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.