Date: Tue, 3 Aug 2010 14:36:14 +0000 (UTC) From: Attilio Rao <attilio@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r210800 - projects/sv/sys/net Message-ID: <201008031436.o73EaE5U072205@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008031436.o73EaE5U072205>