Source-Changes-HG archive

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

[src/prg-localcount2]: src/sys/kern Use printf() instead of aprintf_normal(), ...



details:   https://anonhg.NetBSD.org/src/rev/f2284e55dfff
branches:  prg-localcount2
changeset: 823517:f2284e55dfff
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Fri Apr 28 03:41:26 2017 +0000

description:
Use printf() instead of aprintf_normal(), fix the sense of a comparison

diffstat:

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

diffs (63 lines):

diff -r 1b8961c0cabb -r f2284e55dfff sys/kern/subr_devsw.c
--- a/sys/kern/subr_devsw.c     Fri Apr 28 02:36:10 2017 +0000
+++ b/sys/kern/subr_devsw.c     Fri Apr 28 03:41:26 2017 +0000
@@ -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 @@
 
        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 @@
                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 @@
                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);



Home | Main Index | Thread Index | Old Index