summaryrefslogtreecommitdiff
path: root/usr.sbin/procmap
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2004-02-18 00:46:26 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2004-02-18 00:46:26 +0000
commitc5b8edfef59bed06d1c68593121c17034fec8acc (patch)
tree8bfbbc2c8f6edb12b3fc98b2ea612c1620cd52eb /usr.sbin/procmap
parent2cf5953c4c39928cd296131abe9e64b909546da3 (diff)
printing (null) is not so useful. instead print names of missing symbols
with a useful message.
Diffstat (limited to 'usr.sbin/procmap')
-rw-r--r--usr.sbin/procmap/procmap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/procmap/procmap.c b/usr.sbin/procmap/procmap.c
index 842bba5ae51..c97b6de9b0b 100644
--- a/usr.sbin/procmap/procmap.c
+++ b/usr.sbin/procmap/procmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: procmap.c,v 1.3 2004/02/17 20:13:53 tedu Exp $ */
+/* $OpenBSD: procmap.c,v 1.4 2004/02/18 00:46:25 tedu Exp $ */
/* $NetBSD: pmap.c,v 1.1 2002/09/01 20:32:44 atatat Exp $ */
/*
@@ -481,8 +481,8 @@ load_symbols(kvm_t *kd)
if (rc == -1)
errx(1, "%s == %d", kvm_geterr(kd), rc);
for (i = 0; i < sizeof(nl)/sizeof(nl[0]); i++)
- if (nl[i].n_value == 0)
- printf("%s\n", nl[i].n_name);
+ if (nl[i].n_value == 0 && nl[i].n_name)
+ printf("%s not found\n", nl[i].n_name);
uvm_vnodeops = (void*)nl[NL_UVM_VNODEOPS].n_value;
uvm_deviceops = (void*)nl[NL_UVM_DEVICEOPS].n_value;