summaryrefslogtreecommitdiffstats
path: root/usr.sbin/fwcontrol/fwcontrol.c
diff options
context:
space:
mode:
authorsimokawa <simokawa@FreeBSD.org>2003-07-12 09:36:53 +0000
committersimokawa <simokawa@FreeBSD.org>2003-07-12 09:36:53 +0000
commit2e230106526ab9f82db2931cd43a99d4798f3024 (patch)
tree967c8b9b2259b41c2f48bec419d73befcc12018a /usr.sbin/fwcontrol/fwcontrol.c
parent830a5c883e25b2642cd224f4106a0f0e31e4db1c (diff)
downloadFreeBSD-src-2e230106526ab9f82db2931cd43a99d4798f3024.zip
FreeBSD-src-2e230106526ab9f82db2931cd43a99d4798f3024.tar.gz
- Allow retrieval of local Configuration ROM.
- Clear Configuration ROM buffer in advance for '-d' option.
Diffstat (limited to 'usr.sbin/fwcontrol/fwcontrol.c')
-rw-r--r--usr.sbin/fwcontrol/fwcontrol.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/usr.sbin/fwcontrol/fwcontrol.c b/usr.sbin/fwcontrol/fwcontrol.c
index a998852..a6fea60 100644
--- a/usr.sbin/fwcontrol/fwcontrol.c
+++ b/usr.sbin/fwcontrol/fwcontrol.c
@@ -277,14 +277,13 @@ get_crom(int fd, int node, void *crom_buf, int len)
}
if (i == data->info_len)
errx(1, "no such node %d.", node);
- else if (i == 0)
- errx(1, "node %d is myself.", node);
else
buf.eui = data->dev[i].eui;
free((void *)data);
buf.len = len;
buf.ptr = crom_buf;
+ bzero(crom_buf, len);
if ((error = ioctl(fd, FW_GCROM, &buf)) < 0) {
err(1, "ioctl");
}
OpenPOWER on IntegriCloud