Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/net/lib/libshmif * print interface number, backend ...
details: https://anonhg.NetBSD.org/src/rev/b021fbaa8e7e
branches: trunk
changeset: 756722:b021fbaa8e7e
user: pooka <pooka%NetBSD.org@localhost>
date: Thu Jul 29 22:48:11 2010 +0000
description:
* print interface number, backend path and ethernet address for dmesg
* make kassert more demanding
diffstat:
sys/rump/net/lib/libshmif/if_shmem.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diffs (39 lines):
diff -r 9db3f6d86df4 -r b021fbaa8e7e sys/rump/net/lib/libshmif/if_shmem.c
--- a/sys/rump/net/lib/libshmif/if_shmem.c Thu Jul 29 22:42:58 2010 +0000
+++ b/sys/rump/net/lib/libshmif/if_shmem.c Thu Jul 29 22:48:11 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_shmem.c,v 1.11 2010/07/29 18:30:39 pooka Exp $ */
+/* $NetBSD: if_shmem.c,v 1.12 2010/07/29 22:48:11 pooka Exp $ */
/*
* Copyright (c) 2009 Antti Kantee. All Rights Reserved.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_shmem.c,v 1.11 2010/07/29 18:30:39 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_shmem.c,v 1.12 2010/07/29 22:48:11 pooka Exp $");
#include <sys/param.h>
#include <sys/fcntl.h>
@@ -135,7 +135,8 @@
{
size_t chunk;
- KASSERT(len < (BUSMEM_SIZE - IFMEM_DATA) && off <= BUSMEM_SIZE);
+ KASSERT(len < (BUSMEM_SIZE - IFMEM_DATA) && off <= BUSMEM_SIZE
+ && off >= IFMEM_DATA);
chunk = MIN(len, BUSMEM_SIZE - off);
memcpy(sc->sc_busmem + off, data, chunk);
@@ -230,6 +231,10 @@
if_attach(ifp);
ether_ifattach(ifp, enaddr);
+ aprint_verbose("shmif%d: bus %s\n", mynum, path);
+ aprint_verbose("shmif%d: Ethernet address %s\n",
+ mynum, ether_sprintf(enaddr));
+
if (ifnum)
*ifnum = mynum;
return 0;
Home |
Main Index |
Thread Index |
Old Index