public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: Paul Rolland <rol@witbe.net>, Andrew Morton <akpm@osdl.org>
Cc: "'Linux Kernel Mailing List'" <linux-kernel@vger.kernel.org>,
	rol@as2917.net
Subject: [PATCH] keep track of network interface renaming
Date: Sun, 11 Feb 2007 13:54:23 +0100	[thread overview]
Message-ID: <20070211125423.GA30668@aepfle.de> (raw)
In-Reply-To: <011001c74dcf$c60c1c80$2101a8c0@donald>

On Sun, Feb 11, Paul Rolland wrote:

> I'm facing something quite strange... When booting one of these kernels
> (it's a new machine, I've not been running older kernels), the boot message
> says :
> 
> ACPI: PCI Interrupt 0000:04:00.0[A] -> GSI 19 (level, low) -> IRQ 19
> sky2 v1.10 addr 0xff8fc000 irq 19 Yukon-EC (0xb6) rev 2
> sky2 eth0: addr 00:18:f3:e0:5d:d4
> ACPI: PCI Interrupt 0000:03:00.0[A] -> GSI 16 (level, low) -> IRQ 16
> sky2 v1.10 addr 0xff7fc000 irq 16 Yukon-EC (0xb6) rev 2
> sky2 eth1: addr 00:18:f3:e0:36:fd
> 
> So, I'm expecting two interfaces : eth0 and eth1
> 
> Unfortunately, at the end of the boot process, I can find eth1 and eth2,

Unfortunately, this patch was not applied to mainline last year.
Maybe this year.


Keep track about which network interface names were renamed after the
network device driver printed its banner.

Signed-off-by: Olaf Hering <olaf@aepfle.de>

--- linux-2.6.19.orig/net/core/dev.c
+++ linux-2.6.19/net/core/dev.c
@@ -749,7 +749,11 @@ int dev_change_name(struct net_device *d
 	else if (__dev_get_by_name(newname))
 		return -EEXIST;
 	else
+	{
+		if (strncmp(newname, dev->name, IFNAMSIZ))
+			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) {

  reply	other threads:[~2007-02-11 12:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-11 11:28 2.6.20/2.6.20-rc7 : ethX renumbered Paul Rolland
2007-02-11 12:54 ` Olaf Hering [this message]
2007-02-11 13:29   ` [PATCH] keep track of network interface renaming 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
2007-02-11 13:04 ` 2.6.20/2.6.20-rc7 : ethX renumbered Benoit Boissinot
2007-02-11 13:14   ` Paul Rolland
2007-02-11 13:35     ` Paul Rolland
     [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       ` [PATCH] keep track of network interface renaming 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=20070211125423.GA30668@aepfle.de \
    --to=olaf@aepfle.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rol@as2917.net \
    --cc=rol@witbe.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox