summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorjmg <jmg@FreeBSD.org>1997-10-19 11:15:45 +0000
committerjmg <jmg@FreeBSD.org>1997-10-19 11:15:45 +0000
commit075da1dbb990ca02802b89d73266b82c6c776b11 (patch)
treeedfa02a1745e2182653df33aba56af68d6520ed6 /sbin
parent804107bc406012014ee4aa55efc2e153232e6eac (diff)
downloadFreeBSD-src-075da1dbb990ca02802b89d73266b82c6c776b11.zip
FreeBSD-src-075da1dbb990ca02802b89d73266b82c6c776b11.tar.gz
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) :)
Diffstat (limited to 'sbin')
-rw-r--r--sbin/Makefile3
-rw-r--r--sbin/kldload/Makefile4
-rw-r--r--sbin/kldload/kldload.c6
-rw-r--r--sbin/kldstat/Makefile4
-rw-r--r--sbin/kldstat/kldstat.c13
-rw-r--r--sbin/kldunload/Makefile4
-rw-r--r--sbin/kldunload/kldunload.c7
7 files changed, 31 insertions, 10 deletions
diff --git a/sbin/Makefile b/sbin/Makefile
index e05d0d2..95f6286 100644
--- a/sbin/Makefile
+++ b/sbin/Makefile
@@ -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 \
diff --git a/sbin/kldload/Makefile b/sbin/kldload/Makefile
index 39033e5..dda3fbc 100644
--- a/sbin/kldload/Makefile
+++ b/sbin/kldload/Makefile
@@ -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>
diff --git a/sbin/kldload/kldload.c b/sbin/kldload/kldload.c
index e2a58be..3145fde 100644
--- a/sbin/kldload/kldload.c
+++ b/sbin/kldload/kldload.c
@@ -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()
diff --git a/sbin/kldstat/Makefile b/sbin/kldstat/Makefile
index 27cdf27..ff5d75c 100644
--- a/sbin/kldstat/Makefile
+++ b/sbin/kldstat/Makefile
@@ -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>
diff --git a/sbin/kldstat/kldstat.c b/sbin/kldstat/kldstat.c
index edb045f..9b6b2dd 100644
--- a/sbin/kldstat/kldstat.c
+++ b/sbin/kldstat/kldstat.c
@@ -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) {
diff --git a/sbin/kldunload/Makefile b/sbin/kldunload/Makefile
index 7f7fffb..faf372f 100644
--- a/sbin/kldunload/Makefile
+++ b/sbin/kldunload/Makefile
@@ -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>
diff --git a/sbin/kldunload/kldunload.c b/sbin/kldunload/kldunload.c
index 5f94ef9..fec453e 100644
--- a/sbin/kldunload/kldunload.c
+++ b/sbin/kldunload/kldunload.c
@@ -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()
OpenPOWER on IntegriCloud