summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorMartin Kletzander <mkletzan@redhat.com>2016-04-03 20:16:51 +0200
committerMartin Kletzander <mkletzan@redhat.com>2016-05-02 15:46:23 +0200
commitc36b1f7b6a2e31129d9ddf3ad69dd3f540a4bfe4 (patch)
tree37ee62107284fea557cb43555ef3272794d1112f /src/util
parent573cfd188ceaca86f4d50da1ea7d52efd55899f8 (diff)
downloadlibvirt-c36b1f7b6a2e31129d9ddf3ad69dd3f540a4bfe4.tar.gz
Change virDevicePCIAddress to virPCIDeviceAddress
We had both and the only difference was that the latter also included information about multifunction setting. The problem with that was that we couldn't use functions made for only one of the structs (e.g. parsing). To consolidate those two structs, use the one in virpci.h, include that in domain_conf.h and add the multifunction member in it. Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Diffstat (limited to 'src/util')
-rw-r--r--src/util/virpci.c2
-rw-r--r--src/util/virpci.h3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/util/virpci.c b/src/util/virpci.c
index f7921f86d6..3f1252d42b 100644
--- a/src/util/virpci.c
+++ b/src/util/virpci.c
@@ -2517,7 +2517,7 @@ virPCIGetVirtualFunctions(const char *sysfs_path,
int ret = -1;
size_t i;
char *device_link = NULL;
- virPCIDeviceAddress *config_addr = NULL;
+ virPCIDeviceAddressPtr config_addr = NULL;
char *totalvfs_file = NULL, *totalvfs_str = NULL;
*virtual_functions = NULL;
diff --git a/src/util/virpci.h b/src/util/virpci.h
index 82f45ec417..5c63eab736 100644
--- a/src/util/virpci.h
+++ b/src/util/virpci.h
@@ -40,6 +40,7 @@ struct _virPCIDeviceAddress {
unsigned int bus;
unsigned int slot;
unsigned int function;
+ int multi; /* virTristateSwitch */
};
typedef enum {
@@ -168,7 +169,7 @@ int virPCIDeviceFileIterate(virPCIDevicePtr dev,
virPCIDeviceFileActor actor,
void *opaque);
-typedef int (*virPCIDeviceAddressActor)(virPCIDeviceAddress *addr,
+typedef int (*virPCIDeviceAddressActor)(virPCIDeviceAddressPtr addr,
void *opaque);
int virPCIDeviceAddressIOMMUGroupIterate(virPCIDeviceAddressPtr orig,
virPCIDeviceAddressActor actor,