[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 8/9] vhost-vdpa: add accurate error string when fail to open vhos
From: |
Jason Wang |
Subject: |
[PATCH 8/9] vhost-vdpa: add accurate error string when fail to open vhost vDPA device |
Date: |
Mon, 31 Aug 2020 16:27:36 +0800 |
This patch adds more accurate error string when fail to open vhost
vDPA device.
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
net/vhost-vdpa.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
index f5cc4e8326..9a6f0b63d3 100644
--- a/net/vhost-vdpa.c
+++ b/net/vhost-vdpa.c
@@ -219,6 +219,7 @@ int net_init_vhost_vdpa(const Netdev *netdev, const char
*name,
s = DO_UPCAST(VhostVDPAState, nc, nc);
vdpa_device_fd = qemu_open(opts->vhostdev, O_RDWR);
if (vdpa_device_fd == -1) {
+ error_setg(errp, "Fail to open vhost-vdpa device %s", opts->vhostdev);
return -errno;
}
s->vhost_vdpa.device_fd = vdpa_device_fd;
--
2.20.1
- [PATCH 0/9] refine vhost-vdpa initialization, Jason Wang, 2020/08/31
- [PATCH 1/9] vhost-vdpa: remove the default devname, Jason Wang, 2020/08/31
- [PATCH 2/9] vhost-vdpa: mandate vhostdev, Jason Wang, 2020/08/31
- [PATCH 3/9] vhost-vdpa: remove the unnecessary assert(s->vhost_net), Jason Wang, 2020/08/31
- [PATCH 4/9] vhost-vdpa: refine info string, Jason Wang, 2020/08/31
- [PATCH 5/9] vhost-vdpa: remove the unnecessary initialization, Jason Wang, 2020/08/31
- [PATCH 6/9] vhost-vdpa: remove the unnecessary queue index assignment, Jason Wang, 2020/08/31
- [PATCH 7/9] vhost-vdpa: squash net_vhost_vdpa_init() into net_init_vhost_vdpa(), Jason Wang, 2020/08/31
- [PATCH 8/9] vhost-vdpa: add accurate error string when fail to open vhost vDPA device,
Jason Wang <=
- [PATCH 9/9] vhost-vdpa: allow pre-opend file descriptor, Jason Wang, 2020/08/31