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/455b88a6076f
branches: trunk
changeset: 1010868:455b88a6076f
user: thorpej <thorpej%NetBSD.org@localhost>
date: Thu Jun 11 02:32:06 2020 +0000
description:
Update for proplib(3) API changes.
diffstat:
sys/dev/acpi/acpi_i2c.c | 6 +++---
sys/dev/bluetooth/bthidev.c | 28 ++++++++++++++--------------
sys/dev/bluetooth/bthub.c | 10 +++++-----
sys/dev/bluetooth/btmagic.c | 16 ++++++++--------
sys/dev/bluetooth/btsco.c | 20 ++++++++++----------
sys/dev/fdt/fdtbus.c | 6 +++---
sys/dev/hdaudio/hdafg.c | 10 +++++-----
sys/dev/hdaudio/hdaudio.c | 10 +++++-----
sys/dev/i2c/i2c.c | 16 ++++++++--------
sys/dev/ofw/ofw_subr.c | 8 ++++----
sys/dev/pci/if_ixl.c | 8 ++++----
sys/dev/pci/if_tl.c | 6 +++---
sys/dev/pci/if_wm.c | 10 +++++-----
sys/dev/spi/spi.c | 6 +++---
sys/dev/sysmon/swsensor.c | 8 ++++----
sys/dev/sysmon/sysmon_envsys.c | 28 ++++++++++++++--------------
sys/dev/sysmon/sysmon_envsys_util.c | 10 +++++-----
sys/dev/sysmon/sysmon_power.c | 6 +++---
sys/dev/usb/usb_subr.c | 6 +++---
sys/dev/wscons/wsdisplay_util.c | 4 ++--
sys/dev/wsfb/genfb.c | 6 +++---
sys/kern/subr_disk.c | 6 +++---
22 files changed, 117 insertions(+), 117 deletions(-)
diffs (truncated from 935 to 300 lines):
diff -r f91f87543cf9 -r 455b88a6076f sys/dev/acpi/acpi_i2c.c
--- a/sys/dev/acpi/acpi_i2c.c Thu Jun 11 02:30:21 2020 +0000
+++ b/sys/dev/acpi/acpi_i2c.c Thu Jun 11 02:32:06 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_i2c.c,v 1.6 2020/06/08 20:21:56 thorpej Exp $ */
+/* $NetBSD: acpi_i2c.c,v 1.7 2020/06/11 02:39:30 thorpej Exp $ */
/*-
* Copyright (c) 2017 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_i2c.c,v 1.6 2020/06/08 20:21:56 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_i2c.c,v 1.7 2020/06/11 02:39:30 thorpej Exp $");
#include <dev/acpi/acpireg.h>
#include <dev/acpi/acpivar.h>
@@ -203,7 +203,7 @@
if (i2c_id != NULL) {
if (i2c_id->compat != NULL) {
prop_data_t data;
- data = prop_data_create_data(i2c_id->compat,
+ data = prop_data_create_copy(i2c_id->compat,
i2c_id->compatlen);
prop_dictionary_set(dev, "compatible", data);
prop_object_release(data);
diff -r f91f87543cf9 -r 455b88a6076f sys/dev/bluetooth/bthidev.c
--- a/sys/dev/bluetooth/bthidev.c Thu Jun 11 02:30:21 2020 +0000
+++ b/sys/dev/bluetooth/bthidev.c Thu Jun 11 02:32:06 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bthidev.c,v 1.31 2018/11/15 23:01:45 jakllsch Exp $ */
+/* $NetBSD: bthidev.c,v 1.32 2020/06/11 02:39:31 thorpej Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bthidev.c,v 1.31 2018/11/15 23:01:45 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bthidev.c,v 1.32 2020/06/11 02:39:31 thorpej Exp $");
#include <sys/param.h>
#include <sys/condvar.h>
@@ -172,7 +172,7 @@
prop_object_t obj;
obj = prop_dictionary_get(dict, BTDEVservice);
- if (prop_string_equals_cstring(obj, "HID"))
+ if (prop_string_equals_string(obj, "HID"))
return 1;
return 0;
@@ -216,24 +216,24 @@
* extract config from proplist
*/
obj = prop_dictionary_get(dict, BTDEVladdr);
- bdaddr_copy(&sc->sc_laddr, prop_data_data_nocopy(obj));
+ bdaddr_copy(&sc->sc_laddr, prop_data_value(obj));
obj = prop_dictionary_get(dict, BTDEVraddr);
- bdaddr_copy(&sc->sc_raddr, prop_data_data_nocopy(obj));
+ bdaddr_copy(&sc->sc_raddr, prop_data_value(obj));
obj = prop_dictionary_get(dict, BTDEVvendor);
- vendor = (int)prop_number_integer_value(obj);
+ vendor = (int)prop_number_signed_value(obj);
obj = prop_dictionary_get(dict, BTDEVproduct);
- product = (int)prop_number_integer_value(obj);
+ product = (int)prop_number_signed_value(obj);
obj = prop_dictionary_get(dict, BTDEVmode);
if (prop_object_type(obj) == PROP_TYPE_STRING) {
- if (prop_string_equals_cstring(obj, BTDEVauth))
+ if (prop_string_equals_string(obj, BTDEVauth))
sockopt_setint(&sc->sc_mode, L2CAP_LM_AUTH);
- else if (prop_string_equals_cstring(obj, BTDEVencrypt))
+ else if (prop_string_equals_string(obj, BTDEVencrypt))
sockopt_setint(&sc->sc_mode, L2CAP_LM_ENCRYPT);
- else if (prop_string_equals_cstring(obj, BTDEVsecure))
+ else if (prop_string_equals_string(obj, BTDEVsecure))
sockopt_setint(&sc->sc_mode, L2CAP_LM_SECURE);
else {
aprint_error(" unknown %s\n", BTDEVmode);
@@ -241,13 +241,13 @@
}
aprint_verbose(" %s %s", BTDEVmode,
- prop_string_cstring_nocopy(obj));
+ prop_string_value(obj));
} else
sockopt_setint(&sc->sc_mode, 0);
obj = prop_dictionary_get(dict, BTHIDEVcontrolpsm);
if (prop_object_type(obj) == PROP_TYPE_NUMBER) {
- sc->sc_ctlpsm = prop_number_integer_value(obj);
+ sc->sc_ctlpsm = prop_number_signed_value(obj);
if (L2CAP_PSM_INVALID(sc->sc_ctlpsm)) {
aprint_error(" invalid %s\n", BTHIDEVcontrolpsm);
return;
@@ -256,7 +256,7 @@
obj = prop_dictionary_get(dict, BTHIDEVinterruptpsm);
if (prop_object_type(obj) == PROP_TYPE_NUMBER) {
- sc->sc_intpsm = prop_number_integer_value(obj);
+ sc->sc_intpsm = prop_number_signed_value(obj);
if (L2CAP_PSM_INVALID(sc->sc_intpsm)) {
aprint_error(" invalid %s\n", BTHIDEVinterruptpsm);
return;
@@ -266,7 +266,7 @@
obj = prop_dictionary_get(dict, BTHIDEVdescriptor);
if (prop_object_type(obj) == PROP_TYPE_DATA) {
dlen = prop_data_size(obj);
- desc = prop_data_data_nocopy(obj);
+ desc = prop_data_value(obj);
} else {
aprint_error(" no %s\n", BTHIDEVdescriptor);
return;
diff -r f91f87543cf9 -r 455b88a6076f sys/dev/bluetooth/bthub.c
--- a/sys/dev/bluetooth/bthub.c Thu Jun 11 02:30:21 2020 +0000
+++ b/sys/dev/bluetooth/bthub.c Thu Jun 11 02:32:06 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bthub.c,v 1.23 2020/06/08 20:20:54 thorpej Exp $ */
+/* $NetBSD: bthub.c,v 1.24 2020/06/11 02:39:31 thorpej Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bthub.c,v 1.23 2020/06/08 20:20:54 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bthub.c,v 1.24 2020/06/11 02:39:31 thorpej Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -205,7 +205,7 @@
/* validate remote address */
raddr = prop_dictionary_get(dict, BTDEVraddr);
if (prop_data_size(raddr) != sizeof(bdaddr_t)
- || bdaddr_any(prop_data_data_nocopy(raddr)))
+ || bdaddr_any(prop_data_value(raddr)))
return EINVAL;
/* validate service name */
@@ -269,11 +269,11 @@
if (pnp != NULL) {
obj = prop_dictionary_get(dict, BTDEVtype);
aprint_normal("%s: %s '%s',", pnp, BTDEVtype,
- prop_string_cstring_nocopy(obj));
+ prop_string_value(obj));
}
obj = prop_dictionary_get(dict, BTDEVraddr);
- raddr = prop_data_data_nocopy(obj);
+ raddr = prop_data_value(obj);
aprint_verbose(" %s %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x",
BTDEVraddr,
diff -r f91f87543cf9 -r 455b88a6076f sys/dev/bluetooth/btmagic.c
--- a/sys/dev/bluetooth/btmagic.c Thu Jun 11 02:30:21 2020 +0000
+++ b/sys/dev/bluetooth/btmagic.c Thu Jun 11 02:32:06 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: btmagic.c,v 1.18 2018/09/03 16:29:30 riastradh Exp $ */
+/* $NetBSD: btmagic.c,v 1.19 2020/06/11 02:39:31 thorpej Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -85,7 +85,7 @@
*****************************************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: btmagic.c,v 1.18 2018/09/03 16:29:30 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: btmagic.c,v 1.19 2020/06/11 02:39:31 thorpej Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -311,18 +311,18 @@
* extract config from proplist
*/
obj = prop_dictionary_get(aux, BTDEVladdr);
- bdaddr_copy(&sc->sc_laddr, prop_data_data_nocopy(obj));
+ bdaddr_copy(&sc->sc_laddr, prop_data_value(obj));
obj = prop_dictionary_get(aux, BTDEVraddr);
- bdaddr_copy(&sc->sc_raddr, prop_data_data_nocopy(obj));
+ bdaddr_copy(&sc->sc_raddr, prop_data_value(obj));
obj = prop_dictionary_get(aux, BTDEVmode);
if (prop_object_type(obj) == PROP_TYPE_STRING) {
- if (prop_string_equals_cstring(obj, BTDEVauth))
+ if (prop_string_equals_string(obj, BTDEVauth))
sockopt_setint(&sc->sc_mode, L2CAP_LM_AUTH);
- else if (prop_string_equals_cstring(obj, BTDEVencrypt))
+ else if (prop_string_equals_string(obj, BTDEVencrypt))
sockopt_setint(&sc->sc_mode, L2CAP_LM_ENCRYPT);
- else if (prop_string_equals_cstring(obj, BTDEVsecure))
+ else if (prop_string_equals_string(obj, BTDEVsecure))
sockopt_setint(&sc->sc_mode, L2CAP_LM_SECURE);
else {
aprint_error(" unknown %s\n", BTDEVmode);
@@ -330,7 +330,7 @@
}
aprint_verbose(" %s %s", BTDEVmode,
- prop_string_cstring_nocopy(obj));
+ prop_string_value(obj));
} else
sockopt_setint(&sc->sc_mode, 0);
diff -r f91f87543cf9 -r 455b88a6076f sys/dev/bluetooth/btsco.c
--- a/sys/dev/bluetooth/btsco.c Thu Jun 11 02:30:21 2020 +0000
+++ b/sys/dev/bluetooth/btsco.c Thu Jun 11 02:32:06 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: btsco.c,v 1.41 2019/06/08 08:02:38 isaki Exp $ */
+/* $NetBSD: btsco.c,v 1.42 2020/06/11 02:39:31 thorpej Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: btsco.c,v 1.41 2019/06/08 08:02:38 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: btsco.c,v 1.42 2020/06/11 02:39:31 thorpej Exp $");
#include <sys/param.h>
#include <sys/audioio.h>
@@ -258,10 +258,10 @@
prop_object_t obj;
obj = prop_dictionary_get(dict, BTDEVservice);
- if (prop_string_equals_cstring(obj, "HSET"))
+ if (prop_string_equals_string(obj, "HSET"))
return 1;
- if (prop_string_equals_cstring(obj, "HF"))
+ if (prop_string_equals_string(obj, "HF"))
return 1;
return 0;
@@ -288,25 +288,25 @@
* copy in our configuration info
*/
obj = prop_dictionary_get(dict, BTDEVladdr);
- bdaddr_copy(&sc->sc_laddr, prop_data_data_nocopy(obj));
+ bdaddr_copy(&sc->sc_laddr, prop_data_value(obj));
obj = prop_dictionary_get(dict, BTDEVraddr);
- bdaddr_copy(&sc->sc_raddr, prop_data_data_nocopy(obj));
+ bdaddr_copy(&sc->sc_raddr, prop_data_value(obj));
obj = prop_dictionary_get(dict, BTDEVservice);
- if (prop_string_equals_cstring(obj, "HF")) {
+ if (prop_string_equals_string(obj, "HF")) {
sc->sc_flags |= BTSCO_LISTEN;
aprint_verbose(" listen mode");
}
obj = prop_dictionary_get(dict, BTSCOchannel);
if (prop_object_type(obj) != PROP_TYPE_NUMBER
- || prop_number_integer_value(obj) < RFCOMM_CHANNEL_MIN
- || prop_number_integer_value(obj) > RFCOMM_CHANNEL_MAX) {
+ || prop_number_signed_value(obj) < RFCOMM_CHANNEL_MIN
+ || prop_number_signed_value(obj) > RFCOMM_CHANNEL_MAX) {
aprint_error(" invalid %s", BTSCOchannel);
return;
}
- sc->sc_channel = prop_number_integer_value(obj);
+ sc->sc_channel = prop_number_signed_value(obj);
aprint_verbose(" channel %d", sc->sc_channel);
aprint_normal("\n");
diff -r f91f87543cf9 -r 455b88a6076f sys/dev/fdt/fdtbus.c
--- a/sys/dev/fdt/fdtbus.c Thu Jun 11 02:30:21 2020 +0000
+++ b/sys/dev/fdt/fdtbus.c Thu Jun 11 02:32:06 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fdtbus.c,v 1.33 2020/02/20 01:35:55 jmcneill Exp $ */
+/* $NetBSD: fdtbus.c,v 1.34 2020/06/11 02:39:30 thorpej Exp $ */
/*-
* Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fdtbus.c,v 1.33 2020/02/20 01:35:55 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdtbus.c,v 1.34 2020/06/11 02:39:30 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -406,7 +406,7 @@
if (node->n_dev) {
dict = device_properties(node->n_dev);
if (fdtbus_get_path(node->n_phandle, buf, sizeof(buf)))
- prop_dictionary_set_cstring(dict, "fdt-path", buf);
+ prop_dictionary_set_string(dict, "fdt-path", buf);
}
Home |
Main Index |
Thread Index |
Old Index