Module Name: src Committed By: jmcneill Date: Sat Jun 27 13:53:10 UTC 2020
Modified Files: src/sys/kern: subr_autoconf.c Log Message: prop_dictionary_[sg]et_cstring{,_nocopy} -> prop_dictionary_[sg]et_string{,_nocopy} To generate a diff of this commit: cvs rdiff -u -r1.271 -r1.272 src/sys/kern/subr_autoconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/kern/subr_autoconf.c diff -u src/sys/kern/subr_autoconf.c:1.271 src/sys/kern/subr_autoconf.c:1.272 --- src/sys/kern/subr_autoconf.c:1.271 Mon May 25 21:05:01 2020 +++ src/sys/kern/subr_autoconf.c Sat Jun 27 13:53:10 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_autoconf.c,v 1.271 2020/05/25 21:05:01 thorpej Exp $ */ +/* $NetBSD: subr_autoconf.c,v 1.272 2020/06/27 13:53:10 jmcneill Exp $ */ /* * Copyright (c) 1996, 2000 Christopher G. Demetriou @@ -77,7 +77,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.271 2020/05/25 21:05:01 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.272 2020/06/27 13:53:10 jmcneill Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -568,13 +568,13 @@ devmon_report_device(device_t dev, bool what = (isattach ? "device-attach" : "device-detach"); parent = (pdev == NULL ? "root" : device_xname(pdev)); - if (prop_dictionary_get_cstring_nocopy(dict, "location", &where)) { - prop_dictionary_set_cstring(ev, "location", where); + if (prop_dictionary_get_string(dict, "location", &where)) { + prop_dictionary_set_string(ev, "location", where); aprint_debug("ev: %s %s at %s in [%s]\n", what, device_xname(dev), parent, where); } - if (!prop_dictionary_set_cstring(ev, "device", device_xname(dev)) || - !prop_dictionary_set_cstring(ev, "parent", parent)) { + if (!prop_dictionary_set_string(ev, "device", device_xname(dev)) || + !prop_dictionary_set_string(ev, "parent", parent)) { prop_object_release(ev); return; } @@ -1454,12 +1454,12 @@ config_devalloc(const device_t parent, c dev->dv_properties = prop_dictionary_create(); KASSERT(dev->dv_properties != NULL); - prop_dictionary_set_cstring_nocopy(dev->dv_properties, + prop_dictionary_set_string_nocopy(dev->dv_properties, "device-driver", dev->dv_cfdriver->cd_name); prop_dictionary_set_uint16(dev->dv_properties, "device-unit", dev->dv_unit); if (parent != NULL) { - prop_dictionary_set_cstring(dev->dv_properties, + prop_dictionary_set_string(dev->dv_properties, "device-parent", device_xname(parent)); } @@ -1513,7 +1513,7 @@ config_add_attrib_dict(device_t dev) break; if ((attr_dict = prop_dictionary_create()) == NULL) break; - prop_dictionary_set_cstring_nocopy(attr_dict, "attribute-name", + prop_dictionary_set_string_nocopy(attr_dict, "attribute-name", ci->ci_name); /* Create an array of the locator names and defaults */ @@ -1524,10 +1524,10 @@ config_add_attrib_dict(device_t dev) loc_dict = prop_dictionary_create(); if (loc_dict == NULL) continue; - prop_dictionary_set_cstring_nocopy(loc_dict, + prop_dictionary_set_string_nocopy(loc_dict, "loc-name", ci->ci_locdesc[j].cld_name); if (ci->ci_locdesc[j].cld_defaultstr != NULL) - prop_dictionary_set_cstring_nocopy( + prop_dictionary_set_string_nocopy( loc_dict, "default", ci->ci_locdesc[j].cld_defaultstr); prop_array_set(loc_array, j, loc_dict);