Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/cddl/osnet/dev/fbt DTrace: print a warning no CTF s...



details:   https://anonhg.NetBSD.org/src/rev/c598bf74132a
branches:  trunk
changeset: 754536:c598bf74132a
user:      darran <darran%NetBSD.org@localhost>
date:      Mon May 03 09:28:38 2010 +0000

description:
DTrace: print a warning no CTF section is found when processing arguments.
This should help diagnose problems such as netbsd images without CTF
sections and old boot loaders.

diffstat:

 external/cddl/osnet/dev/fbt/fbt.c |  8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diffs (22 lines):

diff -r 724170134824 -r c598bf74132a external/cddl/osnet/dev/fbt/fbt.c
--- a/external/cddl/osnet/dev/fbt/fbt.c Mon May 03 08:45:43 2010 +0000
+++ b/external/cddl/osnet/dev/fbt/fbt.c Mon May 03 09:28:38 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fbt.c,v 1.5 2010/03/13 22:31:15 christos Exp $ */
+/*     $NetBSD: fbt.c,v 1.6 2010/05/03 09:28:38 darran Exp $   */
 
 /*
  * CDDL HEADER START
@@ -1399,6 +1399,12 @@
 
        /* Get a pointer to the CTF data and it's length. */
        if (mod_ctf_get(ctl, &mc) != 0) {
+               static int report=0;
+               if (report < 1) {
+                   report++;
+                   printf("FBT: Error no CTF section found in module \"%s\"\n",
+                           ctl->mod_info->mi_name);
+               }
                /* No CTF data? Something wrong? *shrug* */
                return;
        }



Home | Main Index | Thread Index | Old Index