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

This commit is contained in:
pgoyette 2017-04-25 08:46:38 +00:00
parent 0604df8a87
commit ab5e69493e
1 changed files with 6 additions and 6 deletions

View File

@ -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 @@ 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';