diff options
author | Rick Jones <rick.jones2@hp.com> | 2011-11-07 13:29:27 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-08 15:11:57 -0500 |
commit | 68aad78c5023b8aa82da99b47f9d8cf40e8ca453 (patch) | |
tree | c9f90903bd2e7831ea6fc5231affa3b9fc908b73 /drivers/net/ethernet/atheros/atl1e | |
parent | 34d2d89f2d7da3b72b3157e778bbf709047ded97 (diff) | |
download | blackbird-obmc-linux-68aad78c5023b8aa82da99b47f9d8cf40e8ca453.tar.gz blackbird-obmc-linux-68aad78c5023b8aa82da99b47f9d8cf40e8ca453.zip |
sweep the floors and convert some .get_drvinfo routines to strlcpy
Per the mention made by Ben Hutchings that strlcpy is now the preferred
string copy routine for a .get_drvinfo routine, do a bit of floor
sweeping and convert some of the as-yet unconverted ethernet drivers to
it.
Signed-off-by: Rick Jones <rick.jones2@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/atheros/atl1e')
-rw-r--r-- | drivers/net/ethernet/atheros/atl1e/atl1e_ethtool.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/ethernet/atheros/atl1e/atl1e_ethtool.c b/drivers/net/ethernet/atheros/atl1e/atl1e_ethtool.c index 6269438d365f..6e61f9f9ebb5 100644 --- a/drivers/net/ethernet/atheros/atl1e/atl1e_ethtool.c +++ b/drivers/net/ethernet/atheros/atl1e/atl1e_ethtool.c @@ -310,10 +310,12 @@ static void atl1e_get_drvinfo(struct net_device *netdev, { struct atl1e_adapter *adapter = netdev_priv(netdev); - strncpy(drvinfo->driver, atl1e_driver_name, 32); - strncpy(drvinfo->version, atl1e_driver_version, 32); - strncpy(drvinfo->fw_version, "L1e", 32); - strncpy(drvinfo->bus_info, pci_name(adapter->pdev), 32); + strlcpy(drvinfo->driver, atl1e_driver_name, sizeof(drvinfo->driver)); + strlcpy(drvinfo->version, atl1e_driver_version, + sizeof(drvinfo->version)); + strlcpy(drvinfo->fw_version, "L1e", sizeof(drvinfo->fw_version)); + strlcpy(drvinfo->bus_info, pci_name(adapter->pdev), + sizeof(drvinfo->bus_info)); drvinfo->n_stats = 0; drvinfo->testinfo_len = 0; drvinfo->regdump_len = atl1e_get_regs_len(netdev); |