mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-01 20:05:46 +00:00
virpci: Decrease scope of VIR_PF_PHYS_PORT_NAME_REGEX macro
The VIR_PF_PHYS_PORT_NAME_REGEX macro is used only in virPCIGetNetName() and nowhere else. It's not necessary to expose it in the header file. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
f1a950379d
commit
58292bae47
@ -2536,6 +2536,12 @@ virPCIDeviceAddressGetSysfsFile(virPCIDeviceAddress *addr,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Represents format of PF's phys_port_name in switchdev mode:
|
||||||
|
* 'p%u' or 'p%us%u'. New line checked since value is read from sysfs file.
|
||||||
|
*/
|
||||||
|
# define VIR_PF_PHYS_PORT_NAME_REGEX "(p[0-9]+$)|(p[0-9]+s[0-9]+$)"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* virPCIGetNetName:
|
* virPCIGetNetName:
|
||||||
* @device_link_sysfs_path: sysfs path to the PCI device
|
* @device_link_sysfs_path: sysfs path to the PCI device
|
||||||
@ -2661,6 +2667,8 @@ virPCIGetNetName(const char *device_link_sysfs_path,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# undef VIR_PF_PHYS_PORT_NAME_REGEX
|
||||||
|
|
||||||
int
|
int
|
||||||
virPCIGetVirtualFunctionInfo(const char *vf_sysfs_device_path,
|
virPCIGetVirtualFunctionInfo(const char *vf_sysfs_device_path,
|
||||||
int pfNetDevIdx,
|
int pfNetDevIdx,
|
||||||
|
@ -52,11 +52,6 @@ struct _virZPCIDeviceAddress {
|
|||||||
|
|
||||||
#define VIR_PCI_DEVICE_ADDRESS_FMT "%04x:%02x:%02x.%d"
|
#define VIR_PCI_DEVICE_ADDRESS_FMT "%04x:%02x:%02x.%d"
|
||||||
|
|
||||||
/* Represents format of PF's phys_port_name in switchdev mode:
|
|
||||||
* 'p%u' or 'p%us%u'. New line checked since value is read from sysfs file.
|
|
||||||
*/
|
|
||||||
#define VIR_PF_PHYS_PORT_NAME_REGEX "(p[0-9]+$)|(p[0-9]+s[0-9]+$)"
|
|
||||||
|
|
||||||
struct _virPCIDeviceAddress {
|
struct _virPCIDeviceAddress {
|
||||||
unsigned int domain;
|
unsigned int domain;
|
||||||
unsigned int bus;
|
unsigned int bus;
|
||||||
|
Loading…
Reference in New Issue
Block a user