summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1996-06-21 11:40:10 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1996-06-21 11:40:10 +0000
commitdd8213bee95d29c39197672abd0dcae47e562a6c (patch)
treee842178c458e7630ae107cce78e64127b5e691db /usr.bin
parent3a46a3f7d677b29f356ba2a90bbd15a37ad0f2b8 (diff)
updates according to the kernel chenges.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/modstat/modstat.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/modstat/modstat.c b/usr.bin/modstat/modstat.c
index 02ca89b8354..a5044db7cf5 100644
--- a/usr.bin/modstat/modstat.c
+++ b/usr.bin/modstat/modstat.c
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: modstat.c,v 1.1 1995/10/18 08:45:48 deraadt Exp $
+ * $Id: modstat.c,v 1.2 1996/06/21 11:40:09 mickey Exp $
*/
#include <stdio.h>
@@ -71,12 +71,14 @@ dostat(devfd, modnum, modname)
char *modname;
{
struct lmc_stat sbuf;
+ char name[MAXLKMNAME] = "";
+
+ sbuf.id = modnum;
+ sbuf.name = name;
if (modname != NULL)
strcpy(sbuf.name, modname);
- sbuf.id = modnum;
-
if (ioctl(devfd, LMSTAT, &sbuf) == -1) {
switch (errno) {
case EINVAL: /* out of range */
@@ -92,7 +94,7 @@ dostat(devfd, modnum, modname)
/*
* Decode this stat buffer...
*/
- printf("%-7s %3d %3d %08x %04x %8x %3d %s\n",
+ printf("%-7s %3d %3d %08x %04x %8x %3d s\n",
type_names[sbuf.type],
sbuf.id, /* module id */
sbuf.offset, /* offset into modtype struct */