Keep track about which network interface names were renamed after the
network device driver printed its banner. Previous kernel names will
be reused when new interfaces get registerd.
Recent udev scripts implement a stable kernel device name for network
interfaces.
This printk avoids confusion about what network hardware maps to what
kernel interface in later driver or network stack messages.

Signed-off-by: Olaf Hering <[EMAIL PROTECTED]>

---
 net/core/dev.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Index: linux-2.6.18-rc4/net/core/dev.c
===================================================================
--- linux-2.6.18-rc4.orig/net/core/dev.c
+++ linux-2.6.18-rc4/net/core/dev.c
@@ -738,8 +738,11 @@ int dev_change_name(struct net_device *d
        }
        else if (__dev_get_by_name(newname))
                return -EEXIST;
-       else
+       else {
+               if (strcmp(newname, dev->name))
+                       printk(KERN_INFO "%s renamed to %s\n", dev->name, 
newname);
                strlcpy(dev->name, newname, IFNAMSIZ);
+       }
 
        err = class_device_rename(&dev->class_dev, dev->name);
        if (!err) {
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to