From owner-svn-src-projects@FreeBSD.ORG Tue Aug 3 14:36:14 2010 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9FFC1065678; Tue, 3 Aug 2010 14:36:14 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7ECBD8FC08; Tue, 3 Aug 2010 14:36:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o73EaEIH072208; Tue, 3 Aug 2010 14:36:14 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o73EaE5U072205; Tue, 3 Aug 2010 14:36:14 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201008031436.o73EaE5U072205@svn.freebsd.org> From: Attilio Rao Date: Tue, 3 Aug 2010 14:36:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210800 - projects/sv/sys/net X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Aug 2010 14:36:14 -0000 Author: attilio Date: Tue Aug 3 14:36:14 2010 New Revision: 210800 URL: http://svn.freebsd.org/changeset/base/210800 Log: - Use BSD compliant 'unsigned' specification for prototype - Adjust style and BSD-compliancy for struct netdump_break_lock as it is visible from the outside Modified: projects/sv/sys/net/netdump.h projects/sv/sys/net/netdump_client.c Modified: projects/sv/sys/net/netdump.h ============================================================================== --- projects/sv/sys/net/netdump.h Tue Aug 3 14:30:13 2010 (r210799) +++ projects/sv/sys/net/netdump.h Tue Aug 3 14:36:14 2010 (r210800) @@ -37,14 +37,14 @@ struct mtx; struct netdump_methods { void (*test_get_lock)(struct ifnet *); - int (*break_lock)(struct ifnet *, int *, uint8_t *, unsigned); + int (*break_lock)(struct ifnet *, int *, uint8_t *, u_int); void (*release_lock)(struct ifnet *); int (*poll_locked)(struct ifnet *, enum poll_cmd, int); }; int netdump_break_lock(struct mtx *lock, const char *name, - int *broke_lock, uint8_t *broken_state, unsigned index, - unsigned broken_state_size); + int *broke_lock, uint8_t *broken_state, u_int index, + u_int bstatesz); #endif Modified: projects/sv/sys/net/netdump_client.c ============================================================================== --- projects/sv/sys/net/netdump_client.c Tue Aug 3 14:30:13 2010 (r210799) +++ projects/sv/sys/net/netdump_client.c Tue Aug 3 14:36:14 2010 (r210800) @@ -1308,8 +1308,8 @@ cleanup: extern int system_panic; int -netdump_break_lock(struct mtx * lock, const char * name, int * broke_lock, uint8_t * broken_state, - unsigned index, unsigned broken_state_size) +netdump_break_lock(struct mtx *lock, const char *name, int *broke_lock, + uint8_t *broken_state, u_int index, u_int bstatesz) { /* XXX: Technically this might be bad because it's possible to be called from within a critical section (such as when the software watchdog @@ -1324,7 +1324,7 @@ netdump_break_lock(struct mtx * lock, co critical_enter(); /* No interrupts so that this is less likely * to mess up */ - if(broken_state_size >= (index + sizeof(*lock))) { + if(bstatesz >= (index + sizeof(*lock))) { bcopy(lock, broken_state + index, sizeof(*lock)); } else { printf("Netdump: cannot save state of lock %s!", name);