From: "Dan Hopper" <hopper@pcsmail.amd.com>
To: linux-mips@linux-mips.org
Subject: [patch 2.4] au1x00 prom.c hw addr case insensitivity fix
Date: Tue, 4 Feb 2003 22:19:50 -0600 [thread overview]
Message-ID: <20030205041950.GA14502@yeager.amd.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 469 bytes --]
Hi folks,
Attached please find a short fix to str2hexnum() in
arch/mips/au1000/common/prom.c of the 2.4 branch. With this fix,
the contents of the "ethaddr" entry in the environment table passed
by the bootloader to the kernel can have upper case hexadecimal
digits.
Without the patch, an address such as ethaddr =
"00:50:C2:0C:20:4f" is silently converted to "00:50:02:00:20:4f",
making for some serious head scratching if you're trying to bootp
the kernel.
Dan
[-- Attachment #2: prom.c.uppercase_macaddr.patch --]
[-- Type: text/plain, Size: 415 bytes --]
--- arch/mips/au1000/common/prom.c.orig Tue Feb 4 20:38:28 2003
+++ arch/mips/au1000/common/prom.c Tue Feb 4 22:09:17 2003
@@ -105,9 +105,11 @@
inline unsigned char str2hexnum(unsigned char c)
{
if(c >= '0' && c <= '9')
- return c - '0';
+ return c - '0';
if(c >= 'a' && c <= 'f')
- return c - 'a' + 10;
+ return c - 'a' + 10;
+ if(c >= 'A' && c <= 'F')
+ return c - 'A' + 10;
return 0; /* foo */
}
reply other threads:[~2003-02-05 4:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20030205041950.GA14502@yeager.amd.com \
--to=hopper@pcsmail.amd.com \
--cc=linux-mips@linux-mips.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox