Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148490851
D27959.id117644.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D27959.id117644.diff
View Options
diff --git a/usr.sbin/kldxref/kldxref.8 b/usr.sbin/kldxref/kldxref.8
--- a/usr.sbin/kldxref/kldxref.8
+++ b/usr.sbin/kldxref/kldxref.8
@@ -26,7 +26,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd October 9, 2001
+.Dd February 20, 2023
.Dt KLDXREF 8
.Os
.Sh NAME
@@ -51,6 +51,13 @@
file is created, and the preexisting hint file (if there was one in
that directory) is removed.
.Pp
+.Nm
+ignores files with two "."s in the filename, such as
+.Pa foo.ko.debug
+or
+.Pa bar.ko.pkgsave
+.
+.Pp
The following options are available:
.Bl -tag -width indent
.It Fl R
diff --git a/usr.sbin/kldxref/kldxref.c b/usr.sbin/kldxref/kldxref.c
--- a/usr.sbin/kldxref/kldxref.c
+++ b/usr.sbin/kldxref/kldxref.c
@@ -685,6 +685,7 @@
{
FTS *ftsp;
FTSENT *p;
+ char *dot = NULL;
int opt, fts_options, ival;
struct stat sb;
@@ -752,14 +753,13 @@
fwrite(&ival, sizeof(ival), 1, fxref);
reccnt = 0;
}
- /* skip non-files and separate debug files */
+ /* skip non-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)
+ /* and separate .debug, .symbol and .pkgsave files */
+ /* by skipping all files with 2 dots */
+ dot = strchr(p->fts_name, '.');
+ if (dot && strchr(dot + 1, '.') != NULL)
continue;
read_kld(p->fts_path, p->fts_name);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 19, 5:40 AM (50 m, 41 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29949649
Default Alt Text
D27959.id117644.diff (1 KB)
Attached To
Mode
D27959: kldxref: skip .pkgsave files
Attached
Detach File
Event Timeline
Log In to Comment