Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Update for proplib(3) API changes.



details:   https://anonhg.NetBSD.org/src/rev/017810c3f60f
branches:  trunk
changeset: 934252:017810c3f60f
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Mon Jun 08 20:14:24 2020 +0000

description:
Update for proplib(3) API changes.

diffstat:

 sys/dev/sysmon/swsensor.c           |   6 +++---
 sys/dev/sysmon/sysmon_envsys.c      |  12 ++++++------
 sys/dev/sysmon/sysmon_envsys_util.c |   8 ++++----
 sys/dev/sysmon/sysmon_power.c       |   6 +++---
 sys/kern/kern_veriexec.c            |   8 ++++----
 5 files changed, 20 insertions(+), 20 deletions(-)

diffs (170 lines):

diff -r 8b81bfe608ee -r 017810c3f60f sys/dev/sysmon/swsensor.c
--- a/sys/dev/sysmon/swsensor.c Mon Jun 08 19:50:10 2020 +0000
+++ b/sys/dev/sysmon/swsensor.c Mon Jun 08 20:14:24 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: swsensor.c,v 1.16 2020/03/16 21:20:09 pgoyette Exp $ */
+/*     $NetBSD: swsensor.c,v 1.17 2020/06/08 20:18:13 thorpej Exp $ */
 /*
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: swsensor.c,v 1.16 2020/03/16 21:20:09 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: swsensor.c,v 1.17 2020/06/08 20:18:13 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -212,7 +212,7 @@
                        return ENOMEM;
 
                while ((obj = prop_object_iterator_next(iter)) != NULL) {
-                       key = prop_dictionary_keysym_cstring_nocopy(obj);
+                       key = prop_dictionary_keysym_value(obj);
                        po  = prop_dictionary_get_keysym(pd, obj);
                        type = prop_object_type(po);
                        if (type == PROP_TYPE_NUMBER)
diff -r 8b81bfe608ee -r 017810c3f60f sys/dev/sysmon/sysmon_envsys.c
--- a/sys/dev/sysmon/sysmon_envsys.c    Mon Jun 08 19:50:10 2020 +0000
+++ b/sys/dev/sysmon/sysmon_envsys.c    Mon Jun 08 20:14:24 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sysmon_envsys.c,v 1.145 2020/06/01 21:54:47 riastradh Exp $    */
+/*     $NetBSD: sysmon_envsys.c,v 1.146 2020/06/08 20:18:13 thorpej Exp $      */
 
 /*-
  * Copyright (c) 2007, 2008 Juan Romero Pardines.
@@ -64,7 +64,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.145 2020/06/01 21:54:47 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.146 2020/06/08 20:18:13 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -267,7 +267,7 @@
                                return EINVAL;
                        }
                        
-                       devname = prop_dictionary_keysym_cstring_nocopy(obj);
+                       devname = prop_dictionary_keysym_value(obj);
                        DPRINTF(("%s: processing the '%s' array requests\n",
                            __func__, devname));
 
@@ -950,9 +950,9 @@
                DPRINTFOBJ(("%s: iterating over dictionary\n", __func__));
                while ((obj = prop_object_iterator_next(iter2)) != NULL) {
                        DPRINTFOBJ(("%s: obj=%s\n", __func__,
-                           prop_dictionary_keysym_cstring_nocopy(obj)));
+                           prop_dictionary_keysym_value(obj)));
                        prop_dictionary_remove(dict,
-                           prop_dictionary_keysym_cstring_nocopy(obj));
+                           prop_dictionary_keysym_value(obj));
                        prop_object_iterator_reset(iter2);
                }
                prop_object_iterator_release(iter2);
@@ -1848,7 +1848,7 @@
                if (obj1 && prop_object_type(obj1) == PROP_TYPE_NUMBER) {
                        targetfound = true;
                        refresh_timo =
-                           prop_number_unsigned_integer_value(obj1);
+                           prop_number_unsigned_value(obj1);
                        if (refresh_timo < 1)
                                error = EINVAL;
                        else {
diff -r 8b81bfe608ee -r 017810c3f60f sys/dev/sysmon/sysmon_envsys_util.c
--- a/sys/dev/sysmon/sysmon_envsys_util.c       Mon Jun 08 19:50:10 2020 +0000
+++ b/sys/dev/sysmon/sysmon_envsys_util.c       Mon Jun 08 20:14:24 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sysmon_envsys_util.c,v 1.5 2007/11/16 08:00:16 xtraeme Exp $ */
+/* $NetBSD: sysmon_envsys_util.c,v 1.6 2020/06/08 20:18:13 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2007 Juan Romero Pardines.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys_util.c,v 1.5 2007/11/16 08:00:16 xtraeme Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys_util.c,v 1.6 2020/06/08 20:18:13 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -78,7 +78,7 @@
 
        obj = prop_dictionary_get(dict, key);
        if (obj) {
-               if (!prop_number_equals_integer(obj, val)) {
+               if (!prop_number_equals_signed(obj, val)) {
                        if (!prop_dictionary_set_int32(dict, key, val)) {
                                DPRINTF(("%s: (up) set_int32 %s:%d\n",
                                    __func__, key, val));
@@ -105,7 +105,7 @@
 
        obj = prop_dictionary_get(dict, key);
        if (obj) {
-               if (!prop_number_equals_unsigned_integer(obj, val)) {
+               if (!prop_number_equals_unsigned(obj, val)) {
                        if (!prop_dictionary_set_uint32(dict, key, val)) {
                                DPRINTF(("%s: (up) set_uint32 %s:%d\n",
                                    __func__, key, val));
diff -r 8b81bfe608ee -r 017810c3f60f sys/dev/sysmon/sysmon_power.c
--- a/sys/dev/sysmon/sysmon_power.c     Mon Jun 08 19:50:10 2020 +0000
+++ b/sys/dev/sysmon/sysmon_power.c     Mon Jun 08 20:14:24 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sysmon_power.c,v 1.62 2020/01/01 22:57:17 thorpej Exp $        */
+/*     $NetBSD: sysmon_power.c,v 1.63 2020/06/08 20:18:13 thorpej Exp $        */
 
 /*-
  * Copyright (c) 2007 Juan Romero Pardines.
@@ -69,7 +69,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sysmon_power.c,v 1.62 2020/01/01 22:57:17 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysmon_power.c,v 1.63 2020/06/08 20:18:13 thorpej Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -792,7 +792,7 @@
 
        while ((obj = prop_object_iterator_next(iter)) != NULL) {
                prop_dictionary_remove(ped->dict,
-                   prop_dictionary_keysym_cstring_nocopy(obj));
+                   prop_dictionary_keysym_value(obj));
                prop_object_iterator_reset(iter);
        }
 
diff -r 8b81bfe608ee -r 017810c3f60f sys/kern/kern_veriexec.c
--- a/sys/kern/kern_veriexec.c  Mon Jun 08 19:50:10 2020 +0000
+++ b/sys/kern/kern_veriexec.c  Mon Jun 08 20:14:24 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_veriexec.c,v 1.23 2020/02/21 00:26:22 joerg Exp $ */
+/*     $NetBSD: kern_veriexec.c,v 1.24 2020/06/08 20:14:24 thorpej Exp $       */
 
 /*-
  * Copyright (c) 2005, 2006 Elad Efrat <elad%NetBSD.org@localhost>
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_veriexec.c,v 1.23 2020/02/21 00:26:22 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_veriexec.c,v 1.24 2020/06/08 20:14:24 thorpej Exp $");
 
 #include "opt_veriexec.h"
 
@@ -1213,11 +1213,11 @@
 {
        if (vfe->filename)
                prop_dictionary_set(rdict, "file",
-                   prop_string_create_cstring(vfe->filename));
+                   prop_string_create_copy(vfe->filename));
        prop_dictionary_set_uint8(rdict, "entry-type", vfe->type);
        prop_dictionary_set_uint8(rdict, "status", vfe->status);
        prop_dictionary_set(rdict, "fp-type",
-           prop_string_create_cstring(vfe->ops->type));
+           prop_string_create_copy(vfe->ops->type));
        prop_dictionary_set(rdict, "fp",
            prop_data_create_data(vfe->fp, vfe->ops->hash_len));
 }



Home | Main Index | Thread Index | Old Index