From: Mike Frysinger Date: Tue, 17 Feb 2009 11:54:25 -0500 Subject: [U-Boot] [PATCH 06/30] net: get mac address from environment and use eth util funcs In-Reply-To: <1234887702.5138.1222.camel@localhost.localdomain> References: <1234847451-3210-1-git-send-email-vapier@gentoo.org> <1234847451-3210-7-git-send-email-vapier@gentoo.org> <1234887702.5138.1222.camel@localhost.localdomain> Message-ID: <200902171154.26718.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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