summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1997-08-03 09:53:04 +0000
committerpeter <peter@FreeBSD.org>1997-08-03 09:53:04 +0000
commit25c0ad464af5af7c232240c278e9bcebd725ef90 (patch)
tree17afa8cc79b4698e09a589395b9b32f988855541 /usr.sbin
parent3071fee9c6e869ee54a422f3fd126136573706b8 (diff)
downloadFreeBSD-src-25c0ad464af5af7c232240c278e9bcebd725ef90.zip
FreeBSD-src-25c0ad464af5af7c232240c278e9bcebd725ef90.tar.gz
Zap antique #ifndef NEWVM code. This should be redone to use libkvm
someday.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/trpt/trpt.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/usr.sbin/trpt/trpt.c b/usr.sbin/trpt/trpt.c
index 55c0f6d..3bb58f6 100644
--- a/usr.sbin/trpt/trpt.c
+++ b/usr.sbin/trpt/trpt.c
@@ -43,13 +43,6 @@ static char sccsid[] = "@(#)trpt.c 8.1 (Berkeley) 6/6/93";
#include <sys/param.h>
#include <sys/queue.h>
-#if BSD >= 199103
-#define NEWVM
-#endif
-#ifndef NEWVM
-#include <machine/pte.h>
-#include <sys/vmmac.h>
-#endif
#include <sys/socket.h>
#include <sys/socketvar.h>
#define PRUREQUESTS
@@ -87,18 +80,9 @@ struct nlist nl[] = {
{ "_tcp_debug" },
#define N_TCP_DEBX 1
{ "_tcp_debx" },
-#ifndef NEWVM
-#define N_SYSMAP 2
- { "_Sysmap" },
-#define N_SYSSIZE 3
- { "_Syssize" },
-#endif
{ "" },
};
-#ifndef NEWVM
-static struct pte *Sysmap;
-#endif
static caddr_t tcp_pcbs[TCP_NDEBUG];
static n_time ntime;
static int aflag, kflag, memf, follow, sflag, tflag;
@@ -176,23 +160,8 @@ main(argc, argv)
exit(2);
}
if (kflag) {
-#ifdef NEWVM
fputs("trpt: can't do core files yet\n", stderr);
exit(1);
-#else
- off_t off;
-
- Sysmap = (struct pte *)
- malloc((u_int)(nl[N_SYSSIZE].n_value * sizeof(struct pte)));
- if (!Sysmap) {
- fputs("trpt: can't get memory for Sysmap.\n", stderr);
- exit(1);
- }
- off = nl[N_SYSMAP].n_value & ~KERNBASE;
- (void)lseek(memf, off, L_SET);
- (void)read(memf, (char *)Sysmap,
- (int)(nl[N_SYSSIZE].n_value * sizeof(struct pte)));
-#endif
}
(void)klseek(memf, (off_t)nl[N_TCP_DEBX].n_value, L_SET);
if (read(memf, (char *)&tcp_debx, sizeof(tcp_debx)) !=
@@ -405,11 +374,5 @@ klseek(fd, base, off)
{
off_t lseek();
-#ifndef NEWVM
- if (kflag) { /* get kernel pte */
- base &= ~KERNBASE;
- base = ctob(Sysmap[btop(base)].pg_pfnum) + (base & PGOFSET);
- }
-#endif
(void)lseek(fd, base, off);
}
OpenPOWER on IntegriCloud