Module Name: src Committed By: msaitoh Date: Mon Nov 16 14:40:41 UTC 2015
Modified Files: src/sys/kern [netbsd-7]: subr_autoconf.c Log Message: Pull up following revision(s) (requested by joerg in ticket #1030): sys/kern/subr_autoconf.c: revision 1.236 Add the parent device (if present) to the device properties, making it easier to identify devices in the tree with drvctl(8). To generate a diff of this commit: cvs rdiff -u -r1.231.2.1 -r1.231.2.2 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.231.2.1 src/sys/kern/subr_autoconf.c:1.231.2.2 --- src/sys/kern/subr_autoconf.c:1.231.2.1 Mon Mar 9 08:56:01 2015 +++ src/sys/kern/subr_autoconf.c Mon Nov 16 14:40:41 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_autoconf.c,v 1.231.2.1 2015/03/09 08:56:01 snj Exp $ */ +/* $NetBSD: subr_autoconf.c,v 1.231.2.2 2015/11/16 14:40:41 msaitoh 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.231.2.1 2015/03/09 08:56:01 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.231.2.2 2015/11/16 14:40:41 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -1434,6 +1434,10 @@ config_devalloc(const device_t parent, c "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, + "device-parent", device_xname(parent)); + } if (dev->dv_cfdriver->cd_attrs != NULL) config_add_attrib_dict(dev);