Re: [PATCH] util: virPCIGetNetName(): use first netdev name when phys_port_id isn't matched

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2017-09-15 at 11:49 -0400, Laine Stump wrote:
> @@ -2902,6 +2903,15 @@ virPCIGetNetName(const char *device_link_sysfs_path,
>              /* if this one doesn't match, keep looking */
>              if (STRNEQ_NULLABLE(physPortID, thisPhysPortID)) {
>                  VIR_FREE(thisPhysPortID);
> +                /* save the first entry we find to use as a failsafe
> +                 * in case we don't match the phys_port_id. This is
> +                 * needed because some NIC drivers (e.g. i40e)
> +                 * implement phys_port_id for PFs, but not for VFs
> +                 */
> +                if (!firstEntryName &&
> +                    VIR_STRDUP(firstEntryName, entry->d_name) < 0)
> +                    goto cleanup;

You need curly braces around the body here.

Looks sane otherwise. ACK

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux