Author: emaste
Date: Fri Apr 22 21:43:44 2016
New Revision: 298494
URL: https://svnweb.freebsd.org/changeset/base/298494

Log:
  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.

Modified:
  stable/10/usr.sbin/kldxref/kldxref.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/kldxref/kldxref.c
==============================================================================
--- stable/10/usr.sbin/kldxref/kldxref.c        Fri Apr 22 21:38:37 2016        
(r298493)
+++ stable/10/usr.sbin/kldxref/kldxref.c        Fri Apr 22 21:43:44 2016        
(r298494)
@@ -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;
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to