summaryrefslogtreecommitdiff
path: root/libexec/rpc.rstatd
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2003-03-15 21:04:50 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2003-03-15 21:04:50 +0000
commita57042df908fd4755e241bf01fbdee9c3f58b8c3 (patch)
tree4c5877cdf7a9c8de50623a0f8e1954eebfbe5ff9 /libexec/rpc.rstatd
parent26c4bf80c2a21a70d63dc6786f78258dbc3ab429 (diff)
downloadsrc-test2-a57042df908fd4755e241bf01fbdee9c3f58b8c3.tar.gz
src-test2-a57042df908fd4755e241bf01fbdee9c3f58b8c3.zip
Update to current devstat API.
Notes
Notes: svn path=/head/; revision=112283
Diffstat (limited to 'libexec/rpc.rstatd')
-rw-r--r--libexec/rpc.rstatd/rstat_proc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libexec/rpc.rstatd/rstat_proc.c b/libexec/rpc.rstatd/rstat_proc.c
index f673ab915b99..bb04c16b75a2 100644
--- a/libexec/rpc.rstatd/rstat_proc.c
+++ b/libexec/rpc.rstatd/rstat_proc.c
@@ -331,13 +331,13 @@ haveadisk(void)
struct statinfo stats;
int num_devices, retval = 0;
- if ((num_devices = getnumdevs()) < 0) {
+ if ((num_devices = devstat_getnumdevs(NULL)) < 0) {
syslog(LOG_ERR, "rstatd: can't get number of devices: %s",
devstat_errbuf);
exit(1);
}
- if (checkversion() < 0) {
+ if (devstat_checkversion(NULL) < 0) {
syslog(LOG_ERR, "rstatd: %s", devstat_errbuf);
exit(1);
}
@@ -345,7 +345,7 @@ haveadisk(void)
stats.dinfo = (struct devinfo *)malloc(sizeof(struct devinfo));
bzero(stats.dinfo, sizeof(struct devinfo));
- if (getdevs(&stats) == -1) {
+ if (devstat_getdevs(NULL, &stats) == -1) {
syslog(LOG_ERR, "rstatd: can't get device list: %s",
devstat_errbuf);
exit(1);
@@ -375,13 +375,13 @@ updatexfers(int numdevs, int *devs)
int num_devices = 0;
u_int64_t total_transfers;
- if ((num_devices = getnumdevs()) < 0) {
+ if ((num_devices = devstat_getnumdevs(NULL)) < 0) {
syslog(LOG_ERR, "rstatd: can't get number of devices: %s",
devstat_errbuf);
exit(1);
}
- if (checkversion() < 0) {
+ if (devstat_checkversion(NULL) < 0) {
syslog(LOG_ERR, "rstatd: %s", devstat_errbuf);
exit(1);
}
@@ -389,7 +389,7 @@ updatexfers(int numdevs, int *devs)
stats.dinfo = (struct devinfo *)malloc(sizeof(struct devinfo));
bzero(stats.dinfo, sizeof(struct devinfo));
- if (getdevs(&stats) == -1) {
+ if (devstat_getdevs(NULL, &stats) == -1) {
syslog(LOG_ERR, "rstatd: can't get device list: %s",
devstat_errbuf);
exit(1);