Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Use __func__ for routine name in printf() calls. N...



details:   https://anonhg.NetBSD.org/src/rev/f62321276c43
branches:  trunk
changeset: 823486:f62321276c43
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Tue Apr 25 08:46:38 2017 +0000

description:
Use __func__ for routine name in printf() calls.  NFC intended.

diffstat:

 sys/kern/subr_devsw.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (54 lines):

diff -r 6bcc60db47eb -r f62321276c43 sys/kern/subr_devsw.c
--- a/sys/kern/subr_devsw.c     Tue Apr 25 06:08:24 2017 +0000
+++ b/sys/kern/subr_devsw.c     Tue Apr 25 08:46:38 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr_devsw.c,v 1.36 2016/12/16 23:35:04 riastradh Exp $        */
+/*     $NetBSD: subr_devsw.c,v 1.37 2017/04/25 08:46:38 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 2001, 2002, 2007, 2008 The NetBSD Foundation, Inc.
@@ -69,7 +69,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_devsw.c,v 1.36 2016/12/16 23:35:04 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_devsw.c,v 1.37 2017/04/25 08:46:38 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_dtrace.h"
@@ -252,7 +252,7 @@
        }
 
        if (*devmajor >= MAXDEVSW) {
-               printf("bdevsw_attach: block majors exhausted");
+               printf("%s: block majors exhausted", __func__);
                return (ENOMEM);
        }
 
@@ -299,7 +299,7 @@
        }
 
        if (*devmajor >= MAXDEVSW) {
-               printf("cdevsw_attach: character majors exhausted");
+               printf("%s: character majors exhausted", __func__);
                return (ENOMEM);
        }
 
@@ -551,7 +551,7 @@
                if (devname != NULL) {
 #ifdef DEVSW_DEBUG
                        if (strlen(conv->d_name) >= devnamelen)
-                               printf("devsw_name2blk: too short buffer");
+                               printf("%s: too short buffer", __func__);
 #endif /* DEVSW_DEBUG */
                        strncpy(devname, conv->d_name, devnamelen);
                        devname[devnamelen - 1] = '\0';
@@ -599,7 +599,7 @@
                if (devname != NULL) {
 #ifdef DEVSW_DEBUG
                        if (strlen(conv->d_name) >= devnamelen)
-                               printf("devsw_name2chr: too short buffer");
+                               printf("%s: too short buffer", __func__);
 #endif /* DEVSW_DEBUG */
                        strncpy(devname, conv->d_name, devnamelen);
                        devname[devnamelen - 1] = '\0';



Home | Main Index | Thread Index | Old Index