Skip to contentSkip to conversation

vfio: Add ioctl number to error report

PATCH New Alexey Kardashevskiy 1 participant 1 message Feb 23, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vfio: Add ioctl number to error report

This makes the error report more informative.

---
 hw/vfio/common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/vfio/common.c +2 -2
index cebd3b0..d6d97d1 100644
@@ -931,8 +931,8 @@ static int vfio_container_do_ioctl(AddressSpace *as,
     } else {
         ret = ioctl(container->fd, req, param);
         if (ret < 0) {
-            error_report("vfio: failed to ioctl container: ret=%d, %s",
-                         ret, strerror(errno));
+            error_report("vfio: failed to ioctl %d to container: ret=%d, %s",
+                         _IOC_NR(req) - VFIO_BASE, ret, strerror(errno));
         }
     }
 
Signature · 1 line
2.0.0