mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemu: make vdpa connect function more generic
qemuInterfaceVDPAConnect() was a helper function for connecting to the vdpa device file. But in order to support other vdpa devices besides network interfaces (e.g. vdpa block devices) make this function a bit more generic. Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
@@ -18,8 +18,8 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "qemu/qemu_command.h"
|
||||
#include "qemu/qemu_hotplug.h"
|
||||
#include "qemu/qemu_interface.h"
|
||||
#include "qemu/qemu_process.h"
|
||||
#include "testutilsqemu.h"
|
||||
#include "conf/domain_conf.h"
|
||||
@@ -94,7 +94,7 @@ qemuProcessKillManagedPRDaemon(virDomainObj *vm G_GNUC_UNUSED)
|
||||
}
|
||||
|
||||
int
|
||||
qemuInterfaceVDPAConnect(virDomainNetDef *net G_GNUC_UNUSED)
|
||||
qemuVDPAConnect(const char *devicepath G_GNUC_UNUSED)
|
||||
{
|
||||
/* need a valid fd or sendmsg won't work. Just open /dev/null */
|
||||
return open("/dev/null", O_RDONLY);
|
||||
|
||||
@@ -255,7 +255,7 @@ virNetDevBandwidthSetRootQDisc(const char *ifname G_GNUC_UNUSED,
|
||||
|
||||
|
||||
int
|
||||
qemuInterfaceVDPAConnect(virDomainNetDef *net G_GNUC_UNUSED)
|
||||
qemuVDPAConnect(const char *devicepath G_GNUC_UNUSED)
|
||||
{
|
||||
if (fcntl(1732, F_GETFD) != -1)
|
||||
abort();
|
||||
|
||||
Reference in New Issue
Block a user