[U-Boot] [PATCH 06/30] net: get mac address from environment and use eth util funcs
Mike Frysinger
vapier at gentoo.org
Tue Feb 17 17:54:25 CET 2009
On Tuesday 17 February 2009 11:21:42 Peter Tyser wrote:
> On Tue, 2009-02-17 at 00:10 -0500, Mike Frysinger wrote:
> > @@ -915,11 +914,7 @@ int CDPSendTrigger(void)
> > #ifdef CONFIG_CDP_DEVICE_ID
> > *s++ = htons(CDP_DEVICE_ID_TLV);
> > *s++ = htons(CONFIG_CDP_DEVICE_ID);
> > - memset(buf, 0, sizeof(buf));
> > - sprintf(buf, CONFIG_CDP_DEVICE_ID_PREFIX "%02X%02X%02X%02X%02X%02X",
> > - NetOurEther[0] & 0xff, NetOurEther[1] & 0xff,
> > - NetOurEther[2] & 0xff, NetOurEther[3] & 0xff,
> > - NetOurEther[4] & 0xff, NetOurEther[5] & 0xff);
> > + sprintf(buf, "%pM", NetOurEther);
> > memcpy((uchar *)s, buf, 16);
> > s += 16 / 2;
>
> It looks like CONFIG_CDP_DEVICE_ID_PREFIX was accidentally removed. The
> formatting of "%pM" will also have ':'s where the original field did
> not.
i think when i made the changes, i thought it was a snprintf(), and so dropped
the "2nd argument". %pm should give us the right output. thanks for pointing
it out.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090217/04fa0dc4/attachment.pgp
More information about the U-Boot
mailing list