mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-01 17:35:17 +00:00
util: new function virPCIDeviceGetConfigPath()
The path to the config file for a PCI device is conventiently stored in a virPCIDevice object, but that object's contents aren't directly visible outside of virpci.c, so we need to have an accessor function for it if anyone needs to look at it.
This commit is contained in:
parent
e026563f01
commit
bfdc145153
@ -2138,6 +2138,7 @@ virPCIDeviceCopy;
|
||||
virPCIDeviceDetach;
|
||||
virPCIDeviceFileIterate;
|
||||
virPCIDeviceFree;
|
||||
virPCIDeviceGetConfigPath;
|
||||
virPCIDeviceGetDriverPathAndName;
|
||||
virPCIDeviceGetIOMMUGroupDev;
|
||||
virPCIDeviceGetIOMMUGroupList;
|
||||
|
@ -1848,6 +1848,18 @@ virPCIDeviceGetName(virPCIDevicePtr dev)
|
||||
return dev->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* virPCIDeviceGetConfigPath:
|
||||
*
|
||||
* Returns a pointer to a string containing the path of @dev's PCI
|
||||
* config file.
|
||||
*/
|
||||
const char *
|
||||
virPCIDeviceGetConfigPath(virPCIDevicePtr dev)
|
||||
{
|
||||
return dev->path;
|
||||
}
|
||||
|
||||
void virPCIDeviceSetManaged(virPCIDevicePtr dev, bool managed)
|
||||
{
|
||||
dev->managed = managed;
|
||||
|
@ -97,6 +97,7 @@ virPCIDevicePtr virPCIDeviceNew(unsigned int domain,
|
||||
virPCIDevicePtr virPCIDeviceCopy(virPCIDevicePtr dev);
|
||||
void virPCIDeviceFree(virPCIDevicePtr dev);
|
||||
const char *virPCIDeviceGetName(virPCIDevicePtr dev);
|
||||
const char *virPCIDeviceGetConfigPath(virPCIDevicePtr dev);
|
||||
|
||||
int virPCIDeviceDetach(virPCIDevicePtr dev,
|
||||
virPCIDeviceListPtr activeDevs,
|
||||
|
Loading…
x
Reference in New Issue
Block a user