summaryrefslogtreecommitdiffstats
path: root/hw/vhost.c
diff options
context:
space:
mode:
authorAnthony Liguori2012-09-10 19:48:43 +0200
committerAnthony Liguori2012-09-10 19:48:43 +0200
commit14df77a609e39403c3ec814bae63bec0fb4d24d2 (patch)
treefaabedbfdaa0d8b467368f2be07d7d4eb929c247 /hw/vhost.c
parentsocket: don't attempt to reconnect a TCP socket in server mode (diff)
parentvhost: Pass device path to vhost_dev_init() (diff)
downloadqemu-14df77a609e39403c3ec814bae63bec0fb4d24d2.tar.gz
qemu-14df77a609e39403c3ec814bae63bec0fb4d24d2.tar.xz
qemu-14df77a609e39403c3ec814bae63bec0fb4d24d2.zip
Merge remote-tracking branch 'mst/tags/for_anthony' into staging
* mst/tags/for_anthony: vhost: Pass device path to vhost_dev_init() monitor: Rename+move net_handle_fd_param -> monitor_handle_fd_param pcie_aer: clear cmask for Advanced Error Interrupt Message Number pcie: drop version_id field for live migration qemu: add .exrc
Diffstat (limited to 'hw/vhost.c')
-rw-r--r--hw/vhost.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/vhost.c b/hw/vhost.c
index 0fd8da84e2..d0ce5aad9b 100644
--- a/hw/vhost.c
+++ b/hw/vhost.c
@@ -747,14 +747,15 @@ static void vhost_eventfd_del(MemoryListener *listener,
{
}
-int vhost_dev_init(struct vhost_dev *hdev, int devfd, bool force)
+int vhost_dev_init(struct vhost_dev *hdev, int devfd, const char *devpath,
+ bool force)
{
uint64_t features;
int r;
if (devfd >= 0) {
hdev->control = devfd;
} else {
- hdev->control = open("/dev/vhost-net", O_RDWR);
+ hdev->control = open(devpath, O_RDWR);
if (hdev->control < 0) {
return -errno;
}