summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2016-04-22 21:43:44 +0000
committeremaste <emaste@FreeBSD.org>2016-04-22 21:43:44 +0000
commitc5bc872f5c9fb9b766c4e955af3e68622a46114e (patch)
tree2f59922307305ceaf517c9db750288bf3b26d5a9 /usr.sbin
parent6ac493037aab2a2b589918fea57d9baa73aa65e5 (diff)
downloadFreeBSD-src-c5bc872f5c9fb9b766c4e955af3e68622a46114e.zip
FreeBSD-src-c5bc872f5c9fb9b766c4e955af3e68622a46114e.tar.gz
MFC r288490: Add debug file extension to kldxref(8)
After r288176 [in head] kernel debug files have the extension .debug. They also moved [in head] to /usr/lib/debug/boot/kernel by default so in the normal case kldxref does not encounter them. A src.conf(5) setting may be used to continue installing them in /boot/kernel though, so have kldxref skip .debug files in addition to .symbols files. Merged this change to avoid warnings when a stable/10 kldxref runs against a head install, perhaps on an upgrade to 11-CURRENT. The change to kernel debug files will not be merged to stable/10.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/kldxref/kldxref.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/kldxref/kldxref.c b/usr.sbin/kldxref/kldxref.c
index c3784ef..1e81801 100644
--- a/usr.sbin/kldxref/kldxref.c
+++ b/usr.sbin/kldxref/kldxref.c
@@ -360,9 +360,12 @@ main(int argc, char *argv[])
fwrite(&ival, sizeof(ival), 1, fxref);
reccnt = 0;
}
- /* skip non-files or .symbols entries */
+ /* skip non-files and separate debug files */
if (p->fts_info != FTS_F)
continue;
+ if (p->fts_namelen >= 6 &&
+ strcmp(p->fts_name + p->fts_namelen - 6, ".debug") == 0)
+ continue;
if (p->fts_namelen >= 8 &&
strcmp(p->fts_name + p->fts_namelen - 8, ".symbols") == 0)
continue;
OpenPOWER on IntegriCloud