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]>
---
qemu/hw/device-assignment.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
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;
}
--
1.5.4.3
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html