diff options
| author | Warner Losh <imp@FreeBSD.org> | 2024-01-29 04:45:03 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2024-01-29 04:45:23 +0000 |
| commit | 2b92b754f18ce86e11e56f91c73aae8d89be80cc (patch) | |
| tree | 290e2362e6c871d593fdd03be6d23338da963912 /usr.sbin/kldxref/kldxref.c | |
| parent | 34f0a01b6bd4ff0e61a7066729515148400e0982 (diff) | |
Diffstat (limited to 'usr.sbin/kldxref/kldxref.c')
| -rw-r--r-- | usr.sbin/kldxref/kldxref.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/kldxref/kldxref.c b/usr.sbin/kldxref/kldxref.c index 1694f069564b..1f06ad811d91 100644 --- a/usr.sbin/kldxref/kldxref.c +++ b/usr.sbin/kldxref/kldxref.c @@ -842,10 +842,11 @@ main(int argc, char *argv[]) continue; /* * Skip files that generate errors like .debug, .symbol and .pkgsave - * by generally skipping all files with 2 dots. + * by generally skipping all files not ending with ".ko" or that have + * no dots in the name (like kernel). */ - dot = strchr(p->fts_name, '.'); - if (dot && strchr(dot + 1, '.') != NULL) + dot = strrchr(p->fts_name, '.'); + if (dot != NULL && strcmp(dot, ".ko") != 0) continue; read_kld(p->fts_path, p->fts_name); } |
