summaryrefslogtreecommitdiffstats
path: root/lib/libkvm
diff options
context:
space:
mode:
authorben <ben@FreeBSD.org>2000-12-30 21:52:34 +0000
committerben <ben@FreeBSD.org>2000-12-30 21:52:34 +0000
commitcc8f3da609f07ba92296f49c72052c564b0477d0 (patch)
tree4a6c9ec9cc59af629465c2823b201e96bca7e351 /lib/libkvm
parent4ea1588b37cbd62c1c2af3dfbd4c731cde0ea954 (diff)
downloadFreeBSD-src-cc8f3da609f07ba92296f49c72052c564b0477d0.zip
FreeBSD-src-cc8f3da609f07ba92296f49c72052c564b0477d0.tar.gz
Use macro API to <sys/queue.h>
Diffstat (limited to 'lib/libkvm')
-rw-r--r--lib/libkvm/kvm_file.c6
-rw-r--r--lib/libkvm/kvm_proc.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/libkvm/kvm_file.c b/lib/libkvm/kvm_file.c
index 796dcfd..16b31fd 100644
--- a/lib/libkvm/kvm_file.c
+++ b/lib/libkvm/kvm_file.c
@@ -102,7 +102,7 @@ kvm_deadfiles(kd, op, arg, filehead_o, 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");
@@ -156,8 +156,8 @@ kvm_getfiles(kd, op, arg, 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); nfiles++, fp++)
- filehead.lh_first = fp->f_list.le_next;
+ for (nfiles = 0; LIST_FIRST(&filehead) && (fp < fplim); nfiles++, fp++)
+ 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 2a0ee8c..8def3be 100644
--- a/lib/libkvm/kvm_proc.c
+++ b/lib/libkvm/kvm_proc.c
@@ -123,7 +123,7 @@ kvm_proclist(kd, what, arg, p, bp, maxcnt)
kp = &kinfo_proc;
kp->ki_structsize = sizeof(kinfo_proc);
- 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);
OpenPOWER on IntegriCloud