mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
virNetDevGetVirtualFunctions: Remove 'max_vfs' argument
The only caller doesn't use it. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
fcae7a44c3
commit
00f804c1cf
@ -2599,7 +2599,6 @@ static int
|
|||||||
networkCreateInterfacePool(virNetworkDef *netdef)
|
networkCreateInterfacePool(virNetworkDef *netdef)
|
||||||
{
|
{
|
||||||
size_t numVirtFns = 0;
|
size_t numVirtFns = 0;
|
||||||
unsigned int maxVirtFns = 0;
|
|
||||||
char **vfNames = NULL;
|
char **vfNames = NULL;
|
||||||
virPCIDeviceAddress **virtFns;
|
virPCIDeviceAddress **virtFns;
|
||||||
|
|
||||||
@ -2610,7 +2609,7 @@ networkCreateInterfacePool(virNetworkDef *netdef)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if ((virNetDevGetVirtualFunctions(netdef->forward.pfs->dev, &vfNames,
|
if ((virNetDevGetVirtualFunctions(netdef->forward.pfs->dev, &vfNames,
|
||||||
&virtFns, &numVirtFns, &maxVirtFns)) < 0) {
|
&virtFns, &numVirtFns)) < 0) {
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
_("Could not get Virtual functions on %s"),
|
_("Could not get Virtual functions on %s"),
|
||||||
netdef->forward.pfs->dev);
|
netdef->forward.pfs->dev);
|
||||||
|
@ -1225,17 +1225,16 @@ int
|
|||||||
virNetDevGetVirtualFunctions(const char *pfname,
|
virNetDevGetVirtualFunctions(const char *pfname,
|
||||||
char ***vfname,
|
char ***vfname,
|
||||||
virPCIDeviceAddress ***virt_fns,
|
virPCIDeviceAddress ***virt_fns,
|
||||||
size_t *n_vfname,
|
size_t *n_vfname)
|
||||||
unsigned int *max_vfs)
|
|
||||||
{
|
{
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
size_t i;
|
size_t i;
|
||||||
g_autofree char *pf_sysfs_device_link = NULL;
|
g_autofree char *pf_sysfs_device_link = NULL;
|
||||||
g_autofree char *pfPhysPortID = NULL;
|
g_autofree char *pfPhysPortID = NULL;
|
||||||
|
unsigned int max_vfs;
|
||||||
|
|
||||||
*virt_fns = NULL;
|
*virt_fns = NULL;
|
||||||
*n_vfname = 0;
|
*n_vfname = 0;
|
||||||
*max_vfs = 0;
|
|
||||||
|
|
||||||
if (virNetDevGetPhysPortID(pfname, &pfPhysPortID) < 0)
|
if (virNetDevGetPhysPortID(pfname, &pfPhysPortID) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -1243,8 +1242,7 @@ virNetDevGetVirtualFunctions(const char *pfname,
|
|||||||
if (virNetDevSysfsFile(&pf_sysfs_device_link, pfname, "device") < 0)
|
if (virNetDevSysfsFile(&pf_sysfs_device_link, pfname, "device") < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (virPCIGetVirtualFunctions(pf_sysfs_device_link, virt_fns,
|
if (virPCIGetVirtualFunctions(pf_sysfs_device_link, virt_fns, n_vfname, &max_vfs) < 0)
|
||||||
n_vfname, max_vfs) < 0)
|
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
*vfname = g_new0(char *, *n_vfname);
|
*vfname = g_new0(char *, *n_vfname);
|
||||||
@ -1480,8 +1478,7 @@ int
|
|||||||
virNetDevGetVirtualFunctions(const char *pfname G_GNUC_UNUSED,
|
virNetDevGetVirtualFunctions(const char *pfname G_GNUC_UNUSED,
|
||||||
char ***vfname G_GNUC_UNUSED,
|
char ***vfname G_GNUC_UNUSED,
|
||||||
virPCIDeviceAddress ***virt_fns G_GNUC_UNUSED,
|
virPCIDeviceAddress ***virt_fns G_GNUC_UNUSED,
|
||||||
size_t *n_vfname G_GNUC_UNUSED,
|
size_t *n_vfname G_GNUC_UNUSED)
|
||||||
unsigned int *max_vfs G_GNUC_UNUSED)
|
|
||||||
{
|
{
|
||||||
virReportSystemError(ENOSYS, "%s",
|
virReportSystemError(ENOSYS, "%s",
|
||||||
_("Unable to get virtual functions on this platform"));
|
_("Unable to get virtual functions on this platform"));
|
||||||
|
@ -254,10 +254,9 @@ int virNetDevGetPhysPortName(const char *ifname,
|
|||||||
int virNetDevGetVirtualFunctions(const char *pfname,
|
int virNetDevGetVirtualFunctions(const char *pfname,
|
||||||
char ***vfname,
|
char ***vfname,
|
||||||
virPCIDeviceAddress ***virt_fns,
|
virPCIDeviceAddress ***virt_fns,
|
||||||
size_t *n_vfname,
|
size_t *n_vfname)
|
||||||
unsigned int *max_vfs)
|
|
||||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
|
||||||
ATTRIBUTE_NONNULL(4) ATTRIBUTE_NONNULL(5) G_GNUC_WARN_UNUSED_RESULT;
|
ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT;
|
||||||
|
|
||||||
int virNetDevSaveNetConfig(const char *linkdev, int vf,
|
int virNetDevSaveNetConfig(const char *linkdev, int vf,
|
||||||
const char *stateDir,
|
const char *stateDir,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user