From: Mark McLoughlin <[EMAIL PROTECTED]>

If kvm_assign_pci_device(), there's no need for us to print
two lines of error messages. The string translation of errno
is very useful though, so include that in the message using
strerror().

Signed-off-by: Mark McLoughlin <[EMAIL PROTECTED]>
Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>

diff --git a/qemu/hw/device-assignment.c b/qemu/hw/device-assignment.c
index b5cf6ee..2b2ef68 100644
--- a/qemu/hw/device-assignment.c
+++ b/qemu/hw/device-assignment.c
@@ -540,12 +540,11 @@ struct PCIDevice *init_assigned_device(AssignedDevInfo 
*adev, PCIBus *bus)
     if (r && !adev->disable_iommu)
        assigned_dev_data.flags |= KVM_DEV_ASSIGN_ENABLE_IOMMU;
 #endif
-      
+
     r = kvm_assign_pci_device(kvm_context, &assigned_dev_data);
     if (r < 0) {
-       fprintf(stderr, "Could not notify kernel about "
-                "assigned device \"%s\"\n", adev->name);
-       perror("register_real_device");
+       fprintf(stderr, "Failed to assign device \"%s\" : %s\n",
+                adev->name, strerror(-r));
        goto out;
     }
 
--
To unsubscribe from this list: send the line "unsubscribe kvm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to