Sweep the last of the active .get_drvinfo floors under ethernet/
This round of floor sweeping converts strncpy calls in various .get_drvinfo routines to the preferred strlcpy. It also does a modicum of other cleaning in those routines. Signed-off-by: Rick Jones <rick.jones2@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
e52fcb2462
commit
612a94d6f2
@@ -191,12 +191,14 @@ static void igbvf_get_drvinfo(struct net_device *netdev,
|
||||
struct ethtool_drvinfo *drvinfo)
|
||||
{
|
||||
struct igbvf_adapter *adapter = netdev_priv(netdev);
|
||||
char firmware_version[32] = "N/A";
|
||||
|
||||
strncpy(drvinfo->driver, igbvf_driver_name, 32);
|
||||
strncpy(drvinfo->version, igbvf_driver_version, 32);
|
||||
strncpy(drvinfo->fw_version, firmware_version, 32);
|
||||
strncpy(drvinfo->bus_info, pci_name(adapter->pdev), 32);
|
||||
strlcpy(drvinfo->driver, igbvf_driver_name, sizeof(drvinfo->driver));
|
||||
strlcpy(drvinfo->version, igbvf_driver_version,
|
||||
sizeof(drvinfo->version));
|
||||
strlcpy(drvinfo->fw_version, "N/A",
|
||||
sizeof(drvinfo->fw_version));
|
||||
strlcpy(drvinfo->bus_info, pci_name(adapter->pdev),
|
||||
sizeof(drvinfo->bus_info));
|
||||
drvinfo->regdump_len = igbvf_get_regs_len(netdev);
|
||||
drvinfo->eedump_len = igbvf_get_eeprom_len(netdev);
|
||||
}
|
||||
|
Reference in New Issue
Block a user