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) :)
This commit is contained in:
John-Mark Gurney 1997-10-19 11:15:45 +00:00
parent 63f87bd194
commit 23e200d5ab
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=30573
7 changed files with 31 additions and 10 deletions

View File

@ -3,7 +3,8 @@
# XXX MISSING: icheck ncheck
SUBDIR= adjkerntz badsect ccdconfig clri disklabel dmesg dset dump dumpfs \
dumplfs dumpon fsck fsdb fsirand ifconfig init ipfw md5 mknod modload \
dumplfs dumpon fsck fsdb fsirand ifconfig init ipfw \
kldload kldstat kldunload md5 mknod modload \
modunload mount mount_cd9660 mount_ext2fs \
mount_lfs mount_nfs mount_null mount_portal mount_std \
mount_umap mount_union mountd newfs newlfs nfsd nfsiod \

View File

@ -23,11 +23,13 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# $Id$
# $Id: Makefile,v 1.1 1997/05/07 18:19:21 dfr Exp $
#
PROG= kldload
SRCS= kldload.c
MAN8= kldload.8
CFLAGS= -I${.CURDIR}/../../sys
.include <bsd.prog.mk>

View File

@ -23,14 +23,18 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id$
* $Id: kldload.c,v 1.1 1997/05/07 18:19:21 dfr Exp $
*/
#include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/param.h>
#include <sys/linker.h>
extern int optind;
static char* progname;
static void usage()

View File

@ -23,11 +23,13 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# $Id$
# $Id: Makefile,v 1.1 1997/05/07 18:19:54 dfr Exp $
#
PROG= kldstat
SRCS= kldstat.c
MAN8= kldstat.8
CFLAGS= -I${.CURDIR}/../../sys
.include <bsd.prog.mk>

View File

@ -23,16 +23,21 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id$
* $Id: kldstat.c,v 1.1 1997/05/07 18:19:54 dfr Exp $
*/
#include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/module.h>
#include <sys/linker.h>
extern char *optarg;
extern int optind;
static char* progname;
static void printmod(int modid)
@ -41,7 +46,7 @@ static void printmod(int modid)
stat.version = sizeof(struct module_stat);
if (modstat(modid, &stat) < 0)
warn(1, "Can't state module");
warn("Can't stat module id %d", modid);
else
printf("\t\t%2d %s\n", stat.id, stat.name);
}
@ -53,9 +58,9 @@ static void printfile(int fileid, int verbose)
stat.version = sizeof(struct kld_file_stat);
if (kldstat(fileid, &stat) < 0)
warn(1, "Can't stat file");
warn("Can't stat file id %d", fileid);
else
printf("%2d %4d %-8x %-8x %s\n",
printf("%2d %4d %p %-8x %s\n",
stat.id, stat.refs, stat.address, stat.size, stat.name);
if (verbose) {

View File

@ -23,11 +23,13 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# $Id$
# $Id: Makefile,v 1.1 1997/05/07 18:19:54 dfr Exp $
#
PROG= kldunload
SRCS= kldunload.c
MAN8= kldunload.8
CFLAGS= -I${.CURDIR}/../../sys
.include <bsd.prog.mk>

View File

@ -23,14 +23,19 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id$
* $Id: kldunload.c,v 1.1 1997/05/07 18:19:54 dfr Exp $
*/
#include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/param.h>
#include <sys/linker.h>
extern char *optarg;
extern int optind;
static char* progname;
static void usage()