Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ofw Rename of_getprop_bool to of_hasprop and make of...



details:   https://anonhg.NetBSD.org/src/rev/489ed5b07e72
branches:  trunk
changeset: 353345:489ed5b07e72
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sun Apr 30 16:46:09 2017 +0000

description:
Rename of_getprop_bool to of_hasprop and make of_getprop_bool an alias.

diffstat:

 sys/dev/ofw/ofw_subr.c |  9 ++++-----
 sys/dev/ofw/openfirm.h |  5 +++--
 2 files changed, 7 insertions(+), 7 deletions(-)

diffs (51 lines):

diff -r e9f69a223b4e -r 489ed5b07e72 sys/dev/ofw/ofw_subr.c
--- a/sys/dev/ofw/ofw_subr.c    Sun Apr 30 16:02:48 2017 +0000
+++ b/sys/dev/ofw/ofw_subr.c    Sun Apr 30 16:46:09 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ofw_subr.c,v 1.27 2015/12/16 19:33:39 jmcneill Exp $   */
+/*     $NetBSD: ofw_subr.c,v 1.28 2017/04/30 16:46:09 jmcneill Exp $   */
 
 /*
  * Copyright 1998
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofw_subr.c,v 1.27 2015/12/16 19:33:39 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofw_subr.c,v 1.28 2017/04/30 16:46:09 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -445,11 +445,10 @@
 }
 
 /*
- * Get the value of a boolean property. If the property is present,
- * return true. Otherwise, return false.
+ * Returns true if the specified property is present.
  */
 bool
-of_getprop_bool(int node, const char *prop)
+of_hasprop(int node, const char *prop)
 {
        return OF_getproplen(node, prop) >= 0;
 }
diff -r e9f69a223b4e -r 489ed5b07e72 sys/dev/ofw/openfirm.h
--- a/sys/dev/ofw/openfirm.h    Sun Apr 30 16:02:48 2017 +0000
+++ b/sys/dev/ofw/openfirm.h    Sun Apr 30 16:46:09 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: openfirm.h,v 1.33 2015/12/16 19:33:39 jmcneill Exp $   */
+/*     $NetBSD: openfirm.h,v 1.34 2017/04/30 16:46:09 jmcneill Exp $   */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -120,7 +120,8 @@
 
 void   of_enter_i2c_devs(prop_dictionary_t, int, size_t, int);
 
-bool   of_getprop_bool(int, const char *);
+bool   of_hasprop(int, const char *);
+#define of_getprop_bool        of_hasprop
 int    of_getprop_uint32(int, const char *, uint32_t *);
 
 #endif /*_OPENFIRM_H_*/



Home | Main Index | Thread Index | Old Index