]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
vfio/pci: Fix incorrect error message
authorDong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
Wed, 3 May 2017 20:52:35 +0000 (14:52 -0600)
committerAlex Williamson <alex.williamson@redhat.com>
Wed, 3 May 2017 20:52:35 +0000 (14:52 -0600)
When the "No host device provided" error occurs, the hint message
that starts with "Use -vfio-pci," makes no sense, since "-vfio-pci"
is not a valid command line parameter.

Correct this by replacing "-vfio-pci" with "-device vfio-pci".

Signed-off-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
hw/vfio/pci.c

index 03a3d01549765b23adf61b6c7591382bc7446772..32aca7770177a479c7d31a617604e38ec11f8bbc 100644 (file)
@@ -2625,8 +2625,8 @@ static void vfio_realize(PCIDevice *pdev, Error **errp)
         if (!(~vdev->host.domain || ~vdev->host.bus ||
               ~vdev->host.slot || ~vdev->host.function)) {
             error_setg(errp, "No provided host device");
-            error_append_hint(errp, "Use -vfio-pci,host=DDDD:BB:DD.F "
-                              "or -vfio-pci,sysfsdev=PATH_TO_DEVICE\n");
+            error_append_hint(errp, "Use -device vfio-pci,host=DDDD:BB:DD.F "
+                              "or -device vfio-pci,sysfsdev=PATH_TO_DEVICE\n");
             return;
         }
         vdev->vbasedev.sysfsdev =