Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107579648
D41428.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D41428.diff
View Options
diff --git a/usr.bin/nfsstat/nfsstat.c b/usr.bin/nfsstat/nfsstat.c
--- a/usr.bin/nfsstat/nfsstat.c
+++ b/usr.bin/nfsstat/nfsstat.c
@@ -83,7 +83,6 @@
#include <string.h>
#include <paths.h>
#include <devstat.h>
-#include <err.h>
#include <libxo/xo.h>
@@ -168,7 +167,7 @@
mntbuf->f_mntfromname,
mntbuf->f_mntonname, buf);
else if (errno == EPERM)
- errx(1, "Only privileged users"
+ xo_errx(1, "Only privileged users"
" can use the -m option");
}
mntbuf++;
@@ -241,7 +240,8 @@
xo_close_container("nfsstat");
}
- xo_finish();
+ if (xo_finish() < 0)
+ xo_err(1, "stdout");
exit(0);
}
@@ -505,8 +505,7 @@
static void
usage(void)
{
- (void)fprintf(stderr,
- "usage: nfsstat [-cdEemqszW] [-w wait]\n");
+ xo_error("usage: nfsstat [-cdEemqszW] [-w wait]\n");
exit(1);
}
@@ -1131,7 +1130,7 @@
ext_nfsstatsp = &lastst;
ext_nfsstatsp->vers = NFSSTATS_V1;
if (nfssvc(NFSSVC_GETSTATS | NFSSVC_NEWSTRUCT, ext_nfsstatsp) < 0)
- err(1, "Can't get stats");
+ xo_err(1, "Can't get stats");
clock_gettime(CLOCK_MONOTONIC, &lastts);
compute_totals(&lasttotal, ext_nfsstatsp);
sleep(interval);
@@ -1141,7 +1140,7 @@
ext_nfsstatsp->vers = NFSSTATS_V1;
if (nfssvc(NFSSVC_GETSTATS | NFSSVC_NEWSTRUCT, ext_nfsstatsp)
< 0)
- err(1, "Can't get stats");
+ xo_err(1, "Can't get stats");
clock_gettime(CLOCK_MONOTONIC, &ts);
if (--hdrcnt == 0) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 17, 4:37 AM (21 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15833591
Default Alt Text
D41428.diff (1 KB)
Attached To
Mode
D41428: nfsstat: Complete libxo transition.
Attached
Detach File
Event Timeline
Log In to Comment