summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@gmx.de>2013-09-17 03:08:32 +0200
committercinap_lenrek <cinap_lenrek@gmx.de>2013-09-17 03:08:32 +0200
commit8a7a6f778dec447480683186dcc43c7e406e7465 (patch)
tree0d10fcefc9b8b31effea6bb46ea43a516202ca22
parentad993a2618e4265e4282bdb5faa583fffa6163e3 (diff)
ether8169, etherdp83820, ethervt6102: fix snprint READSTR bugs (thanks pap)
should probably use seprint() instead.
-rw-r--r--sys/src/9/pc/ether8169.c2
-rw-r--r--sys/src/9/pc/etherdp83820.c4
-rw-r--r--sys/src/9/pc/ethervt6102.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/sys/src/9/pc/ether8169.c b/sys/src/9/pc/ether8169.c
index cf9ebdf08..50f5f4ac1 100644
--- a/sys/src/9/pc/ether8169.c
+++ b/sys/src/9/pc/ether8169.c
@@ -585,7 +585,7 @@ rtl8169ifstat(Ether* edev, void* a, long n, ulong offset)
l += snprint(p+l, READSTR-l, "multicast: %ud\n", ctlr->mcast);
if(ctlr->mii != nil && ctlr->mii->curphy != nil){
- l += snprint(p+l, READSTR, "phy: ");
+ l += snprint(p+l, READSTR-l, "phy: ");
for(i = 0; i < NMiiPhyr; i++){
if(i && ((i & 0x07) == 0))
l += snprint(p+l, READSTR-l, "\n ");
diff --git a/sys/src/9/pc/etherdp83820.c b/sys/src/9/pc/etherdp83820.c
index 78bd3b477..a9d655ee0 100644
--- a/sys/src/9/pc/etherdp83820.c
+++ b/sys/src/9/pc/etherdp83820.c
@@ -937,7 +937,7 @@ dp83820ifstat(Ether* edev, void* a, long n, ulong offset)
l += snprint(p+l, READSTR-l, "tfu %d\n", ctlr->tfu);
l += snprint(p+l, READSTR-l, "txa %d\n", ctlr->txa);
- l += snprint(p+l, READSTR, "rom:");
+ l += snprint(p+l, READSTR-l, "rom:");
for(i = 0; i < 0x10; i++){
if(i && ((i & 0x07) == 0))
l += snprint(p+l, READSTR-l, "\n ");
@@ -946,7 +946,7 @@ dp83820ifstat(Ether* edev, void* a, long n, ulong offset)
l += snprint(p+l, READSTR-l, "\n");
if(ctlr->mii != nil && ctlr->mii->curphy != nil){
- l += snprint(p+l, READSTR, "phy:");
+ l += snprint(p+l, READSTR-l, "phy:");
for(i = 0; i < NMiiPhyr; i++){
if(i && ((i & 0x07) == 0))
l += snprint(p+l, READSTR-l, "\n ");
diff --git a/sys/src/9/pc/ethervt6102.c b/sys/src/9/pc/ethervt6102.c
index 2ff0b055f..7b5fe980b 100644
--- a/sys/src/9/pc/ethervt6102.c
+++ b/sys/src/9/pc/ethervt6102.c
@@ -371,7 +371,7 @@ vt6102ifstat(Ether* edev, void* a, long n, ulong offset)
l += snprint(p+l, READSTR-l, "tft: %ud\n", ctlr->tft);
if(ctlr->mii != nil && ctlr->mii->curphy != nil){
- l += snprint(p+l, READSTR, "phy: ");
+ l += snprint(p+l, READSTR-l, "phy: ");
for(i = 0; i < NMiiPhyr; i++){
if(i && ((i & 0x07) == 0))
l += snprint(p+l, READSTR-l, "\n ");