Module Name: src
Committed By: jmcneill
Date: Fri Apr 28 10:37:41 UTC 2017
Modified Files:
src/sys/dev/fdt: fdtbus.c
Log Message:
Print node path in debug log.
To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/fdt/fdtbus.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/dev/fdt/fdtbus.c
diff -u src/sys/dev/fdt/fdtbus.c:1.9 src/sys/dev/fdt/fdtbus.c:1.10
--- src/sys/dev/fdt/fdtbus.c:1.9 Wed Apr 26 01:51:52 2017
+++ src/sys/dev/fdt/fdtbus.c Fri Apr 28 10:37:41 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: fdtbus.c,v 1.9 2017/04/26 01:51:52 jmcneill Exp $ */
+/* $NetBSD: fdtbus.c,v 1.10 2017/04/28 10:37:41 jmcneill Exp $ */
/*-
* Copyright (c) 2015 Jared D. McNeill <[email protected]>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fdtbus.c,v 1.9 2017/04/26 01:51:52 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdtbus.c,v 1.10 2017/04/28 10:37:41 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -290,18 +290,20 @@ fdt_print(void *aux, const char *pnp)
char buf[FDT_MAX_PATH];
const char *name = buf;
- if (faa->faa_quiet)
+ if (pnp && faa->faa_quiet)
return QUIET;
/* Skip "not configured" for nodes w/o compatible property */
- if (OF_getproplen(faa->faa_phandle, "compatible") <= 0)
+ if (pnp && OF_getproplen(faa->faa_phandle, "compatible") <= 0)
return QUIET;
- if (pnp) {
- if (!fdtbus_get_path(faa->faa_phandle, buf, sizeof(buf)))
- name = faa->faa_name;
+ if (!fdtbus_get_path(faa->faa_phandle, buf, sizeof(buf)))
+ name = faa->faa_name;
+
+ if (pnp)
aprint_normal("%s at %s", name, pnp);
- }
+ else
+ aprint_debug(" (%s)", name);
return UNCONF;
}