Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/modstat deal with 32 vs. 64 bit pointers, from joda@...
details: https://anonhg.NetBSD.org/src/rev/23a6f9ed7594
branches: trunk
changeset: 473550:23a6f9ed7594
user: mrg <mrg%NetBSD.org@localhost>
date: Mon Jun 07 00:24:16 1999 +0000
description:
deal with 32 vs. 64 bit pointers, from joda%pdc.kth.se@localhost as part of PR#6149
diffstat:
usr.bin/modstat/modstat.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diffs (54 lines):
diff -r d70b72a5f2ee -r 23a6f9ed7594 usr.bin/modstat/modstat.c
--- a/usr.bin/modstat/modstat.c Sun Jun 06 22:50:26 1999 +0000
+++ b/usr.bin/modstat/modstat.c Mon Jun 07 00:24:16 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: modstat.c,v 1.11 1998/07/06 11:58:51 mrg Exp $ */
+/* $NetBSD: modstat.c,v 1.12 1999/06/07 00:24:16 mrg Exp $ */
/*
* Copyright (c) 1993 Terrence R. Lambert.
@@ -34,7 +34,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: modstat.c,v 1.11 1998/07/06 11:58:51 mrg Exp $");
+__RCSID("$NetBSD: modstat.c,v 1.12 1999/06/07 00:24:16 mrg Exp $");
#endif
#include <sys/param.h>
@@ -77,6 +77,8 @@
"MISC"
};
+#define POINTERSIZE (2 * sizeof(void*))
+
int
dostat(devfd, modnum, modname)
int devfd;
@@ -106,12 +108,14 @@
/*
* Decode this stat buffer...
*/
- printf("%-7s %3d %3ld %08lx %04lx %8lx %3ld %s\n",
+ printf("%-7s %3d %3ld %0*lx %04lx %0*lx %3ld %s\n",
type_names[sbuf.type],
sbuf.id, /* module id */
(long)sbuf.offset, /* offset into modtype struct */
+ POINTERSIZE,
(long)sbuf.area, /* address module loaded at */
(long)sbuf.size, /* size in pages(K) */
+ POINTERSIZE,
(long)sbuf.private, /* kernel address of private area */
(long)sbuf.ver, /* Version; always 1 for now */
sbuf.name /* name from private area */
@@ -177,7 +181,9 @@
atexit(cleanup);
- printf("Type Id Off Loadaddr Size Info Rev Module Name\n");
+ printf("Type Id Off %-*s Size %-*s Rev Module Name\n",
+ POINTERSIZE, "Loadaddr",
+ POINTERSIZE, "Info");
/*
* Oneshot?
Home |
Main Index |
Thread Index |
Old Index