Source-Changes-HG archive

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

[src/trunk]: src fix proplib deprecation



details:   https://anonhg.NetBSD.org/src/rev/8744cc211aaa
branches:  trunk
changeset: 984076:8744cc211aaa
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Jun 21 03:04:27 2021 +0000

description:
fix proplib deprecation

diffstat:

 lib/libdm/libdm_ioctl.c           |  14 +++++++-------
 sbin/devpubd/devpubd.c            |   8 ++++----
 sys/arch/zaurus/zaurus/autoconf.c |   6 +++---
 sys/dev/i2c/adm1021.c             |   8 ++++----
 sys/dev/i2c/dbcool.c              |   6 +++---
 sys/dev/i2c/dstemp.c              |   8 ++++----
 sys/dev/i2c/i2c.c                 |   6 +++---
 sys/dev/i2c/lm75.c                |   6 +++---
 sys/dev/i2c/pcagpio.c             |   6 +++---
 sys/dev/i2c/pcf8574.c             |   6 +++---
 sys/dev/veriexec.c                |   8 ++++----
 sys/modules/panic/panic.c         |   6 +++---
 usr.bin/audiocfg/drvctl.c         |   8 ++++----
 usr.sbin/hdaudioctl/graph.c       |   8 ++++----
 usr.sbin/hdaudioctl/hdaudioctl.c  |   4 ++--
 15 files changed, 54 insertions(+), 54 deletions(-)

diffs (truncated from 466 to 300 lines):

diff -r fd4e785a250c -r 8744cc211aaa lib/libdm/libdm_ioctl.c
--- a/lib/libdm/libdm_ioctl.c   Mon Jun 21 03:01:23 2021 +0000
+++ b/lib/libdm/libdm_ioctl.c   Mon Jun 21 03:04:27 2021 +0000
@@ -266,7 +266,7 @@
 {
        char *name;
 
-       if (!prop_dictionary_get_cstring_nocopy(libdm_task->ldm_task,
+       if (!prop_dictionary_get_string(libdm_task->ldm_task,
            DM_IOCTL_NAME, (const char **)&name))
                return NULL;
 
@@ -291,7 +291,7 @@
 {
        char *uuid;
 
-       if (!prop_dictionary_get_cstring_nocopy(libdm_task->ldm_task,
+       if (!prop_dictionary_get_string(libdm_task->ldm_task,
            DM_IOCTL_UUID, (const char **)&uuid))
                return NULL;
 
@@ -304,7 +304,7 @@
 {
        char *command;
 
-       if (!prop_dictionary_get_cstring_nocopy(libdm_task->ldm_task,
+       if (!prop_dictionary_get_string(libdm_task->ldm_task,
            DM_IOCTL_COMMAND, (const char **)&command))
                return NULL;
 
@@ -755,7 +755,7 @@
 {
        char *target;
 
-       if (!prop_dictionary_get_cstring_nocopy(libdm_table->ldm_tbl, DM_TABLE_TYPE,
+       if (!prop_dictionary_get_string(libdm_table->ldm_tbl, DM_TABLE_TYPE,
            (const char **)&target))
                return NULL;
 
@@ -782,7 +782,7 @@
 {
        char *params;
 
-       if (!prop_dictionary_get_cstring_nocopy(libdm_table->ldm_tbl, DM_TABLE_PARAMS,
+       if (!prop_dictionary_get_string(libdm_table->ldm_tbl, DM_TABLE_PARAMS,
            (const char **)&params))
                return NULL;
 
@@ -816,7 +816,7 @@
 {
        char *name;
 
-       if (!prop_dictionary_get_cstring_nocopy(libdm_target->ldm_trgt,
+       if (!prop_dictionary_get_string(libdm_target->ldm_trgt,
            DM_TARGETS_NAME, (const char **)&name))
                return NULL;
 
@@ -860,7 +860,7 @@
 {
        char *name;
 
-       if (!prop_dictionary_get_cstring_nocopy(libdm_dev->ldm_dev,
+       if (!prop_dictionary_get_string(libdm_dev->ldm_dev,
            DM_DEV_NAME, (const char **)&name))
                return NULL;
 
diff -r fd4e785a250c -r 8744cc211aaa sbin/devpubd/devpubd.c
--- a/sbin/devpubd/devpubd.c    Mon Jun 21 03:01:23 2021 +0000
+++ b/sbin/devpubd/devpubd.c    Mon Jun 21 03:04:27 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: devpubd.c,v 1.6 2020/02/24 11:45:30 mlelstv Exp $      */
+/*     $NetBSD: devpubd.c,v 1.7 2021/06/21 03:14:12 christos Exp $     */
 
 /*-
  * Copyright (c) 2011 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -36,7 +36,7 @@
 #include <sys/cdefs.h>
 __COPYRIGHT("@(#) Copyright (c) 2011-2015\
 Jared D. McNeill <jmcneill%invisible.ca@localhost>. All rights reserved.");
-__RCSID("$NetBSD: devpubd.c,v 1.6 2020/02/24 11:45:30 mlelstv Exp $");
+__RCSID("$NetBSD: devpubd.c,v 1.7 2021/06/21 03:14:12 christos Exp $");
 
 #include <sys/queue.h>
 #include <sys/types.h>
@@ -144,8 +144,8 @@
                res = prop_dictionary_recv_ioctl(drvctl_fd, DRVGETEVENT, &ev);
                if (res)
                        err(EXIT_FAILURE, "DRVGETEVENT failed");
-               prop_dictionary_get_cstring_nocopy(ev, "event", &event);
-               prop_dictionary_get_cstring_nocopy(ev, "device", &device[0]);
+               prop_dictionary_get_string(ev, "event", &event);
+               prop_dictionary_get_string(ev, "device", &device[0]);
 
                printf("%s: event='%s', device='%s'\n", __func__,
                    event, device[0]);
diff -r fd4e785a250c -r 8744cc211aaa sys/arch/zaurus/zaurus/autoconf.c
--- a/sys/arch/zaurus/zaurus/autoconf.c Mon Jun 21 03:01:23 2021 +0000
+++ b/sys/arch/zaurus/zaurus/autoconf.c Mon Jun 21 03:04:27 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autoconf.c,v 1.13 2019/11/13 17:48:03 tsutsui Exp $    */
+/*     $NetBSD: autoconf.c,v 1.14 2021/06/21 03:05:24 christos Exp $   */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.13 2019/11/13 17:48:03 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.14 2021/06/21 03:05:24 christos Exp $");
 
 #include "opt_md.h"
 
@@ -227,7 +227,7 @@
         */
        if (device_is_a(dev, "iic") &&
            device_is_a(dev->dv_parent, "ziic")) {
-               (void)prop_dictionary_set_cstring_nocopy(device_properties(dev),
+               (void)prop_dictionary_set_string_nocopy(device_properties(dev),
                    I2C_PROP_INDIRECT_PROBE_STRATEGY, I2C_PROBE_STRATEGY_NONE);
        }
 }
diff -r fd4e785a250c -r 8744cc211aaa sys/dev/i2c/adm1021.c
--- a/sys/dev/i2c/adm1021.c     Mon Jun 21 03:01:23 2021 +0000
+++ b/sys/dev/i2c/adm1021.c     Mon Jun 21 03:04:27 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: adm1021.c,v 1.28 2021/06/15 04:41:01 mlelstv Exp $ */
+/*     $NetBSD: adm1021.c,v 1.29 2021/06/21 03:12:54 christos Exp $ */
 /*     $OpenBSD: adm1021.c,v 1.27 2007/06/24 05:34:35 dlg Exp $        */
 
 /*
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: adm1021.c,v 1.28 2021/06/15 04:41:01 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: adm1021.c,v 1.29 2021/06/21 03:12:54 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -409,11 +409,11 @@
        sc->sc_sensor[ADMTEMP_EXT].flags =
            ENVSYS_FMONLIMITS | ENVSYS_FHAS_ENTROPY;
 
-       if (prop_dictionary_get_cstring_nocopy(sc->sc_prop, "s00", &desc)) {
+       if (prop_dictionary_get_string(sc->sc_prop, "s00", &desc)) {
                strncpy(iname, desc, 64);
        }
 
-       if (prop_dictionary_get_cstring_nocopy(sc->sc_prop, "s01", &desc)) {
+       if (prop_dictionary_get_string(sc->sc_prop, "s01", &desc)) {
                strncpy(ename, desc, 64);
        }
 
diff -r fd4e785a250c -r 8744cc211aaa sys/dev/i2c/dbcool.c
--- a/sys/dev/i2c/dbcool.c      Mon Jun 21 03:01:23 2021 +0000
+++ b/sys/dev/i2c/dbcool.c      Mon Jun 21 03:04:27 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dbcool.c,v 1.61 2021/06/15 04:39:49 mlelstv Exp $ */
+/*     $NetBSD: dbcool.c,v 1.62 2021/06/21 03:12:54 christos Exp $ */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -50,7 +50,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dbcool.c,v 1.61 2021/06/15 04:39:49 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dbcool.c,v 1.62 2021/06/21 03:12:54 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1697,7 +1697,7 @@
 
        name_index = sc->sc_dc.dc_chip->table[idx].name_index;
        snprintf(name, 7, "s%02x", sc->sc_dc.dc_chip->table[idx].reg.val_reg);
-       if (prop_dictionary_get_cstring_nocopy(sc->sc_prop, name, &desc)) {
+       if (prop_dictionary_get_string(sc->sc_prop, name, &desc)) {
                 strlcpy(sc->sc_sensor[idx].desc, desc,
                        sizeof(sc->sc_sensor[idx].desc));
        } else {
diff -r fd4e785a250c -r 8744cc211aaa sys/dev/i2c/dstemp.c
--- a/sys/dev/i2c/dstemp.c      Mon Jun 21 03:01:23 2021 +0000
+++ b/sys/dev/i2c/dstemp.c      Mon Jun 21 03:04:27 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dstemp.c,v 1.13 2021/06/15 04:41:01 mlelstv Exp $ */
+/* $NetBSD: dstemp.c,v 1.14 2021/06/21 03:12:54 christos Exp $ */
 
 /*-
  * Copyright (c) 2018 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dstemp.c,v 1.13 2021/06/15 04:41:01 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dstemp.c,v 1.14 2021/06/21 03:12:54 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -126,9 +126,9 @@
        sc->sc_sensor_temp.state = ENVSYS_SINVALID;
        sc->sc_sensor_temp.flags = ENVSYS_FHAS_ENTROPY;
 
-       if (prop_dictionary_get_cstring_nocopy(sc->sc_prop, "s00", &desc)) {
+       if (prop_dictionary_get_string(sc->sc_prop, "s00", &desc)) {
                strncpy(name, desc, 64);
-       } else if (prop_dictionary_get_cstring_nocopy(sc->sc_prop, "saa", &desc)) {
+       } else if (prop_dictionary_get_string(sc->sc_prop, "saa", &desc)) {
                strncpy(name, desc, 64);
        }
 
diff -r fd4e785a250c -r 8744cc211aaa sys/dev/i2c/i2c.c
--- a/sys/dev/i2c/i2c.c Mon Jun 21 03:01:23 2021 +0000
+++ b/sys/dev/i2c/i2c.c Mon Jun 21 03:04:27 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i2c.c,v 1.78 2021/04/24 23:36:54 thorpej Exp $ */
+/*     $NetBSD: i2c.c,v 1.79 2021/06/21 03:12:54 christos Exp $        */
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.78 2021/04/24 23:36:54 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.79 2021/06/21 03:12:54 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -452,7 +452,7 @@
                for (i = 0; i < count; i++) {
                        dev = prop_array_get(child_devices, i);
                        if (!dev) continue;
-                       if (!prop_dictionary_get_cstring_nocopy(
+                       if (!prop_dictionary_get_string(
                            dev, "name", &name)) {
                                /* "name" property is optional. */
                                name = NULL;
diff -r fd4e785a250c -r 8744cc211aaa sys/dev/i2c/lm75.c
--- a/sys/dev/i2c/lm75.c        Mon Jun 21 03:01:23 2021 +0000
+++ b/sys/dev/i2c/lm75.c        Mon Jun 21 03:04:27 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lm75.c,v 1.44 2021/06/13 09:46:04 mlelstv Exp $        */
+/*     $NetBSD: lm75.c,v 1.45 2021/06/21 03:12:54 christos Exp $       */
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lm75.c,v 1.44 2021/06/13 09:46:04 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lm75.c,v 1.45 2021/06/21 03:12:54 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -290,7 +290,7 @@
            ia->ia_name? ia->ia_name : device_xname(self),
            sizeof(sc->sc_sensor.desc));
 
-       if (prop_dictionary_get_cstring_nocopy(sc->sc_prop, "s00", &desc)) {
+       if (prop_dictionary_get_string(sc->sc_prop, "s00", &desc)) {
                strncpy(name, desc, 64);
        }
 
diff -r fd4e785a250c -r 8744cc211aaa sys/dev/i2c/pcagpio.c
--- a/sys/dev/i2c/pcagpio.c     Mon Jun 21 03:01:23 2021 +0000
+++ b/sys/dev/i2c/pcagpio.c     Mon Jun 21 03:04:27 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pcagpio.c,v 1.10 2021/01/27 02:29:48 thorpej Exp $ */
+/* $NetBSD: pcagpio.c,v 1.11 2021/06/21 03:12:54 christos Exp $ */
 
 /*-
  * Copyright (c) 2020 Michael Lorenz
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pcagpio.c,v 1.10 2021/01/27 02:29:48 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcagpio.c,v 1.11 2021/06/21 03:12:54 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -191,7 +191,7 @@
                for (i = 0; i < prop_array_count(pins); i++) {
                        nptr = NULL;
                        pin = prop_array_get(pins, i);
-                       ok &= prop_dictionary_get_cstring_nocopy(pin, "name",
+                       ok &= prop_dictionary_get_string(pin, "name",
                            &nptr);
                        ok &= prop_dictionary_get_uint32(pin, "pin", &num);
                        ok &= prop_dictionary_get_bool( pin, "active_high",
diff -r fd4e785a250c -r 8744cc211aaa sys/dev/i2c/pcf8574.c
--- a/sys/dev/i2c/pcf8574.c     Mon Jun 21 03:01:23 2021 +0000
+++ b/sys/dev/i2c/pcf8574.c     Mon Jun 21 03:04:27 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pcf8574.c,v 1.9 2021/01/27 02:29:48 thorpej Exp $ */
+/* $NetBSD: pcf8574.c,v 1.10 2021/06/21 03:12:54 christos Exp $ */
 
 /*-



Home | Main Index | Thread Index | Old Index