summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorjb <jb@FreeBSD.org>2007-10-22 04:12:57 +0000
committerjb <jb@FreeBSD.org>2007-10-22 04:12:57 +0000
commit9dec415fef268455335c088626d24f3cd5dd26fc (patch)
treeca90169fbd250bbc580b712e8482c755895ffc8f /sbin
parent9392728ba026a7e54d585f8efec5f232146d34a2 (diff)
downloadFreeBSD-src-9dec415fef268455335c088626d24f3cd5dd26fc.zip
FreeBSD-src-9dec415fef268455335c088626d24f3cd5dd26fc.tar.gz
Add the full module path name to the kld_file_stat structure
for kldstat(2). This allows libdtrace to determine the exact file from which a kernel module was loaded without having to guess. The kldstat(2) API is versioned with the size of the kld_file_stat structure, so this change creates version 2. Add the pathname to the verbose output of kldstat(8) too. MFC: 3 days
Diffstat (limited to 'sbin')
-rw-r--r--sbin/kldstat/kldstat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/kldstat/kldstat.c b/sbin/kldstat/kldstat.c
index 74f375e..4f4e786 100644
--- a/sbin/kldstat/kldstat.c
+++ b/sbin/kldstat/kldstat.c
@@ -60,9 +60,9 @@ static void printfile(int fileid, int verbose)
if (kldstat(fileid, &stat) < 0)
warn("can't stat file id %d", fileid);
else
- printf("%2d %4d %p %-8jx %s\n",
+ printf("%2d %4d %p %-8jx %s (%s)\n",
stat.id, stat.refs, stat.address, (uintmax_t)stat.size,
- stat.name);
+ stat.name, stat.pathname);
if (verbose) {
printf("\tContains modules:\n");
OpenPOWER on IntegriCloud