summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn-Mark Gurney <jmg@FreeBSD.org>1997-10-19 11:15:45 +0000
committerJohn-Mark Gurney <jmg@FreeBSD.org>1997-10-19 11:15:45 +0000
commit23e200d5ab0c8860ef95938f1d2eb92dac4590ef (patch)
treea7f4c9fcf0648346ca18abecbfe0b02e3a97f619
parent63f87bd1949592392aec57d666da7d7b708b151d (diff)
Notes
-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 e05d0d208e102..95f6286a6db67 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 39033e5a3f457..dda3fbcd33d74 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 e2a58be5a1fd8..3145fde8fc9ec 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 27cdf27169991..ff5d75ce69012 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 edb045fbe552c..9b6b2dded4c19 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 7f7fffb5c1b47..faf372f098565 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 5f94ef98d07bb..fec453ee8e444 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()