svn commit: r265990 - stable/8/usr.sbin/kldxref
Xin LI
delphij at FreeBSD.org
Tue May 13 23:35:30 UTC 2014
Author: delphij
Date: Tue May 13 23:35:29 2014
New Revision: 265990
URL: http://svnweb.freebsd.org/changeset/base/265990
Log:
Improve build repeatability for kldxref(8). [EN-14:04]
Modified:
stable/8/usr.sbin/kldxref/kldxref.c
Modified: stable/8/usr.sbin/kldxref/kldxref.c
==============================================================================
--- stable/8/usr.sbin/kldxref/kldxref.c Tue May 13 23:24:32 2014 (r265989)
+++ stable/8/usr.sbin/kldxref/kldxref.c Tue May 13 23:35:29 2014 (r265990)
@@ -275,6 +275,16 @@ usage(void)
exit(1);
}
+static int
+compare(const FTSENT *const *a, const FTSENT *const *b)
+{
+ if ((*a)->fts_info == FTS_D && (*b)->fts_info != FTS_D)
+ return 1;
+ if ((*a)->fts_info != FTS_D && (*b)->fts_info == FTS_D)
+ return -1;
+ return strcmp((*a)->fts_name, (*b)->fts_name);
+}
+
int
main(int argc, char *argv[])
{
@@ -316,7 +326,7 @@ main(int argc, char *argv[])
err(1, "%s", argv[0]);
}
- ftsp = fts_open(argv, fts_options, 0);
+ ftsp = fts_open(argv, fts_options, compare);
if (ftsp == NULL)
exit(1);
More information about the svn-src-stable
mailing list