Skip to contentSkip to conversation

libxencall: Make bufdev/nobufdev mmap error messages distinct

PATCH In review Ian Jackson 2 participants 2 messages Oct 15, 2018 – Oct 30, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libxencall: Make bufdev/nobufdev mmap error messages distinct

This assists diagnosis.

CC Andrew Cooper <[email protected]>
CC Hans van Kranenburg <[email protected]>
---
 tools/libs/call/linux.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tools/libs/call/linux.c +3 -3
index d8a6306e04..bb56ff236e 100644
@@ -93,7 +93,7 @@ static void *alloc_pages_bufdev(xencall_handle *xcall, size_t npages)
              xcall->buf_fd, 0);
     if ( p == MAP_FAILED )
     {
-        PERROR("alloc_pages: mmap failed");
+        PERROR("alloc_pages: mmap (bufdev) failed");
         p = NULL;
     }
 
@@ -110,7 +110,7 @@ static void *alloc_pages_nobufdev(xencall_handle *xcall, size_t npages)
     p = mmap(NULL, size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_LOCKED, -1, 0);
     if ( p == MAP_FAILED )
     {
-        PERROR("alloc_pages: mmap failed");
+        PERROR("alloc_pages: mmap (nobufdev) failed");
         return NULL;
     }
 
@@ -119,7 +119,7 @@ static void *alloc_pages_nobufdev(xencall_handle *xcall, size_t npages)
     rc = madvise(p, npages * PAGE_SIZE, MADV_DONTFORK);
     if ( rc < 0 )
     {
-        PERROR("alloc_pages: madvise failed");
+        PERROR("alloc_pages: madvise (nobufdev) failed");
         goto out;
     }
 
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel