vfio/pci: Fix incorrect error message
RFC PATCH 1/1 vfio/pci: Fix incorrect error message
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".
--- hw/vfio/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
hw/vfio/pci.c +2 -2
@@ -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 =
Signature · 1 line
2.10.2
* Dong Jia Shi <[email protected]> [2017-04-25 06:52:01 +0200]:
Hey Alex,
Please ignore the "RFC" tag in the subject. Sorry for the mistake.
Quoted 29 lines
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 <[email protected]>--- hw/vfio/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)hw/vfio/pci.c +2
-2@@ -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 =Signature · 1 line
2.10.2
Signature · 1 line
Dong Jia Shi
Auger Eric
Reviewed-byHi Dong,
Quoted 13 lines · Dong Jia Shi
* Dong Jia Shi <[email protected]> [2017-04-25 06:52:01 +0200]:
Hey Alex,
Please ignore the "RFC" tag in the subject. Sorry for the mistake.
Quoted 7 lines
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 <[email protected]>
Thanks
Eric
Quoted 23 lines
Quoted 22 lines
--- hw/vfio/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)hw/vfio/pci.c +2
-2@@ -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 =Signature · 1 line
2.10.2
* Auger Eric <[email protected]> [2017-04-26 10:06:58 +0200]:
Hi Eric,
Quoted 9 lines
Hi Dong,
Quoted 6 lines · Dong Jia Shi
* Dong Jia Shi <[email protected]> [2017-04-25 06:52:01 +0200]:
Hey Alex,
Please ignore the "RFC" tag in the subject. Sorry for the mistake.
Quoted 8 lines
Quoted 7 lines
Quoted 7 lines
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 <[email protected]>Reviewed-by Eric Auger <[email protected]>
Thanks for the review!
Quoted 28 lines
Thanks
Eric
Quoted 23 lines
Quoted 22 lines
--- hw/vfio/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)hw/vfio/pci.c +2
-2@@ -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 =Signature · 1 line
2.10.2
Signature · 1 line
Dong Jia Shi