summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Norum <WENorum@lbl.gov>2004-10-25 13:50:39 +0000
committerEric Norum <WENorum@lbl.gov>2004-10-25 13:50:39 +0000
commitbb5b40485651d5b8f8f49754a7a482cb37c898d0 (patch)
tree2e29e15ccd8a0f7ac6a620d2aa5f2c83c79c1ee0
parentChanges for new build system. (diff)
downloadrtems-bb5b40485651d5b8f8f49754a7a482cb37c898d0.tar.bz2
Install working version of ether_sprintf().
-rw-r--r--c/src/ChangeLog4
-rw-r--r--c/src/libchip/network/i82586.c16
-rw-r--r--cpukit/ChangeLog4
-rw-r--r--cpukit/libnetworking/net/if_ethersubr.c20
4 files changed, 19 insertions, 25 deletions
diff --git a/c/src/ChangeLog b/c/src/ChangeLog
index 6eb45f68de..a165c902da 100644
--- a/c/src/ChangeLog
+++ b/c/src/ChangeLog
@@ -1,3 +1,7 @@
+2004-10-25 Eric Norum <norume@aps.anl.gov>
+
+ * libchip/network/i82586.c: ether_sprintf() is part of networking library.
+
2004-10-22 Ralf Corsepius <ralf_corsepius@rtems.org>
* alocal/check-custom-bsp.m4: Reflect new location of bspkit*cfg.
diff --git a/c/src/libchip/network/i82586.c b/c/src/libchip/network/i82586.c
index 2afd015d8b..2191d3777c 100644
--- a/c/src/libchip/network/i82586.c
+++ b/c/src/libchip/network/i82586.c
@@ -263,22 +263,6 @@ char *bitmask_snprintf(unsigned long value, const char *format, char *buf, int b
return buf;
}
-char *ether_sprintf(unsigned char *addr)
-{
- static char buf[32];
- char *b = buf;
- int i;
-
- for (i = 0; i < ETHER_ADDR_LEN; i++)
- {
- sprintf(b, "%02x:", *addr++);
- b += 3;
- }
- b--;
- b = "\0";
- return buf;
-}
-
/*
* Front-ends call this function to attach to the MI driver.
*
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 8e241fac34..2d3d1c0acc 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,3 +1,7 @@
+2004-10-25 Eric Norum <norume@aps.anl.gov>
+
+ * libnetworking/net/if_ethersubr.c: Working version of ether_sprintf().
+
2004-10-22 Ralf Corsepius <ralf_corsepius@rtems.org>
* libnetworking/Makefile.am: Reflect changes below.
diff --git a/cpukit/libnetworking/net/if_ethersubr.c b/cpukit/libnetworking/net/if_ethersubr.c
index 4d802860d5..4ae25fbbeb 100644
--- a/cpukit/libnetworking/net/if_ethersubr.c
+++ b/cpukit/libnetworking/net/if_ethersubr.c
@@ -512,18 +512,20 @@ ether_input(ifp, eh, m)
/*
* Convert Ethernet address to printable (loggable) representation.
- * This routine is for compatibility; it's better to just use
- *
- * printf("%6D", <pointer to address>, ":");
- *
- * since there's no static buffer involved.
+ * The static buffer isn't a really huge problem since this code
+ * is protected by the RTEMS network mutex.
*/
char *
-ether_sprintf(const u_char *ap)
+ether_sprintf(const u_int8_t *addr)
{
- static char etherbuf[18];
- snprintf(etherbuf, sizeof (etherbuf), "%6D", ap, ":");
- return (etherbuf);
+ static char buf[32];
+ char *b = buf;
+ int i;
+
+ for (i = 0; i < ETHER_ADDR_LEN; i++, b+=3)
+ sprintf(b, "%02x:", *addr++);
+ *--b = '\0';
+ return buf;
}
/*