summaryrefslogtreecommitdiffstats
path: root/usr.bin/ktrdump
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2013-02-08 16:10:16 +0000
committerobrien <obrien@FreeBSD.org>2013-02-08 16:10:16 +0000
commit3028e3f8aba938dfd0bf9fda987b8a72140b8027 (patch)
treeb2f038222ff8a70f687652441df00d2b564c8abe /usr.bin/ktrdump
parent952a6d5a7cd3d3f9007acfa06805262fc04a105f (diff)
parent1d08d5f677c1dfa810e381073590adbae19cc69f (diff)
downloadFreeBSD-src-3028e3f8aba938dfd0bf9fda987b8a72140b8027.zip
FreeBSD-src-3028e3f8aba938dfd0bf9fda987b8a72140b8027.tar.gz
Sync with HEAD.
Diffstat (limited to 'usr.bin/ktrdump')
-rw-r--r--usr.bin/ktrdump/ktrdump.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/ktrdump/ktrdump.c b/usr.bin/ktrdump/ktrdump.c
index d74b979..77ae522 100644
--- a/usr.bin/ktrdump/ktrdump.c
+++ b/usr.bin/ktrdump/ktrdump.c
@@ -86,6 +86,7 @@ main(int ac, char **av)
u_long parms[KTR_PARMS];
struct ktr_entry *buf;
uintmax_t tlast, tnow;
+ unsigned long bufptr;
struct stat sb;
kvm_t *kd;
FILE *out;
@@ -179,8 +180,9 @@ main(int ac, char **av)
if ((buf = malloc(sizeof(*buf) * entries)) == NULL)
err(1, NULL);
if (kvm_read(kd, nl[2].n_value, &index, sizeof(index)) == -1 ||
- kvm_read(kd, nl[3].n_value, buf, sizeof(*buf) * entries)
- == -1)
+ kvm_read(kd, nl[3].n_value, &bufptr,
+ sizeof(bufptr)) == -1 ||
+ kvm_read(kd, bufptr, buf, sizeof(*buf) * entries) == -1)
errx(1, "%s", kvm_geterr(kd));
}
OpenPOWER on IntegriCloud