Module Name: src
Committed By: pooka
Date: Thu Jul 29 22:48:11 UTC 2010
Modified Files:
src/sys/rump/net/lib/libshmif: if_shmem.c
Log Message:
* print interface number, backend path and ethernet address for dmesg
* make kassert more demanding
To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/rump/net/lib/libshmif/if_shmem.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/rump/net/lib/libshmif/if_shmem.c
diff -u src/sys/rump/net/lib/libshmif/if_shmem.c:1.11 src/sys/rump/net/lib/libshmif/if_shmem.c:1.12
--- src/sys/rump/net/lib/libshmif/if_shmem.c:1.11 Thu Jul 29 18:30:39 2010
+++ src/sys/rump/net/lib/libshmif/if_shmem.c Thu Jul 29 22:48:11 2010
@@ -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;