summaryrefslogtreecommitdiff
path: root/lib/libkvm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libkvm')
-rw-r--r--lib/libkvm/kvm_file.c10
-rw-r--r--lib/libkvm/kvm_proc.c6
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/libkvm/kvm_file.c b/lib/libkvm/kvm_file.c
index 023b28039cd..aeada10d1d3 100644
--- a/lib/libkvm/kvm_file.c
+++ b/lib/libkvm/kvm_file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kvm_file.c,v 1.12 2004/09/15 19:31:31 miod Exp $ */
+/* $OpenBSD: kvm_file.c,v 1.13 2005/10/12 07:24:28 otto Exp $ */
/* $NetBSD: kvm_file.c,v 1.5 1996/03/18 22:33:18 thorpej Exp $ */
/*-
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)kvm_file.c 8.1 (Berkeley) 6/4/93";
#else
-static char *rcsid = "$OpenBSD: kvm_file.c,v 1.12 2004/09/15 19:31:31 miod Exp $";
+static char *rcsid = "$OpenBSD: kvm_file.c,v 1.13 2005/10/12 07:24:28 otto Exp $";
#endif
#endif /* LIBC_SCCS and not lint */
@@ -98,7 +98,7 @@ kvm_deadfiles(kvm_t *kd, int op, int arg, long filehead_o, int nfiles)
/*
* followed by an array of file structures
*/
- for (fp = filehead.lh_first; fp != 0; fp = fp->f_list.le_next) {
+ LIST_FOREACH(fp, &filehead, f_list) {
if (buflen > sizeof (struct file)) {
if (KREAD(kd, (long)fp, ((struct file *)where))) {
_kvm_err(kd, kd->program, "can't read kfp");
@@ -149,9 +149,9 @@ kvm_getfiles(kvm_t *kd, int op, int arg, int *cnt)
filehead = *(struct filelist *)kd->argspc;
fp = (struct file *)(kd->argspc + sizeof (filehead));
fplim = (struct file *)(kd->argspc + size);
- for (nfiles = 0; filehead.lh_first && (fp < fplim);
+ for (nfiles = 0; LIST_FIRST(&filehead) && (fp < fplim);
nfiles++, fp++)
- filehead.lh_first = fp->f_list.le_next;
+ LIST_FIRST(&filehead) = LIST_NEXT(fp, f_list);
} else {
struct nlist nl[3], *p;
diff --git a/lib/libkvm/kvm_proc.c b/lib/libkvm/kvm_proc.c
index 9ca4a9a4076..d4d43e19c25 100644
--- a/lib/libkvm/kvm_proc.c
+++ b/lib/libkvm/kvm_proc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kvm_proc.c,v 1.26 2004/06/24 21:06:47 millert Exp $ */
+/* $OpenBSD: kvm_proc.c,v 1.27 2005/10/12 07:24:28 otto Exp $ */
/* $NetBSD: kvm_proc.c,v 1.30 1999/03/24 05:50:50 mrg Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
#if 0
static char sccsid[] = "@(#)kvm_proc.c 8.3 (Berkeley) 9/23/93";
#else
-static char *rcsid = "$OpenBSD: kvm_proc.c,v 1.26 2004/06/24 21:06:47 millert Exp $";
+static char *rcsid = "$OpenBSD: kvm_proc.c,v 1.27 2005/10/12 07:24:28 otto Exp $";
#endif
#endif /* LIBC_SCCS and not lint */
@@ -273,7 +273,7 @@ kvm_proclist(kvm_t *kd, int what, int arg, struct proc *p,
struct tty tty;
int cnt = 0;
- for (; cnt < maxcnt && p != NULL; p = proc.p_list.le_next) {
+ for (; cnt < maxcnt && p != NULL; p = LIST_NEXT(&proc, p_list)) {
if (KREAD(kd, (u_long)p, &proc)) {
_kvm_err(kd, kd->program, "can't read proc at %x", p);
return (-1);