svn commit: r224198 - head/usr.bin/vmstat
Sergey Kandaurov
pluknet at FreeBSD.org
Mon Jul 18 19:42:18 UTC 2011
Author: pluknet
Date: Mon Jul 18 19:42:18 2011
New Revision: 224198
URL: http://svn.freebsd.org/changeset/base/224198
Log:
sintrcnt/sintrnames is the address of the size, not the actual size.
Use them appropriately to fetch the actual size.
That fixes vmstat -i with kvm backend.
Submitted by: peter
Approved by: re (kib)
Modified:
head/usr.bin/vmstat/vmstat.c
Modified: head/usr.bin/vmstat/vmstat.c
==============================================================================
--- head/usr.bin/vmstat/vmstat.c Mon Jul 18 19:26:16 2011 (r224197)
+++ head/usr.bin/vmstat/vmstat.c Mon Jul 18 19:42:18 2011 (r224198)
@@ -1153,8 +1153,8 @@ dointr(void)
uptime = getuptime();
if (kd != NULL) {
- intrcntlen = namelist[X_SINTRCNT].n_value;
- inamlen = namelist[X_SINTRNAMES].n_value;
+ kread(X_SINTRCNT, &intrcntlen, sizeof(intrcntlen));
+ kread(X_SINTRNAMES, &inamlen, sizeof(inamlen));
if ((intrcnt = malloc(intrcntlen)) == NULL ||
(intrname = malloc(inamlen)) == NULL)
err(1, "malloc()");
More information about the svn-src-head
mailing list