+2003-07-02 NeilBrown <neilb@cse.unsw.edu.au>
+ Steve Dickson <SteveD@redhat.com>
+
+ * utils/mountd/mountd.man: Add valid kinds of debugging.
+ * utils/mountd/mountd.c(main): ignore SIGPIPE
+ * utils/nfsstat/nfsstat.c: fine-tune printing of warning so
+ we don't get warnings about unavailable stats that weren't asked
+ for.
+
2003-06-24 NeilBrown <neilb@cse.unsw.edu.au>
* support/nfs/nfsexport.c(exp_unexp): When unexporting filesystems
sigaction(SIGHUP, &sa, NULL);
sigaction(SIGINT, &sa, NULL);
sigaction(SIGTERM, &sa, NULL);
+ sigaction(SIGPIPE, &sa, NULL);
/* WARNING: the following works on Linux and SysV, but not BSD! */
sigaction(SIGCHLD, &sa, NULL);
.SH OPTIONS
.TP
.B \-d kind " or " \-\-debug kind
-Turn on debugging for kind.
+Turn on debugging. Valid kinds are: all, auth, call, general and parse.
.TP
.B \-F " or " \-\-foreground
Run in foreground (do not daemonize)
int opt_all = 0,
opt_srv = 0,
opt_clt = 0,
+ srv_info = 0,
+ clt_info = 0,
opt_prt = 0;
int c;
"server.\n");
}
- if ((opt_srv && !parse_statfile(NFSSVCSTAT, svcinfo))
- || (opt_clt && !parse_statfile(NFSCLTSTAT, cltinfo)))
- return 2;
+ if (opt_srv) {
+ srv_info = parse_statfile(NFSSVCSTAT, svcinfo);
+ if (srv_info == 0 && opt_clt == 0) {
+ fprintf(stderr, "Warning: No Server Stats (%s: %m).\n", NFSSVCSTAT);
+ return 2;
+ }
+ if (srv_info == 0)
+ opt_srv = 0;
+ }
+
+ if (opt_clt) {
+ clt_info = parse_statfile(NFSCLTSTAT, cltinfo);
+ if (opt_srv == 0 && clt_info == 0) {
+ fprintf(stderr, "Warning: No Client Stats (%s: %m).\n", NFSCLTSTAT);
+ return 2;
+ }
+ if (clt_info == 0)
+ opt_clt = 0;
+ }
if (opt_srv) {
if (opt_prt & PRNT_NET) {
* be a fatal error -- it usually means the module isn't loaded.
*/
if ((fp = fopen(name, "r")) == NULL) {
- fprintf(stderr, "Warning: %s: %m\n", name);
- return 1;
+ // fprintf(stderr, "Warning: %s: %m\n", name);
+ return 0;
}
while (fgets(buffer, sizeof(buffer), fp) != NULL) {