From ab5e69493e742d45fb8a02c29fa0db16c2900f54 Mon Sep 17 00:00:00 2001 From: pgoyette Date: Tue, 25 Apr 2017 08:46:38 +0000 Subject: [PATCH] Use __func__ for routine name in printf() calls. NFC intended. --- sys/kern/subr_devsw.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/kern/subr_devsw.c b/sys/kern/subr_devsw.c index 6d0d6988baf1..16877dcbe694 100644 --- a/sys/kern/subr_devsw.c +++ b/sys/kern/subr_devsw.c @@ -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 -__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 @@ bdevsw_attach(const struct bdevsw *devsw, devmajor_t *devmajor) } if (*devmajor >= MAXDEVSW) { - printf("bdevsw_attach: block majors exhausted"); + printf("%s: block majors exhausted", __func__); return (ENOMEM); } @@ -299,7 +299,7 @@ cdevsw_attach(const struct cdevsw *devsw, devmajor_t *devmajor) } if (*devmajor >= MAXDEVSW) { - printf("cdevsw_attach: character majors exhausted"); + printf("%s: character majors exhausted", __func__); return (ENOMEM); } @@ -551,7 +551,7 @@ devsw_name2blk(const char *name, char *devname, size_t devnamelen) 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 @@ devsw_name2chr(const char *name, char *devname, size_t devnamelen) 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';