summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-03-15 21:25:44 +0000
committerphk <phk@FreeBSD.org>2003-03-15 21:25:44 +0000
commit4dc0153e679ae4b5ddb114b9a41fa49db21a7dc7 (patch)
tree125df4c28da51da31dcdc348a86d4fcb94a713e1 /usr.bin
parentfe4be9d4fc972a30e34ca6b8dc7d877cea280b2c (diff)
downloadFreeBSD-src-4dc0153e679ae4b5ddb114b9a41fa49db21a7dc7.zip
FreeBSD-src-4dc0153e679ae4b5ddb114b9a41fa49db21a7dc7.tar.gz
Update to use current rev of devstat API.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/vmstat/vmstat.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c
index 0f0684e..fb99b2c 100644
--- a/usr.bin/vmstat/vmstat.c
+++ b/usr.bin/vmstat/vmstat.c
@@ -203,7 +203,7 @@ main(argc, argv)
maxshowdevs);
break;
case 'p':
- if (buildmatch(optarg, &matches, &num_matches) != 0)
+ if (devstat_buildmatch(optarg, &matches, &num_matches) != 0)
errx(1, "%s", devstat_errbuf);
break;
case 's':
@@ -268,7 +268,7 @@ main(argc, argv)
* kernel devstat version. If not, exit and print a
* message informing the user of his mistake.
*/
- if (checkversion() < 0)
+ if (devstat_checkversion(NULL) < 0)
errx(1, "%s", devstat_errbuf);
@@ -320,7 +320,7 @@ char **
getdrivedata(argv)
char **argv;
{
- if ((num_devices = getnumdevs()) < 0)
+ if ((num_devices = devstat_getnumdevs(NULL)) < 0)
errx(1, "%s", devstat_errbuf);
cur.dinfo = (struct devinfo *)malloc(sizeof(struct devinfo));
@@ -328,7 +328,7 @@ getdrivedata(argv)
bzero(cur.dinfo, sizeof(struct devinfo));
bzero(last.dinfo, sizeof(struct devinfo));
- if (getdevs(&cur) == -1)
+ if (devstat_getdevs(NULL, &cur) == -1)
errx(1, "%s", devstat_errbuf);
num_devices = cur.dinfo->numdevs;
@@ -360,7 +360,7 @@ getdrivedata(argv)
* those devices.
*/
if ((num_devices_specified == 0) && (num_matches == 0)) {
- if (buildmatch(da, &matches, &num_matches) != 0)
+ if (devstat_buildmatch(da, &matches, &num_matches) != 0)
errx(1, "%s", devstat_errbuf);
select_mode = DS_SELECT_ADD;
@@ -372,7 +372,7 @@ getdrivedata(argv)
* device list has changed, so we don't look for return values of 0
* or 1. If we get back -1, though, there is an error.
*/
- if (selectdevs(&dev_select, &num_selected, &num_selections,
+ if (devstat_selectdevs(&dev_select, &num_selected, &num_selections,
&select_generation, generation, cur.dinfo->devices,
num_devices, matches, num_matches, specified_devices,
num_devices_specified, select_mode,
@@ -437,7 +437,7 @@ dovmstat(interval, reps)
* the selection process again, in case a device that we
* were previously displaying has gone away.
*/
- switch (getdevs(&cur)) {
+ switch (devstat_getdevs(NULL, &cur)) {
case -1:
errx(1, "%s", devstat_errbuf);
break;
@@ -447,7 +447,7 @@ dovmstat(interval, reps)
num_devices = cur.dinfo->numdevs;
generation = cur.dinfo->generation;
- retval = selectdevs(&dev_select, &num_selected,
+ retval = devstat_selectdevs(&dev_select, &num_selected,
&num_selections, &select_generation,
generation, cur.dinfo->devices,
num_devices, matches, num_matches,
@@ -680,7 +680,7 @@ devstats()
last.cp_time[state] = tmp;
}
- busy_seconds = compute_etime(cur.busy_time, last.busy_time);
+ busy_seconds = devstat_compute_etime(cur.busy_time, last.busy_time);
for (dn = 0; dn < num_devices; dn++) {
int di;
OpenPOWER on IntegriCloud