summaryrefslogtreecommitdiffstats
path: root/lib/libkvm
diff options
context:
space:
mode:
authorrgrimes <rgrimes@FreeBSD.org>1995-05-30 05:51:47 +0000
committerrgrimes <rgrimes@FreeBSD.org>1995-05-30 05:51:47 +0000
commitf05428e4cd63dde97bac14b84dd146a5c00455e3 (patch)
treee1331adb5d216f2b3fa6baa6491752348d2e5f10 /lib/libkvm
parent6de57e42c294763c78d77b0a9a7c5a08008a378a (diff)
downloadFreeBSD-src-f05428e4cd63dde97bac14b84dd146a5c00455e3.zip
FreeBSD-src-f05428e4cd63dde97bac14b84dd146a5c00455e3.tar.gz
Remove trailing whitespace.
Diffstat (limited to 'lib/libkvm')
-rw-r--r--lib/libkvm/kvm.c14
-rw-r--r--lib/libkvm/kvm_amd64.c2
-rw-r--r--lib/libkvm/kvm_file.c2
-rw-r--r--lib/libkvm/kvm_hp300.c12
-rw-r--r--lib/libkvm/kvm_i386.c2
-rw-r--r--lib/libkvm/kvm_mips.c4
-rw-r--r--lib/libkvm/kvm_proc.c24
-rw-r--r--lib/libkvm/kvm_sparc.c14
8 files changed, 37 insertions, 37 deletions
diff --git a/lib/libkvm/kvm.c b/lib/libkvm/kvm.c
index 8eb0056..753d06a 100644
--- a/lib/libkvm/kvm.c
+++ b/lib/libkvm/kvm.c
@@ -232,7 +232,7 @@ _kvm_open(kd, uf, mf, sf, flag, errout)
* If the database cannot be opened, open the namelist
* argument so we revert to slow nlist() calls.
*/
- if (kvm_dbopen(kd, uf) < 0 &&
+ if (kvm_dbopen(kd, uf) < 0 &&
(kd->nlfd = open(uf, O_RDONLY, 0)) < 0) {
_kvm_syserr(kd, kd->program, "%s", uf);
goto failed;
@@ -328,7 +328,7 @@ kvm_close(kd)
/*
* Set up state necessary to do queries on the kernel namelist
- * data base. If the data base is out-of-data/incompatible with
+ * data base. If the data base is out-of-data/incompatible with
* given executable, set up things so we revert to standard nlist call.
* Only called for live kernels. Return 0 on success, -1 on failure.
*/
@@ -376,7 +376,7 @@ kvm_dbopen(kd, uf)
if (rec.data == 0 || rec.size != sizeof(struct nlist))
goto close;
bcopy((char *)rec.data, (char *)&nitem, sizeof(nitem));
- if (kvm_read(kd, (u_long)nitem.n_value, kversion, dbversionlen) !=
+ if (kvm_read(kd, (u_long)nitem.n_value, kversion, dbversionlen) !=
dbversionlen)
goto close;
/*
@@ -401,7 +401,7 @@ kvm_nlist(kd, nl)
register int nvalid;
/*
- * If we can't use the data base, revert to the
+ * If we can't use the data base, revert to the
* slow library call.
*/
if (kd->db == 0)
@@ -432,10 +432,10 @@ kvm_nlist(kd, nl)
* Avoid alignment issues.
*/
bcopy((char *)&((struct nlist *)rec.data)->n_type,
- (char *)&p->n_type,
+ (char *)&p->n_type,
sizeof(p->n_type));
bcopy((char *)&((struct nlist *)rec.data)->n_value,
- (char *)&p->n_value,
+ (char *)&p->n_value,
sizeof(p->n_value));
}
/*
@@ -475,7 +475,7 @@ kvm_read(kd, kva, buf, len)
cp = buf;
while (len > 0) {
u_long pa;
-
+
cc = _kvm_kvatop(kd, kva, &pa);
if (cc == 0)
return (0);
diff --git a/lib/libkvm/kvm_amd64.c b/lib/libkvm/kvm_amd64.c
index e944ced..e8e3cf3 100644
--- a/lib/libkvm/kvm_amd64.c
+++ b/lib/libkvm/kvm_amd64.c
@@ -40,7 +40,7 @@ static char sccsid[] = "@(#)kvm_hp300.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
/*
- * i386 machine dependent routines for kvm. Hopefully, the forthcoming
+ * i386 machine dependent routines for kvm. Hopefully, the forthcoming
* vm code will one day obsolete this module.
*/
diff --git a/lib/libkvm/kvm_file.c b/lib/libkvm/kvm_file.c
index 1e1d6bd..69e0aa3 100644
--- a/lib/libkvm/kvm_file.c
+++ b/lib/libkvm/kvm_file.c
@@ -36,7 +36,7 @@ static char sccsid[] = "@(#)kvm_file.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
/*
- * File list interface for kvm. pstat, fstat and netstat are
+ * File list interface for kvm. pstat, fstat and netstat are
* users of this code, so we've factored it out into a separate module.
* Thus, we keep this grunge out of the other kvm applications (i.e.,
* most other applications are interested only in open/close/read/nlist).
diff --git a/lib/libkvm/kvm_hp300.c b/lib/libkvm/kvm_hp300.c
index 2154a23..c84691e 100644
--- a/lib/libkvm/kvm_hp300.c
+++ b/lib/libkvm/kvm_hp300.c
@@ -40,7 +40,7 @@ static char sccsid[] = "@(#)kvm_hp300.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
/*
- * Hp300 machine dependent routines for kvm. Hopefully, the forthcoming
+ * Hp300 machine dependent routines for kvm. Hopefully, the forthcoming
* vm code will one day obsolete this module.
*/
@@ -161,7 +161,7 @@ _kvm_vatop(kd, sta, va, pa)
addr = (u_long)&sta[va >> SG4_SHIFT1];
/*
* Can't use KREAD to read kernel segment table entries.
- * Fortunately it is 1-to-1 mapped so we don't have to.
+ * Fortunately it is 1-to-1 mapped so we don't have to.
*/
if (sta == vm->Sysseg) {
if (lseek(kd->pmfd, (off_t)addr, 0) == -1 ||
@@ -180,7 +180,7 @@ _kvm_vatop(kd, sta, va, pa)
* Address from level 1 STE is a physical address,
* so don't use kvm_read.
*/
- if (lseek(kd->pmfd, (off_t)(addr - lowram), 0) == -1 ||
+ if (lseek(kd->pmfd, (off_t)(addr - lowram), 0) == -1 ||
read(kd->pmfd, (char *)&ste, sizeof(ste)) < 0)
goto invalid;
if ((ste & SG_V) == 0) {
@@ -194,7 +194,7 @@ _kvm_vatop(kd, sta, va, pa)
addr = (u_long)&sta[va >> SEGSHIFT];
/*
* Can't use KREAD to read kernel segment table entries.
- * Fortunately it is 1-to-1 mapped so we don't have to.
+ * Fortunately it is 1-to-1 mapped so we don't have to.
*/
if (sta == vm->Sysseg) {
if (lseek(kd->pmfd, (off_t)addr, 0) == -1 ||
@@ -212,7 +212,7 @@ _kvm_vatop(kd, sta, va, pa)
/*
* Address from STE is a physical address so don't use kvm_read.
*/
- if (lseek(kd->pmfd, (off_t)(addr - lowram), 0) == -1 ||
+ if (lseek(kd->pmfd, (off_t)(addr - lowram), 0) == -1 ||
read(kd->pmfd, (char *)&pte, sizeof(pte)) < 0)
goto invalid;
addr = pte & PG_FRAME;
@@ -221,7 +221,7 @@ _kvm_vatop(kd, sta, va, pa)
return (0);
}
*pa = addr - lowram + offset;
-
+
return (NBPG - offset);
invalid:
_kvm_err(kd, 0, "invalid address (%x)", va);
diff --git a/lib/libkvm/kvm_i386.c b/lib/libkvm/kvm_i386.c
index e944ced..e8e3cf3 100644
--- a/lib/libkvm/kvm_i386.c
+++ b/lib/libkvm/kvm_i386.c
@@ -40,7 +40,7 @@ static char sccsid[] = "@(#)kvm_hp300.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
/*
- * i386 machine dependent routines for kvm. Hopefully, the forthcoming
+ * i386 machine dependent routines for kvm. Hopefully, the forthcoming
* vm code will one day obsolete this module.
*/
diff --git a/lib/libkvm/kvm_mips.c b/lib/libkvm/kvm_mips.c
index b0f4cfe..2087981 100644
--- a/lib/libkvm/kvm_mips.c
+++ b/lib/libkvm/kvm_mips.c
@@ -39,7 +39,7 @@
static char sccsid[] = "@(#)kvm_mips.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
/*
- * MIPS machine dependent routines for kvm. Hopefully, the forthcoming
+ * MIPS machine dependent routines for kvm. Hopefully, the forthcoming
* vm code will one day obsolete this module.
*/
@@ -146,7 +146,7 @@ _kvm_kvatop(kd, va, pa)
addr = (u_long)(vm->Sysmap + ((va - VM_MIN_KERNEL_ADDRESS) >> PGSHIFT));
/*
* Can't use KREAD to read kernel segment table entries.
- * Fortunately it is 1-to-1 mapped so we don't have to.
+ * Fortunately it is 1-to-1 mapped so we don't have to.
*/
if (lseek(kd->pmfd, (off_t)addr, 0) < 0 ||
read(kd->pmfd, (char *)&pte, sizeof(pte)) < 0)
diff --git a/lib/libkvm/kvm_proc.c b/lib/libkvm/kvm_proc.c
index bc4952e..6b29d40 100644
--- a/lib/libkvm/kvm_proc.c
+++ b/lib/libkvm/kvm_proc.c
@@ -116,7 +116,7 @@ kvm_proclist(kd, what, arg, p, bp, maxcnt)
&eproc.e_ucred);
switch(what) {
-
+
case KERN_PROC_PID:
if (proc.p_pid != (pid_t)arg)
continue;
@@ -154,7 +154,7 @@ kvm_proclist(kd, what, arg, p, bp, maxcnt)
eproc.e_pgid = pgrp.pg_id;
eproc.e_jobc = pgrp.pg_jobc;
if (KREAD(kd, (u_long)pgrp.pg_session, &sess)) {
- _kvm_err(kd, kd->program, "can't read session at %x",
+ _kvm_err(kd, kd->program, "can't read session at %x",
pgrp.pg_session);
return (-1);
}
@@ -169,7 +169,7 @@ kvm_proclist(kd, what, arg, p, bp, maxcnt)
if (tty.t_pgrp != NULL) {
if (KREAD(kd, (u_long)tty.t_pgrp, &pgrp)) {
_kvm_err(kd, kd->program,
- "can't read tpgrp at &x",
+ "can't read tpgrp at &x",
tty.t_pgrp);
return (-1);
}
@@ -182,7 +182,7 @@ kvm_proclist(kd, what, arg, p, bp, maxcnt)
if (sess.s_leader == p)
eproc.e_flag |= EPROC_SLEADER;
if (proc.p_wmesg)
- (void)kvm_read(kd, (u_long)proc.p_wmesg,
+ (void)kvm_read(kd, (u_long)proc.p_wmesg,
eproc.e_wmesg, WMESGLEN);
#ifdef sparc
@@ -207,7 +207,7 @@ kvm_proclist(kd, what, arg, p, bp, maxcnt)
break;
case KERN_PROC_TTY:
- if ((proc.p_flag & P_CONTROLT) == 0 ||
+ if ((proc.p_flag & P_CONTROLT) == 0 ||
eproc.e_tdev != (dev_t)arg)
continue;
break;
@@ -265,7 +265,7 @@ kvm_getprocs(kd, op, arg, cnt)
if (kd->procbase != 0) {
free((void *)kd->procbase);
- /*
+ /*
* Clear this pointer in case this call fails. Otherwise,
* kvm_close() will free it again.
*/
@@ -361,7 +361,7 @@ _kvm_realloc(kd, p, n)
/*
* Read in an argument vector from the user address space of process p.
- * addr is the user-space base address of narg null-terminated contiguous
+ * addr is the user-space base address of narg null-terminated contiguous
* strings. This is used to read in both the command arguments and
* environment strings. Read at most maxcnt characters of strings.
*/
@@ -389,13 +389,13 @@ kvm_argv(kd, p, addr, narg, maxcnt)
* Try to avoid reallocs.
*/
kd->argc = MAX(narg + 1, 32);
- kd->argv = (char **)_kvm_malloc(kd, kd->argc *
+ kd->argv = (char **)_kvm_malloc(kd, kd->argc *
sizeof(*kd->argv));
if (kd->argv == 0)
return (0);
} else if (narg + 1 > kd->argc) {
kd->argc = MAX(2 * kd->argc, narg + 1);
- kd->argv = (char **)_kvm_realloc(kd, kd->argv, kd->argc *
+ kd->argv = (char **)_kvm_realloc(kd, kd->argv, kd->argc *
sizeof(*kd->argv));
if (kd->argv == 0)
return (0);
@@ -505,7 +505,7 @@ proc_verify(kd, kernp, p)
* Just read in the whole proc. It's not that big relative
* to the cost of the read system call.
*/
- if (kvm_read(kd, kernp, (char *)&kernproc, sizeof(kernproc)) !=
+ if (kvm_read(kd, kernp, (char *)&kernproc, sizeof(kernproc)) !=
sizeof(kernproc))
return (0);
return (p->p_pid == kernproc.p_pid &&
@@ -528,7 +528,7 @@ kvm_doargv(kd, kp, nchr, info)
/*
* Pointers are stored at the top of the user stack.
*/
- if (p->p_stat == SZOMB ||
+ if (p->p_stat == SZOMB ||
kvm_uread(kd, p, USRSTACK - sizeof(arginfo) - SPARE_USRSPACE,
(char *)&arginfo, sizeof(arginfo)) != sizeof(arginfo))
return (0);
@@ -592,7 +592,7 @@ kvm_uread(kd, p, uva, buf, len)
return (0);
}
-
+
while (len > 0) {
if (lseek(fd, (off_t)uva, 0) == -1 && errno != 0) {
_kvm_err(kd, kd->program, "invalid address (%x) in %s", uva, procfile);
diff --git a/lib/libkvm/kvm_sparc.c b/lib/libkvm/kvm_sparc.c
index 5275068..a7b9594 100644
--- a/lib/libkvm/kvm_sparc.c
+++ b/lib/libkvm/kvm_sparc.c
@@ -40,7 +40,7 @@ static char sccsid[] = "@(#)kvm_sparc.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
/*
- * Sparc machine dependent routines for kvm. Hopefully, the forthcoming
+ * Sparc machine dependent routines for kvm. Hopefully, the forthcoming
* vm code will one day obsolete this module.
*/
@@ -107,7 +107,7 @@ _kvm_initvtop(kd)
*/
off = st.st_size - ctob(btoc(sizeof(vm->segmap)));
errno = 0;
- if (lseek(kd->pmfd, (off_t)off, 0) == -1 && errno != 0 ||
+ if (lseek(kd->pmfd, (off_t)off, 0) == -1 && errno != 0 ||
read(kd->pmfd, (char *)vm->segmap, sizeof(vm->segmap)) < 0) {
_kvm_err(kd, kd->program, "cannot read segment map");
return (-1);
@@ -118,7 +118,7 @@ _kvm_initvtop(kd)
off = st.st_size - ctob(btoc(sizeof(vm->pmeg)) +
btoc(sizeof(vm->segmap)));
errno = 0;
- if (lseek(kd->pmfd, (off_t)off, 0) == -1 && errno != 0 ||
+ if (lseek(kd->pmfd, (off_t)off, 0) == -1 && errno != 0 ||
read(kd->pmfd, (char *)vm->pmeg, sizeof(vm->pmeg)) < 0) {
_kvm_err(kd, kd->program, "cannot read PMEG table");
return (-1);
@@ -127,7 +127,7 @@ _kvm_initvtop(kd)
* Make pmap_stod be an identity map so we can bootstrap it in.
* We assume it's in the first contiguous chunk of physical memory.
*/
- for (i = 0; i < BTSIZE; ++i)
+ for (i = 0; i < BTSIZE; ++i)
vm->pmap_stod[i] = i << 4;
/*
@@ -142,7 +142,7 @@ _kvm_initvtop(kd)
_kvm_err(kd, kd->program, "pmap_stod: no such symbol");
return (-1);
}
- if (kvm_read(kd, (u_long)nlist[0].n_value,
+ if (kvm_read(kd, (u_long)nlist[0].n_value,
(char *)vm->pmap_stod, sizeof(vm->pmap_stod))
!= sizeof(vm->pmap_stod)) {
_kvm_err(kd, kd->program, "cannot read pmap_stod");
@@ -194,7 +194,7 @@ _kvm_uvatop(kd, p, va, pa)
frame = pte & PG_PFNUM;
else
frame = HWTOSW(kd->vmst->pmap_stod, pte & PG_PFNUM);
- *pa = (frame << PGSHIFT) | off;
+ *pa = (frame << PGSHIFT) | off;
return (NBPG - off);
}
invalid:
@@ -205,7 +205,7 @@ invalid:
/*
* Translate a kernel virtual address to a physical address using the
* mapping information in kd->vm. Returns the result in pa, and returns
- * the number of bytes that are contiguously available from this
+ * the number of bytes that are contiguously available from this
* physical address. This routine is used only for crashdumps.
*/
int
OpenPOWER on IntegriCloud