Module Name: src Committed By: christos Date: Sun Nov 20 23:37:00 UTC 2011
Modified Files: src/sys/sys: aio.h buf.h kernhist.h lockdebug.h lwp.h malloc.h mbuf.h module.h mqueue.h namei.h pool.h sched.h sleepq.h vmem.h vnode.h wapbl.h Log Message: add more missing printf attributes. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/sys/aio.h cvs rdiff -u -r1.116 -r1.117 src/sys/sys/buf.h cvs rdiff -u -r1.2 -r1.3 src/sys/sys/kernhist.h cvs rdiff -u -r1.11 -r1.12 src/sys/sys/lockdebug.h src/sys/sys/wapbl.h cvs rdiff -u -r1.156 -r1.157 src/sys/sys/lwp.h cvs rdiff -u -r1.107 -r1.108 src/sys/sys/malloc.h cvs rdiff -u -r1.146 -r1.147 src/sys/sys/mbuf.h cvs rdiff -u -r1.28 -r1.29 src/sys/sys/module.h cvs rdiff -u -r1.14 -r1.15 src/sys/sys/mqueue.h src/sys/sys/vmem.h cvs rdiff -u -r1.77 -r1.78 src/sys/sys/namei.h cvs rdiff -u -r1.70 -r1.71 src/sys/sys/pool.h cvs rdiff -u -r1.73 -r1.74 src/sys/sys/sched.h cvs rdiff -u -r1.19 -r1.20 src/sys/sys/sleepq.h cvs rdiff -u -r1.233 -r1.234 src/sys/sys/vnode.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/sys/aio.h diff -u src/sys/sys/aio.h:1.9 src/sys/sys/aio.h:1.10 --- src/sys/sys/aio.h:1.9 Sat Jan 10 21:45:55 2009 +++ src/sys/sys/aio.h Sun Nov 20 18:37:00 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: aio.h,v 1.9 2009/01/11 02:45:55 christos Exp $ */ +/* $NetBSD: aio.h,v 1.10 2011/11/20 23:37:00 christos Exp $ */ /* * Copyright (c) 2007, Mindaugas Rasiukevicius <rmind at NetBSD org> @@ -115,7 +115,8 @@ struct aioproc { extern u_int aio_listio_max; /* Prototypes */ -void aio_print_jobs(void (*pr)(const char *, ...)); +void aio_print_jobs(void (*)(const char *, ...) + __attribute__((__format__(__printf__, 1, 2)))); int aio_suspend1(struct lwp *, struct aiocb **, int, struct timespec *); #endif /* _KERNEL */ Index: src/sys/sys/buf.h diff -u src/sys/sys/buf.h:1.116 src/sys/sys/buf.h:1.117 --- src/sys/sys/buf.h:1.116 Wed Apr 27 05:47:25 2011 +++ src/sys/sys/buf.h Sun Nov 20 18:37:00 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: buf.h,v 1.116 2011/04/27 09:47:25 hannken Exp $ */ +/* $NetBSD: buf.h,v 1.117 2011/11/20 23:37:00 christos Exp $ */ /*- * Copyright (c) 1999, 2000, 2007, 2008 The NetBSD Foundation, Inc. @@ -290,7 +290,8 @@ u_long buf_memcalc(void); int buf_drain(int); int buf_setvalimit(vsize_t); #if defined(DDB) || defined(DEBUGPRINT) -void vfs_buf_print(buf_t *, int, void (*)(const char *, ...)); +void vfs_buf_print(buf_t *, int, void (*)(const char *, ...) + __attribute__((__format__(__printf__, 1, 2)))); #endif buf_t *getiobuf(struct vnode *, bool); void putiobuf(buf_t *); Index: src/sys/sys/kernhist.h diff -u src/sys/sys/kernhist.h:1.2 src/sys/sys/kernhist.h:1.3 --- src/sys/sys/kernhist.h:1.2 Fri Jun 10 10:59:35 2011 +++ src/sys/sys/kernhist.h Sun Nov 20 18:37:00 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: kernhist.h,v 1.2 2011/06/10 14:59:35 matt Exp $ */ +/* $NetBSD: kernhist.h,v 1.3 2011/11/20 23:37:00 christos Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -189,7 +189,8 @@ kernhist_entry_print(const struct kern_h } #if defined(DDB) -void kernhist_print(void (*)(const char *, ...)); +void kernhist_print(void (*)(const char *, ...) + __attribute__((__format__(__printf__, 1, 2)))); #endif /* DDB */ #endif /* KERNHIST */ Index: src/sys/sys/lockdebug.h diff -u src/sys/sys/lockdebug.h:1.11 src/sys/sys/lockdebug.h:1.12 --- src/sys/sys/lockdebug.h:1.11 Sat Mar 7 16:59:25 2009 +++ src/sys/sys/lockdebug.h Sun Nov 20 18:37:00 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: lockdebug.h,v 1.11 2009/03/07 21:59:25 ad Exp $ */ +/* $NetBSD: lockdebug.h,v 1.12 2011/11/20 23:37:00 christos Exp $ */ /*- * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -55,7 +55,8 @@ typedef struct lockops { void lockdebug_abort(volatile void *, lockops_t *, const char *, const char *); -void lockdebug_lock_print(void *, void (*)(const char *, ...)); +void lockdebug_lock_print(void *, void (*)(const char *, ...) + __attribute__((__format__(__printf__, 1, 2)))); #ifdef LOCKDEBUG Index: src/sys/sys/wapbl.h diff -u src/sys/sys/wapbl.h:1.11 src/sys/sys/wapbl.h:1.12 --- src/sys/sys/wapbl.h:1.11 Wed Apr 21 12:51:24 2010 +++ src/sys/sys/wapbl.h Sun Nov 20 18:37:00 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: wapbl.h,v 1.11 2010/04/21 16:51:24 pooka Exp $ */ +/* $NetBSD: wapbl.h,v 1.12 2011/11/20 23:37:00 christos Exp $ */ /*- * Copyright (c) 2003,2008 The NetBSD Foundation, Inc. @@ -170,7 +170,8 @@ void wapbl_register_deallocation(struct void wapbl_jlock_assert(struct wapbl *wl); void wapbl_junlock_assert(struct wapbl *wl); -void wapbl_print(struct wapbl *wl, int full, void (*pr)(const char *, ...)); +void wapbl_print(struct wapbl *wl, int full, void (*pr)(const char *, ...) + __attribute__((__format__(__printf__, 1, 2)))); #if defined(WAPBL_DEBUG) || defined(DDB) void wapbl_dump(struct wapbl *); Index: src/sys/sys/lwp.h diff -u src/sys/sys/lwp.h:1.156 src/sys/sys/lwp.h:1.157 --- src/sys/sys/lwp.h:1.156 Mon Oct 31 08:18:32 2011 +++ src/sys/sys/lwp.h Sun Nov 20 18:37:00 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: lwp.h,v 1.156 2011/10/31 12:18:32 yamt Exp $ */ +/* $NetBSD: lwp.h,v 1.157 2011/11/20 23:37:00 christos Exp $ */ /*- * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2010 @@ -356,7 +356,8 @@ int lwp_park(struct timespec *, const vo int lwp_unpark(lwpid_t, const void *); /* DDB. */ -void lwp_whatis(uintptr_t, void (*)(const char *, ...)); +void lwp_whatis(uintptr_t, void (*)(const char *, ...) + __attribute__((__format__(__printf__, 1, 2)))); /* * Lock an LWP. XXX _MODULE Index: src/sys/sys/malloc.h diff -u src/sys/sys/malloc.h:1.107 src/sys/sys/malloc.h:1.108 --- src/sys/sys/malloc.h:1.107 Fri Apr 23 15:09:15 2010 +++ src/sys/sys/malloc.h Sun Nov 20 18:37:00 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: malloc.h,v 1.107 2010/04/23 19:09:15 rmind Exp $ */ +/* $NetBSD: malloc.h,v 1.108 2011/11/20 23:37:00 christos Exp $ */ /* * Copyright (c) 1987, 1993 @@ -108,7 +108,8 @@ int debug_malloc(unsigned long, struct m int debug_free(void *, struct malloc_type *); void debug_malloc_print(void); -void debug_malloc_printit(void (*)(const char *, ...), vaddr_t); +void debug_malloc_printit(void (*)(const char *, ...) + __attribute__((__format__(__printf__, 1, 2)), vaddr_t)); #endif /* MALLOC_DEBUG */ void *kern_realloc(void *, unsigned long, struct malloc_type *, int); Index: src/sys/sys/mbuf.h diff -u src/sys/sys/mbuf.h:1.146 src/sys/sys/mbuf.h:1.147 --- src/sys/sys/mbuf.h:1.146 Wed Sep 21 14:10:25 2011 +++ src/sys/sys/mbuf.h Sun Nov 20 18:37:00 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mbuf.h,v 1.146 2011/09/21 18:10:25 christos Exp $ */ +/* $NetBSD: mbuf.h,v 1.147 2011/11/20 23:37:00 christos Exp $ */ /*- * Copyright (c) 1996, 1997, 1999, 2001, 2007 The NetBSD Foundation, Inc. @@ -925,7 +925,8 @@ m_length(const struct mbuf *m) return pktlen; } -void m_print(const struct mbuf *, const char *, void (*)(const char *, ...)); +void m_print(const struct mbuf *, const char *, void (*)(const char *, ...) + __attribute__((__format__(__printf__, 1, 2)))); #endif /* _KERNEL */ #endif /* !_SYS_MBUF_H_ */ Index: src/sys/sys/module.h diff -u src/sys/sys/module.h:1.28 src/sys/sys/module.h:1.29 --- src/sys/sys/module.h:1.28 Tue Oct 18 08:25:30 2011 +++ src/sys/sys/module.h Sun Nov 20 18:37:00 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: module.h,v 1.28 2011/10/18 12:25:30 jmcneill Exp $ */ +/* $NetBSD: module.h,v 1.29 2011/11/20 23:37:00 christos Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -141,8 +141,10 @@ int module_find_section(const char *, vo void module_thread_kick(void); void module_load_vfs_init(void); -void module_whatis(uintptr_t, void (*)(const char *, ...)); -void module_print_list(void (*)(const char *, ...)); +void module_whatis(uintptr_t, void (*)(const char *, ...) + __attribute__((__format__(__printf__, 1, 2)))); +void module_print_list(void (*)(const char *, ...) + __attribute__((__format__(__printf__, 1, 2)))); #ifdef _MODULE_INTERNAL extern Index: src/sys/sys/mqueue.h diff -u src/sys/sys/mqueue.h:1.14 src/sys/sys/mqueue.h:1.15 --- src/sys/sys/mqueue.h:1.14 Mon Sep 26 21:40:32 2011 +++ src/sys/sys/mqueue.h Sun Nov 20 18:37:00 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mqueue.h,v 1.14 2011/09/27 01:40:32 christos Exp $ */ +/* $NetBSD: mqueue.h,v 1.15 2011/11/20 23:37:00 christos Exp $ */ /* * Copyright (c) 2007-2009 Mindaugas Rasiukevicius <rmind at NetBSD org> @@ -109,7 +109,8 @@ typedef struct mq_msg { } mq_msg_t; /* Prototypes */ -void mqueue_print_list(void (*pr)(const char *, ...)); +void mqueue_print_list(void (*pr)(const char *, ...) + __attribute__((__format__(__printf__, 1, 2)))); int mq_send1(mqd_t, const char *, size_t, u_int, struct timespec *); int mq_recv1(mqd_t, void *, size_t, u_int *, struct timespec *, ssize_t *); Index: src/sys/sys/vmem.h diff -u src/sys/sys/vmem.h:1.14 src/sys/sys/vmem.h:1.15 --- src/sys/sys/vmem.h:1.14 Fri Sep 2 18:25:08 2011 +++ src/sys/sys/vmem.h Sun Nov 20 18:37:00 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: vmem.h,v 1.14 2011/09/02 22:25:08 dyoung Exp $ */ +/* $NetBSD: vmem.h,v 1.15 2011/11/20 23:37:00 christos Exp $ */ /*- * Copyright (c)2006 YAMAMOTO Takashi, @@ -58,9 +58,12 @@ int vmem_add(vmem_t *, vmem_addr_t, vmem vmem_size_t vmem_roundup_size(vmem_t *, vmem_size_t); bool vmem_reap(vmem_t *); void vmem_rehash_start(void); -void vmem_whatis(uintptr_t, void (*)(const char *, ...)); -void vmem_print(uintptr_t, const char *, void (*)(const char *, ...)); -void vmem_printall(const char *, void (*)(const char *, ...)); +void vmem_whatis(uintptr_t, void (*)(const char *, ...) + __attribute__((__format__(__printf__, 1, 2)))); +void vmem_print(uintptr_t, const char *, void (*)(const char *, ...) + __attribute__((__format__(__printf__, 1, 2)))); +void vmem_printall(const char *, void (*)(const char *, ...) + __attribute__((__format__(__printf__, 1, 2)))); /* vm_flag_t */ #define VM_SLEEP 0x00000001 Index: src/sys/sys/namei.h diff -u src/sys/sys/namei.h:1.77 src/sys/sys/namei.h:1.78 --- src/sys/sys/namei.h:1.77 Sun Apr 24 14:46:24 2011 +++ src/sys/sys/namei.h Sun Nov 20 18:37:00 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: namei.h,v 1.77 2011/04/24 18:46:24 rmind Exp $ */ +/* $NetBSD: namei.h,v 1.78 2011/11/20 23:37:00 christos Exp $ */ /* @@ -271,7 +271,8 @@ void nchinit(void); void nchreinit(void); void cache_cpu_init(struct cpu_info *); void cache_purgevfs(struct mount *); -void namecache_print(struct vnode *, void (*)(const char *, ...)); +void namecache_print(struct vnode *, void (*)(const char *, ...) + __attribute__((__format__(__printf__, 1, 2)))); #endif Index: src/sys/sys/pool.h diff -u src/sys/sys/pool.h:1.70 src/sys/sys/pool.h:1.71 --- src/sys/sys/pool.h:1.70 Thu Jun 3 06:40:17 2010 +++ src/sys/sys/pool.h Sun Nov 20 18:37:00 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pool.h,v 1.70 2010/06/03 10:40:17 pooka Exp $ */ +/* $NetBSD: pool.h,v 1.71 2011/11/20 23:37:00 christos Exp $ */ /*- * Copyright (c) 1997, 1998, 1999, 2000, 2007 The NetBSD Foundation, Inc. @@ -302,8 +302,9 @@ bool pool_drain_end(struct pool *, uint */ void pool_print(struct pool *, const char *); void pool_printit(struct pool *, const char *, - void (*)(const char *, ...)); -void pool_printall(const char *, void (*)(const char *, ...)); + void (*)(const char *, ...) __attribute__((__format__(__printf__, 1, 2)))); +void pool_printall(const char *, void (*)(const char *, ...) + __attribute__((__format__(__printf__, 1, 2)))); int pool_chk(struct pool *, const char *); /* @@ -333,7 +334,8 @@ void pool_cache_cpu_init(struct cpu_inf #define pool_cache_put(pc, o) pool_cache_put_paddr((pc), (o), \ POOL_PADDR_INVALID) -void pool_whatis(uintptr_t, void (*)(const char *, ...)); +void pool_whatis(uintptr_t, void (*)(const char *, ...) + __attribute__((__format__(__printf__, 1, 2)))); #endif /* _KERNEL */ #endif /* _SYS_POOL_H_ */ Index: src/sys/sys/sched.h diff -u src/sys/sys/sched.h:1.73 src/sys/sys/sched.h:1.74 --- src/sys/sys/sched.h:1.73 Sun Aug 7 09:33:02 2011 +++ src/sys/sys/sched.h Sun Nov 20 18:37:00 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: sched.h,v 1.73 2011/08/07 13:33:02 rmind Exp $ */ +/* $NetBSD: sched.h,v 1.74 2011/11/20 23:37:00 christos Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2002, 2007, 2008 The NetBSD Foundation, Inc. @@ -248,7 +248,8 @@ void setrunnable(struct lwp *); void sched_setrunnable(struct lwp *); struct cpu_info *sched_takecpu(struct lwp *); -void sched_print_runqueue(void (*pr)(const char *, ...)); +void sched_print_runqueue(void (*pr)(const char *, ...) + __attribute__((__format__(__printf__, 1, 2)))); /* Dispatching */ bool kpreempt(uintptr_t); Index: src/sys/sys/sleepq.h diff -u src/sys/sys/sleepq.h:1.19 src/sys/sys/sleepq.h:1.20 --- src/sys/sys/sleepq.h:1.19 Fri Dec 17 20:36:20 2010 +++ src/sys/sys/sleepq.h Sun Nov 20 18:37:00 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: sleepq.h,v 1.19 2010/12/18 01:36:20 rmind Exp $ */ +/* $NetBSD: sleepq.h,v 1.20 2011/11/20 23:37:00 christos Exp $ */ /*- * Copyright (c) 2002, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -171,7 +171,8 @@ turnstile_t *turnstile_lookup(wchan_t); void turnstile_exit(wchan_t); void turnstile_block(turnstile_t *, int, wchan_t, syncobj_t *); void turnstile_wakeup(turnstile_t *, int, int, lwp_t *); -void turnstile_print(volatile void *, void (*)(const char *, ...)); +void turnstile_print(volatile void *, void (*)(const char *, ...) + __attribute__((__format__(__printf__, 1, 2)))); void turnstile_unsleep(lwp_t *, bool); void turnstile_changepri(lwp_t *, pri_t); Index: src/sys/sys/vnode.h diff -u src/sys/sys/vnode.h:1.233 src/sys/sys/vnode.h:1.234 --- src/sys/sys/vnode.h:1.233 Mon Jun 27 07:52:24 2011 +++ src/sys/sys/vnode.h Sun Nov 20 18:37:00 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: vnode.h,v 1.233 2011/06/27 11:52:24 uch Exp $ */ +/* $NetBSD: vnode.h,v 1.234 2011/11/20 23:37:00 christos Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -618,8 +618,10 @@ void vfs_getnewfsid(struct mount *); int vfs_drainvnodes(long); void vfs_timestamp(struct timespec *); #if defined(DDB) || defined(DEBUGPRINT) -void vfs_vnode_print(struct vnode *, int, void (*)(const char *, ...)); -void vfs_mount_print(struct mount *, int, void (*)(const char *, ...)); +void vfs_vnode_print(struct vnode *, int, void (*)(const char *, ...) + __attribute__((__format__(__printf__, 1, 2)))); +void vfs_mount_print(struct mount *, int, void (*)(const char *, ...) + __attribute__((__format__(__printf__, 1, 2)))); #endif /* DDB */ #endif /* _KERNEL */