]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/net/ethernet/aeroflex/greth.c
ethtool: fix drvinfo strings set in drivers
[mirror_ubuntu-artful-kernel.git] / drivers / net / ethernet / aeroflex / greth.c
index aa53115bb38b91d45329be5914241591da6776c7..480662ba5227a44588f0e4ef05f35767548cf084 100644 (file)
@@ -1127,10 +1127,11 @@ static void greth_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *in
 {
        struct greth_private *greth = netdev_priv(dev);
 
-       strncpy(info->driver, dev_driver_string(greth->dev), 32);
-       strncpy(info->version, "revision: 1.0", 32);
-       strncpy(info->bus_info, greth->dev->bus->name, 32);
-       strncpy(info->fw_version, "N/A", 32);
+       strlcpy(info->driver, dev_driver_string(greth->dev),
+               sizeof(info->driver));
+       strlcpy(info->version, "revision: 1.0", sizeof(info->version));
+       strlcpy(info->bus_info, greth->dev->bus->name, sizeof(info->bus_info));
+       strlcpy(info->fw_version, "N/A", sizeof(info->fw_version));
        info->eedump_len = 0;
        info->regdump_len = sizeof(struct greth_regs);
 }