Skip to content

Commit

Permalink
kni: fix build with Linux 6.8
Browse files Browse the repository at this point in the history
strlcpy() was removed in commit d26270061ae6 (string: Remove strlcpy()), use
strscpy() instead.

The patches fixes this:
kernel/linux/kni/kni_net.c: In function ‘kni_get_drvinfo’:
kernel/linux/kni/kni_net.c:835:9: error: implicit declaration of function ‘strlcpy’; did you mean ‘strscpy’?

Intended esp. for stable/22.11. It should go wherever kni is still in
the tree.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Luca Boccassi <bluca@debian.org>
  • Loading branch information
Jiri Slaby authored and bluca committed Apr 25, 2024
1 parent dbd8f39 commit 15658af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/linux/kni/kni_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -832,8 +832,8 @@ static const struct net_device_ops kni_net_netdev_ops = {
static void kni_get_drvinfo(struct net_device *dev,
struct ethtool_drvinfo *info)
{
strlcpy(info->version, KNI_VERSION, sizeof(info->version));
strlcpy(info->driver, "kni", sizeof(info->driver));
strscpy(info->version, KNI_VERSION, sizeof(info->version));
strscpy(info->driver, "kni", sizeof(info->driver));
}

static const struct ethtool_ops kni_net_ethtool_ops = {
Expand Down

0 comments on commit 15658af

Please sign in to comment.