Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F161660292
D57902.id180812.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
D57902.id180812.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
@@ -24,7 +24,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd February 25, 2023
+.Dd June 27, 2026
.Dt KLDXREF 8
.Os
.Sh NAME
@@ -35,6 +35,8 @@
.Op Fl Rdv
.Op Fl f Ar hintsfile
.Ar path ...
+.Nm
+.Fl m Ar module
.Sh DESCRIPTION
The
.Nm
@@ -67,6 +69,9 @@
.It Fl f Ar hintsfile
Specify a different name for the hints files than
.Pa linker.hints .
+.It Fl m Ar module
+Print information about the modules in the file
+.Ar module .
.It Fl v
Operate in verbose mode.
.El
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
@@ -764,13 +764,13 @@
{
FTS *ftsp;
FTSENT *p;
- char *dot = NULL;
+ char *dot = NULL, *module = NULL;
int opt, fts_options;
struct stat sb;
fts_options = FTS_PHYSICAL;
- while ((opt = getopt(argc, argv, "Rdf:v")) != -1) {
+ while ((opt = getopt(argc, argv, "Rdf:m:v")) != -1) {
switch (opt) {
case 'd': /* no hint file, only print on stdout */
dflag = true;
@@ -778,6 +778,10 @@
case 'f': /* use this name instead of linker.hints */
xref_file = optarg;
break;
+ case 'm':
+ module = optarg;
+ dflag = true;
+ break;
case 'v':
verbose++;
break;
@@ -789,11 +793,18 @@
/* NOTREACHED */
}
}
- if (argc - optind < 1)
+ if (argc - optind < (module ? 0 : 1))
usage();
argc -= optind;
argv += optind;
+ if (module) {
+ if (elf_version(EV_CURRENT) == EV_NONE)
+ errx(1, "unsupported libelf");
+ read_kld(module, module);
+ exit(0);
+ }
+
if (stat(argv[0], &sb) != 0)
err(1, "%s", argv[0]);
if ((sb.st_mode & S_IFDIR) == 0 && !dflag) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jul 6, 5:15 PM (2 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34763238
Default Alt Text
D57902.id180812.diff (1 KB)
Attached To
Mode
D57902: kldxref: Add -m filag to print info about modules in one file
Attached
Detach File
Event Timeline
Log In to Comment