Module Name: src Committed By: pgoyette Date: Fri Apr 28 03:41:26 UTC 2017
Modified Files: src/sys/kern [prg-localcount2]: subr_devsw.c Log Message: Use printf() instead of aprintf_normal(), fix the sense of a comparison To generate a diff of this commit: cvs rdiff -u -r1.37.2.2 -r1.37.2.3 src/sys/kern/subr_devsw.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/kern/subr_devsw.c diff -u src/sys/kern/subr_devsw.c:1.37.2.2 src/sys/kern/subr_devsw.c:1.37.2.3 --- src/sys/kern/subr_devsw.c:1.37.2.2 Fri Apr 28 02:36:10 2017 +++ src/sys/kern/subr_devsw.c Fri Apr 28 03:41:26 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_devsw.c,v 1.37.2.2 2017/04/28 02:36:10 pgoyette Exp $ */ +/* $NetBSD: subr_devsw.c,v 1.37.2.3 2017/04/28 03:41:26 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.37.2.2 2017/04/28 02:36:10 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_devsw.c,v 1.37.2.3 2017/04/28 03:41:26 pgoyette Exp $"); #ifdef _KERNEL_OPT #include "opt_dtrace.h" @@ -151,19 +151,18 @@ devsw_attach(const char *devname, if (bdev != NULL) { if (bdev->d_localcount == NULL) { - aprint_normal("%s: %s's bdevsw has no localcount", + printf("%s: %s's bdevsw has no localcount", __func__, devname); return EINVAL; } if (bdev->d_localcount == cdev->d_localcount) { - aprint_normal("%s: %s uses same localcount for both " - cdevsw and bdevsw", __func__, devname); + printf("%s: %s uses same localcount for both " + "cdevsw and bdevsw", __func__, devname); return EINVAL; } } - if (cdev != NULL) { - aprint_normal("%s: %s's cdevsw has no localcount", - __func__, devname); + if (cdev == NULL) { + printf("%s: %s's cdevsw has no localcount", __func__, devname); return EINVAL; } @@ -308,8 +307,7 @@ bdevsw_attach(const struct bdevsw *devsw return (EEXIST); if (devsw->d_localcount == NULL) { - aprint_normal("%s: %s's bdevsw has no localcount", - __func__, devname); + printf("%s: bdevsw has no localcount", __func__); return EINVAL; } localcount_init(devsw->d_localcount); @@ -365,8 +363,7 @@ cdevsw_attach(const struct cdevsw *devsw return (EEXIST); if (devsw->d_localcount == NULL) { - aprint_normal("%s: %s's cdevsw has no localcount", - __func__, devname); + printf("%s: cdevsw has no localcount", __func__); return EINVAL; } localcount_init(devsw->d_localcount);