public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@mandrakesoft.com>
To: Thunder from the hill <thunder@ngforever.de>
Cc: Mikael Pettersson <mikpe@csd.uu.se>, linux-kernel@vger.kernel.org
Subject: Re: 2.5.20 tulip bogosities
Date: Fri, 07 Jun 2002 13:17:55 -0400	[thread overview]
Message-ID: <3D00EAC3.7040903@mandrakesoft.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0206071103170.15675-100000@hawkeye.luckynet.adm>

Thunder from the hill wrote:

>Hi,
>
>On Thu, 6 Jun 2002, Mikael Pettersson wrote:
>  
>
>>Also note the obviously broken "eth%d" printk format string.
>>    
>>
>
>It's printk("%s: blah\n", dev->name);
>  
>

The "eth%d" thing is a format string, but unrelated to printk.  The %d 
is replaced with the ethernet interface number by the system.  That 
cosmetic bug is a holdover from olden days, when the ethernet interfaces 
would do

    register ethernet interface, get a number
    if we fail, release the number

So with the old system, it's possible that the user might be

    eth0: error cannot load, aborting [first NIC]
    eth0: error cannot load, aborting [second NIC]
    eth0: error cannot load, aborting [third NIC]

The new system, which is hotplug-friendly, makes it impossible to know 
the ethernet interface number until you _really_ are sure the NIC is ok 
to use.  Therefore, "eth%d" is "dev->name" that has not been translated 
yet.  The fix is simple, replace "eth%d" with "tulip%d" in the printk 
message, and use the board count instead of ethernet interface number.

    Jeff






  reply	other threads:[~2002-06-07 17:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-06 16:24 2.5.20 tulip bogosities Mikael Pettersson
2002-06-06 18:31 ` Jeff Garzik
2002-06-06 18:41   ` Patrick Mochel
2002-06-07 12:08     ` Alessandro Suardi
2002-06-07 17:04 ` Thunder from the hill
2002-06-07 17:17   ` Jeff Garzik [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-06-06 20:26 Mikael Pettersson

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=3D00EAC3.7040903@mandrakesoft.com \
    --to=jgarzik@mandrakesoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikpe@csd.uu.se \
    --cc=thunder@ngforever.de \
    /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