From: Olaf Hering <olaf@aepfle.de>
To: netdev@vger.kernel.org
Subject: [PATCH] keep track of network interface renaming
Date: Tue, 15 Aug 2006 18:56:35 +0200 [thread overview]
Message-ID: <20060815165635.GA31291@aepfle.de> (raw)
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 <olaf@aepfle.de>
---
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) {
next reply other threads:[~2006-08-15 16:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-15 16:56 Olaf Hering [this message]
2006-08-16 2:35 ` [PATCH] keep track of network interface renaming Patrick McHardy
-- strict thread matches above, loose matches on Subject: below --
2007-02-11 11:28 2.6.20/2.6.20-rc7 : ethX renumbered Paul Rolland
2007-02-11 12:54 ` [PATCH] keep track of network interface renaming Olaf Hering
2007-02-11 13:29 ` Paul Rolland
2007-02-11 17:55 ` David Miller
[not found] ` <20070211182704.GA14021@avocado.homenet>
2007-02-11 18:28 ` David Miller
2007-02-11 22:35 ` Tilman Schmidt
[not found] <fa.vON9rghc4zb2B4B1Ub/ZAaRY2v8@ifi.uio.no>
[not found] ` <fa.EIATc7QlHJ5coYaEARiq54/4h6A@ifi.uio.no>
[not found] ` <fa.rECiNcG8qmgC5L7se1aXLWosf4E@ifi.uio.no>
[not found] ` <fa./pMesnnnb80P5K2iQYUkxeYCpXA@ifi.uio.no>
2007-02-11 19:20 ` Robert Hancock
2007-02-11 21:41 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060815165635.GA31291@aepfle.de \
--to=olaf@aepfle.de \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.