projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4ec6837
)
net: print a notification on device rename
author
Veaceslav Falico
<
[email protected]
>
Thu, 17 Jul 2014 18:33:32 +0000
(20:33 +0200)
committer
David S. Miller
<
[email protected]
>
Mon, 21 Jul 2014 03:44:25 +0000
(20:44 -0700)
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" <
[email protected]
>
CC: Eric Dumazet <
[email protected]
>
CC: Vlad Yasevich <
[email protected]
>
CC: stephen hemminger <
[email protected]
>
CC: Jerry Chu <
[email protected]
>
CC: Ben Hutchings <
[email protected]
>
CC: David Laight <
[email protected]
>
Signed-off-by: Veaceslav Falico <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/core/dev.c
patch
|
blob
|
history
diff --git
a/net/core/dev.c
b/net/core/dev.c
index 81d61014fd9b30bb0bc0e9cf34b856293ac2e9cd..e52a3788d18d3a0e4b6956265d20441f2d2dd764 100644
(file)
--- a/
net/core/dev.c
+++ b/
net/core/dev.c
@@
-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;