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/fdfea797952d
branches:  trunk
changeset: 1010866:fdfea797952d
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Thu Jun 11 02:28:01 2020 +0000

description:
Update for proplib(3) API changes.

diffstat:

 sys/kern/kern_drvctl.c   |  12 ++++++------
 sys/kern/kern_pmf.c      |   6 +++---
 sys/kern/kern_veriexec.c |  11 +++++------
 3 files changed, 14 insertions(+), 15 deletions(-)

diffs (120 lines):

diff -r da41677c69e9 -r fdfea797952d sys/kern/kern_drvctl.c
--- a/sys/kern/kern_drvctl.c    Thu Jun 11 02:21:26 2020 +0000
+++ b/sys/kern/kern_drvctl.c    Thu Jun 11 02:28:01 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_drvctl.c,v 1.44 2018/09/18 01:25:09 mrg Exp $ */
+/* $NetBSD: kern_drvctl.c,v 1.45 2020/06/11 02:28:01 thorpej Exp $ */
 
 /*
  * Copyright (c) 2004
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_drvctl.c,v 1.44 2018/09/18 01:25:09 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_drvctl.c,v 1.45 2020/06/11 02:28:01 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -144,7 +144,7 @@
        }
 
        /* Fill in mandatory member */
-       if (!prop_dictionary_set_cstring_nocopy(ev, "event", event)) {
+       if (!prop_dictionary_set_string_nocopy(ev, "event", event)) {
                prop_object_release(ev);
                mutex_exit(&drvctl_lock);
                return 0;
@@ -468,7 +468,7 @@
        
        for (dev = deviter_first(&di, 0); dev != NULL;
             dev = deviter_next(&di)) {
-               if (prop_string_equals_cstring(devname_string,
+               if (prop_string_equals_string(devname_string,
                                               device_xname(dev))) {
                        prop_dictionary_set(results_dict, "drvctl-result-data",
                            device_properties(dev));
@@ -527,8 +527,8 @@
        }
 
        for (dcd = drvctl_command_table; dcd->dcd_name != NULL; dcd++) {
-               if (prop_string_equals_cstring(command_string,
-                                              dcd->dcd_name))
+               if (prop_string_equals_string(command_string,
+                                             dcd->dcd_name))
                        break;
        }
 
diff -r da41677c69e9 -r fdfea797952d sys/kern/kern_pmf.c
--- a/sys/kern/kern_pmf.c       Thu Jun 11 02:21:26 2020 +0000
+++ b/sys/kern/kern_pmf.c       Thu Jun 11 02:28:01 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_pmf.c,v 1.43 2020/05/12 10:02:56 jdolecek Exp $ */
+/* $NetBSD: kern_pmf.c,v 1.44 2020/06/11 02:28:01 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_pmf.c,v 1.43 2020/05/12 10:02:56 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_pmf.c,v 1.44 2020/06/11 02:28:01 thorpej Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -393,7 +393,7 @@
        if (pmf_platform == NULL)
                return false;
 
-       return prop_dictionary_set_cstring(pmf_platform, key, value);
+       return prop_dictionary_set_string(pmf_platform, key, value);
 }
 
 const char *
diff -r da41677c69e9 -r fdfea797952d sys/kern/kern_veriexec.c
--- a/sys/kern/kern_veriexec.c  Thu Jun 11 02:21:26 2020 +0000
+++ b/sys/kern/kern_veriexec.c  Thu Jun 11 02:28:01 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_veriexec.c,v 1.24 2020/06/08 20:14:24 thorpej Exp $       */
+/*     $NetBSD: kern_veriexec.c,v 1.25 2020/06/11 02:28:01 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.24 2020/06/08 20:14:24 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_veriexec.c,v 1.25 2020/06/11 02:28:01 thorpej Exp $");
 
 #include "opt_veriexec.h"
 
@@ -1064,8 +1064,7 @@
        rw_init(&vfe->lock);
 
        /* Lookup fingerprint hashing algorithm. */
-       fp_type = prop_string_cstring_nocopy(prop_dictionary_get(dict,
-           "fp-type"));
+       fp_type = prop_string_value(prop_dictionary_get(dict, "fp-type"));
        if ((vfe->ops = veriexec_fpops_lookup(fp_type)) == NULL) {
                log(LOG_ERR, "Veriexec: Invalid or unknown fingerprint type "
                    "`%s' for file `%s'.\n", fp_type, file);
@@ -1082,7 +1081,7 @@
        }
 
        vfe->fp = kmem_alloc(vfe->ops->hash_len, KM_SLEEP);
-       memcpy(vfe->fp, prop_data_data_nocopy(prop_dictionary_get(dict, "fp")),
+       memcpy(vfe->fp, prop_data_value(prop_dictionary_get(dict, "fp")),
            vfe->ops->hash_len);
 
        rw_enter(&veriexec_op_lock, RW_WRITER);
@@ -1219,7 +1218,7 @@
        prop_dictionary_set(rdict, "fp-type",
            prop_string_create_copy(vfe->ops->type));
        prop_dictionary_set(rdict, "fp",
-           prop_data_create_data(vfe->fp, vfe->ops->hash_len));
+           prop_data_create_copy(vfe->fp, vfe->ops->hash_len));
 }
 
 int



Home | Main Index | Thread Index | Old Index