Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/fdt Print node path in debug log.
details: https://anonhg.NetBSD.org/src/rev/f0ae3e9023ac
branches: trunk
changeset: 353306:f0ae3e9023ac
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Fri Apr 28 10:37:41 2017 +0000
description:
Print node path in debug log.
diffstat:
sys/dev/fdt/fdtbus.c | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
diffs (45 lines):
diff -r d0bd87e27b5b -r f0ae3e9023ac sys/dev/fdt/fdtbus.c
--- a/sys/dev/fdt/fdtbus.c Fri Apr 28 10:24:45 2017 +0000
+++ b/sys/dev/fdt/fdtbus.c Fri Apr 28 10:37:41 2017 +0000
@@ -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 <jmcneill%invisible.ca@localhost>
@@ -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 @@
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;
}
Home |
Main Index |
Thread Index |
Old Index