Commit 6fe82a39 authored by Veaceslav Falico's avatar Veaceslav Falico Committed by David S. Miller
Browse files

net: print a notification on device rename

Currently it's done silently (from the kernel part), and thus it might be
hard to track the renames from logs.

Add a simple netdev_info() to notify the rename, but only in case the
previous name was valid.

CC: "David S. Miller" <>
CC: Eric Dumazet <>
CC: Vlad Yasevich <>
CC: stephen hemminger <>
CC: Jerry Chu <>
CC: Ben Hutchings <>
CC: David Laight <David.Laight@ACULAB.COM>
Signed-off-by: default avatarVeaceslav Falico <>
Signed-off-by: default avatarDavid S. Miller <>
parent 4ec68378
......@@ -1113,6 +1113,9 @@ int dev_change_name(struct net_device *dev, const char *newname)
return err;
if (oldname[0] && !strchr(oldname, '%'))
netdev_info(dev, "renamed from %s\n", oldname);
old_assign_type = dev->name_assign_type;
dev->name_assign_type = NET_NAME_RENAMED;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment