Commit Graph

26 Commits

Author SHA1 Message Date
Julian Elischer
637733b170 Add the ability to print out ht emodule specific information in likely formats.
Among other things this gives us the ability to find outthe syscall number of a dynamically loaded syscall that has a dynamicly allocated vector number.

MFC after:	1 week
Sponsored by:	Panzura inc.
2016-03-18 14:49:11 +00:00
Edward Tomasz Napierala
1b18fc10b3 Add "kldstat -h"; showing module sizes in hex is rather weird.
Reviewed by:	emaste@ (earlier version)
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D4969
2016-01-23 12:10:16 +00:00
Baptiste Daroussin
3e8cf4954e Add quiet support for kldstat -n
PR:		bin/180014
Submitted by:	Olivier Cochard-Labbé <olivier@cochard.me>
MFC after:	1 week
2014-01-22 17:15:17 +00:00
Konstantin Belousov
35e3987f15 In printfile(), exit the process instead of only printing the warning.
This fixes verbose mode when either -i specified non-existent kldfile
id, or the file was unloaded between two kldnext(2) calls.

While there, fix printfile() definition to be style(9)-compliant.

Submitted by:	arundel
MFC after:	1 week
2010-11-13 16:49:07 +00:00
Christian Brueffer
8e721ea734 Casting size_t to uintmax_t is not necessary anymore. This also
removes the need for stdint.h inclusion.

PR:		146046
Submitted by:	Alexander Best <alexbestms@wwu.de>
Reviewed by:	kan
MFC after:	1 week
2010-05-12 15:47:43 +00:00
Andrew Thompson
97a7a5698b Only show the pathname in verbose output as intended in the last commit (r172862). 2008-12-22 19:52:21 +00:00
John Birrell
1676805c18 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
2007-10-22 04:12:57 +00:00
Pawel Jakub Dawidek
09d5b70601 Update usage. 2005-09-24 08:20:45 +00:00
Pawel Jakub Dawidek
90217cddd0 Add '-q' option, which (when used with '-m' option) just tells if the given
module is loaded or compiled into the kernel.
This is useful mostly in startup scripts, when module should be loaded only
if it wasn't compiled into the kernel nor already loaded, eg.:

	kldstat -q -m g_eli || kldload geom_eli.ko || err 1 'geom_eli module failed to load.'
2005-09-23 23:52:26 +00:00
Ruslan Ermilov
9b3eb50354 Synchronize program's usage() with manpage's SYNOPSIS. 2005-05-21 07:08:32 +00:00
Max Khon
5d6d6d382f Add -m option (find module using modfind() and stat it). 2005-05-04 12:46:43 +00:00
David Malone
2c8aff0a04 Use a better way to calculate POINTER_WIDTH suggested by pjd@. 2004-05-30 10:10:41 +00:00
David Malone
5d9ae0a212 Decide how much space we need to print a pointer using
sizeof(void *) rather than if __alpha__ is defined.
2004-05-28 21:16:44 +00:00
Juli Mallett
9c4c393a74 Validate argument to -i. 2004-03-15 03:41:07 +00:00
David E. O'Brien
c69284ca08 Use __FBSDID() to quiet GCC 3.3 warnings. 2003-05-03 18:41:59 +00:00
Johan Karlsson
7f10745771 style(9): use NULL when assigning/comparing a char *,
consitently compare fileid with 0 using == and !=.

Reviewed by:	silence on @audit
2003-04-23 20:33:57 +00:00
Johan Karlsson
eb3beef5ad Make this WARNS=5 clean by using %j and (uintmax_t).
Look at by:	sebastian.ssmoller@web.de on audit@
2003-04-23 20:24:13 +00:00
Paul Saab
61c3dd35ce Backout rev 1.8. This really does not give us the version number
of the kld's.

Pointed out by:		bp
2000-07-01 07:57:28 +00:00
Jonathan M. Bresler
28b406b210 display version number of each kld module when using
the -v flag.
2000-06-20 19:04:22 +00:00
Marcel Moolenaar
fb2ef61513 Properly align the columns of the header on Alpha. 1999-12-04 13:36:22 +00:00
Peter Wemm
7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
Dag-Erling Smørgrav
9b84d62900 Cosmetic fix (make header align with data) 1998-11-07 00:29:09 +00:00
Philippe Charnier
57e78ffb16 Sync. usage string and synopsis. Add rcsid. 1998-01-05 07:10:42 +00:00
John-Mark Gurney
2830148a29 a few code style changes:
o start function names in column 1
    o sort order of flags in getopt and switch
    o don't try to reference progname
    o unspam some changes introduced by a 2.2.1-R build box instead of a
	-current build box

doc changes:
    o document when these commands first appeared
    o put email address in angle brakets
    o minor mdoc clean up
1997-10-21 09:59:26 +00:00
John-Mark Gurney
23e200d5ab activate the programs that will be used to manipulate kld modules
fix a few problems with missing headers, warn called with an exit
value, and undeclared getopt vars

these programs now compile -Wall clean (and yes, I know I should use
more than just -Wall) :)
1997-10-19 11:15:45 +00:00
Doug Rabson
a79fe60755 Add utilities for the kernel linker. 1997-05-07 18:19:54 +00:00