Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern printflike maintenance.



details:   https://anonhg.NetBSD.org/src/rev/ed32f4fb3149
branches:  trunk
changeset: 784761:ed32f4fb3149
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Feb 09 00:31:21 2013 +0000

description:
printflike maintenance.

diffstat:

 sys/kern/init_main.c      |   6 +++---
 sys/kern/kern_runq.c      |   7 +++----
 sys/kern/subr_autoconf.c  |  10 ++++++----
 sys/kern/subr_blist.c     |   6 +++---
 sys/kern/subr_disk.c      |   6 +++---
 sys/kern/subr_lockdebug.c |   7 ++++---
 sys/kern/subr_pool.c      |   8 ++++----
 sys/kern/subr_vmem.c      |   9 +++++----
 sys/kern/tty.c            |   6 +++---
 sys/kern/vfs_vnode.c      |   6 +++---
 10 files changed, 37 insertions(+), 34 deletions(-)

diffs (296 lines):

diff -r 7ab58a261fe8 -r ed32f4fb3149 sys/kern/init_main.c
--- a/sys/kern/init_main.c      Fri Feb 08 23:24:02 2013 +0000
+++ b/sys/kern/init_main.c      Sat Feb 09 00:31:21 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: init_main.c,v 1.445 2012/07/29 18:05:48 mlelstv Exp $  */
+/*     $NetBSD: init_main.c,v 1.446 2013/02/09 00:31:21 christos Exp $ */
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.445 2012/07/29 18:05:48 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.446 2013/02/09 00:31:21 christos Exp $");
 
 #include "opt_ddb.h"
 #include "opt_ipsec.h"
@@ -1125,7 +1125,7 @@
        static char notice[] = " Notice: this software is "
            "protected by copyright";
        char pbuf[81];
-       void (*pr)(const char *, ...);
+       void (*pr)(const char *, ...) __printflike(1, 2);
        int i;
 
        if ((boothowto & AB_SILENT) != 0) {
diff -r 7ab58a261fe8 -r ed32f4fb3149 sys/kern/kern_runq.c
--- a/sys/kern/kern_runq.c      Fri Feb 08 23:24:02 2013 +0000
+++ b/sys/kern/kern_runq.c      Sat Feb 09 00:31:21 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_runq.c,v 1.35 2012/08/30 02:25:35 matt Exp $      */
+/*     $NetBSD: kern_runq.c,v 1.36 2013/02/09 00:31:21 christos Exp $  */
 
 /*
  * Copyright (c) 2007, 2008 Mindaugas Rasiukevicius <rmind at NetBSD org>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_runq.c,v 1.35 2012/08/30 02:25:35 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_runq.c,v 1.36 2013/02/09 00:31:21 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -864,8 +864,7 @@
 #ifdef DDB
 
 void
-sched_print_runqueue(void (*pr)(const char *, ...)
-    __attribute__((__format__(__printf__,1,2))))
+sched_print_runqueue(void (*pr)(const char *, ...))
 {
        runqueue_t *ci_rq;
        struct cpu_info *ci, *tci;
diff -r 7ab58a261fe8 -r ed32f4fb3149 sys/kern/subr_autoconf.c
--- a/sys/kern/subr_autoconf.c  Fri Feb 08 23:24:02 2013 +0000
+++ b/sys/kern/subr_autoconf.c  Sat Feb 09 00:31:21 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_autoconf.c,v 1.225 2013/01/10 10:15:59 mlelstv Exp $ */
+/* $NetBSD: subr_autoconf.c,v 1.226 2013/02/09 00:31:21 christos Exp $ */
 
 /*
  * Copyright (c) 1996, 2000 Christopher G. Demetriou
@@ -77,7 +77,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.225 2013/01/10 10:15:59 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.226 2013/02/09 00:31:21 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -239,7 +239,8 @@
        cfdriver_fn drv_do, cfdriver_fn drv_undo,
        const char *style, bool dopanic)
 {
-       void (*pr)(const char *, ...) = dopanic ? panic : printf;
+       void (*pr)(const char *, ...) __printflike(1, 2) =
+           dopanic ? panic : printf;
        int i = 0, error = 0, e2;
 
        for (i = 0; cfdriverv[i] != NULL; i++) {
@@ -270,7 +271,8 @@
        const char *style, bool dopanic)
 {
        const struct cfattachinit *cfai = NULL;
-       void (*pr)(const char *, ...) = dopanic ? panic : printf;
+       void (*pr)(const char *, ...) __printflike(1, 2) =
+           dopanic ? panic : printf;
        int j = 0, error = 0, e2;
 
        for (cfai = &cfattachv[0]; cfai->cfai_name != NULL; cfai++) {
diff -r 7ab58a261fe8 -r ed32f4fb3149 sys/kern/subr_blist.c
--- a/sys/kern/subr_blist.c     Fri Feb 08 23:24:02 2013 +0000
+++ b/sys/kern/subr_blist.c     Sat Feb 09 00:31:21 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr_blist.c,v 1.10 2011/04/24 18:46:22 rmind Exp $    */
+/*     $NetBSD: subr_blist.c,v 1.11 2013/02/09 00:31:21 christos Exp $ */
 
 /*-
  * Copyright (c) 1998 Matthew Dillon.  All Rights Reserved.
@@ -86,7 +86,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_blist.c,v 1.10 2011/04/24 18:46:22 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_blist.c,v 1.11 2013/02/09 00:31:21 christos Exp $");
 #if 0
 __FBSDID("$FreeBSD: src/sys/kern/subr_blist.c,v 1.17 2004/06/04 04:03:25 alc Exp $");
 #endif
@@ -118,7 +118,7 @@
 
 #include "../sys/blist.h"
 
-void panic(const char *ctl, ...);
+void panic(const char *ctl, ...) __printflike(1, 2);
 
 #endif
 
diff -r 7ab58a261fe8 -r ed32f4fb3149 sys/kern/subr_disk.c
--- a/sys/kern/subr_disk.c      Fri Feb 08 23:24:02 2013 +0000
+++ b/sys/kern/subr_disk.c      Sat Feb 09 00:31:21 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr_disk.c,v 1.100 2010/10/14 00:47:16 mrg Exp $      */
+/*     $NetBSD: subr_disk.c,v 1.101 2013/02/09 00:31:21 christos Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997, 1999, 2000, 2009 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_disk.c,v 1.100 2010/10/14 00:47:16 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_disk.c,v 1.101 2013/02/09 00:31:21 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -124,7 +124,7 @@
     int blkdone, const struct disklabel *lp)
 {
        int unit = DISKUNIT(bp->b_dev), part = DISKPART(bp->b_dev);
-       void (*pr)(const char *, ...);
+       void (*pr)(const char *, ...) __printflike(1, 2);
        char partname = 'a' + part;
        daddr_t sn;
 
diff -r 7ab58a261fe8 -r ed32f4fb3149 sys/kern/subr_lockdebug.c
--- a/sys/kern/subr_lockdebug.c Fri Feb 08 23:24:02 2013 +0000
+++ b/sys/kern/subr_lockdebug.c Sat Feb 09 00:31:21 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr_lockdebug.c,v 1.46 2012/08/04 12:38:20 christos Exp $     */
+/*     $NetBSD: subr_lockdebug.c,v 1.47 2013/02/09 00:31:21 christos Exp $     */
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_lockdebug.c,v 1.46 2012/08/04 12:38:20 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_lockdebug.c,v 1.47 2013/02/09 00:31:21 christos Exp $");
 
 #include "opt_ddb.h"
 
@@ -714,7 +714,8 @@
  *     Dump information about a lock on panic, or for DDB.
  */
 static void
-lockdebug_dump(lockdebug_t *ld, void (*pr)(const char *, ...))
+lockdebug_dump(lockdebug_t *ld, void (*pr)(const char *, ...)
+    __printflike(1, 2))
 {
        int sleeper = (ld->ld_flags & LD_SLEEPER);
 
diff -r 7ab58a261fe8 -r ed32f4fb3149 sys/kern/subr_pool.c
--- a/sys/kern/subr_pool.c      Fri Feb 08 23:24:02 2013 +0000
+++ b/sys/kern/subr_pool.c      Sat Feb 09 00:31:21 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr_pool.c,v 1.198 2012/08/28 15:52:19 christos Exp $ */
+/*     $NetBSD: subr_pool.c,v 1.199 2013/02/09 00:31:21 christos Exp $ */
 
 /*-
  * Copyright (c) 1997, 1999, 2000, 2002, 2007, 2008, 2010
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.198 2012/08/28 15:52:19 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.199 2013/02/09 00:31:21 christos Exp $");
 
 #include "opt_ddb.h"
 #include "opt_lockdebug.h"
@@ -203,9 +203,9 @@
 static void    pool_allocator_free(struct pool *, void *);
 
 static void pool_print_pagelist(struct pool *, struct pool_pagelist *,
-       void (*)(const char *, ...));
+       void (*)(const char *, ...) __printflike(1, 2));
 static void pool_print1(struct pool *, const char *,
-       void (*)(const char *, ...));
+       void (*)(const char *, ...) __printflike(1, 2));
 
 static int pool_chk_page(struct pool *, const char *,
                         struct pool_item_header *);
diff -r 7ab58a261fe8 -r ed32f4fb3149 sys/kern/subr_vmem.c
--- a/sys/kern/subr_vmem.c      Fri Feb 08 23:24:02 2013 +0000
+++ b/sys/kern/subr_vmem.c      Sat Feb 09 00:31:21 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr_vmem.c,v 1.81 2013/02/08 09:30:01 skrll Exp $     */
+/*     $NetBSD: subr_vmem.c,v 1.82 2013/02/09 00:31:21 christos Exp $  */
 
 /*-
  * Copyright (c)2006,2007,2008,2009 YAMAMOTO Takashi,
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_vmem.c,v 1.81 2013/02/08 09:30:01 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_vmem.c,v 1.82 2013/02/09 00:31:21 christos Exp $");
 
 #if defined(_KERNEL)
 #include "opt_ddb.h"
@@ -1423,7 +1423,8 @@
 
 #if defined(DDB) || defined(UNITTEST) || defined(VMEM_SANITY)
 
-static void bt_dump(const bt_t *, void (*)(const char *, ...));
+static void bt_dump(const bt_t *, void (*)(const char *, ...)
+    __printflike(1, 2));
 
 static const char *
 bt_type_string(int type)
@@ -1451,7 +1452,7 @@
 }
 
 static void
-vmem_dump(const vmem_t *vm , void (*pr)(const char *, ...))
+vmem_dump(const vmem_t *vm , void (*pr)(const char *, ...) __printflike(1, 2))
 {
        const bt_t *bt;
        int i;
diff -r 7ab58a261fe8 -r ed32f4fb3149 sys/kern/tty.c
--- a/sys/kern/tty.c    Fri Feb 08 23:24:02 2013 +0000
+++ b/sys/kern/tty.c    Sat Feb 09 00:31:21 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tty.c,v 1.256 2012/10/19 16:55:22 apb Exp $    */
+/*     $NetBSD: tty.c,v 1.257 2013/02/09 00:31:21 christos Exp $       */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tty.c,v 1.256 2012/10/19 16:55:22 apb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tty.c,v 1.257 2013/02/09 00:31:21 christos Exp $");
 
 #include "opt_compat_netbsd.h"
 
@@ -104,7 +104,7 @@
 static void    ttyecho(int, struct tty *);
 static void    ttyrubo(struct tty *, int);
 static void    ttyprintf_nolock(struct tty *, const char *fmt, ...)
-    __attribute__((__format__(__printf__,2,3)));
+    __printflike(2, 3);
 static int     proc_compare_wrapper(struct proc *, struct proc *);
 static void    ttysigintr(void *);
 
diff -r 7ab58a261fe8 -r ed32f4fb3149 sys/kern/vfs_vnode.c
--- a/sys/kern/vfs_vnode.c      Fri Feb 08 23:24:02 2013 +0000
+++ b/sys/kern/vfs_vnode.c      Sat Feb 09 00:31:21 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_vnode.c,v 1.17 2012/11/12 11:00:07 hannken Exp $   */
+/*     $NetBSD: vfs_vnode.c,v 1.18 2013/02/09 00:31:21 christos Exp $  */
 
 /*-
  * Copyright (c) 1997-2011 The NetBSD Foundation, Inc.
@@ -124,7 +124,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.17 2012/11/12 11:00:07 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.18 2013/02/09 00:31:21 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -173,7 +173,7 @@
 static void            vdrain_thread(void *);
 static void            vrele_thread(void *);
 static void            vnpanic(vnode_t *, const char *, ...)
-    __attribute__((__format__(__printf__, 2, 3)));
+    __printflike(2, 3);
 
 /* Routines having to do with the management of the vnode table. */
 extern int             (**dead_vnodeop_p)(void *);



Home | Main Index | Thread Index | Old Index