X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fstatd%2Fmonitor.c;h=98cbf4a5940ba660bda50aa944f01769b0ee9ea4;hp=88b33db0ab478ac22a4bd33384a4cb204a244665;hb=3419e37500dfd19cb2c246260dbd2bc0ee4704d4;hpb=189ccff8698f922ccefe52bc72f66da2c66fa087 diff --git a/utils/statd/monitor.c b/utils/statd/monitor.c index 88b33db..98cbf4a 100644 --- a/utils/statd/monitor.c +++ b/utils/statd/monitor.c @@ -7,7 +7,9 @@ * NSM for Linux. */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif #include #include @@ -15,6 +17,7 @@ #include #include #include +#include #include #include "misc.h" #include "statd.h" @@ -172,7 +175,7 @@ sm_mon_1_svc(struct mon *argp, struct svc_req *rqstp) sprintf(path, "%s/%s", SM_DIR, mon_name); if ((fd = open(path, O_WRONLY|O_SYNC|O_CREAT, S_IRUSR|S_IWUSR)) < 0) { /* Didn't fly. We won't monitor. */ - note(N_ERROR, "creat(%s) failed: %m", path); + note(N_ERROR, "creat(%s) failed: %s", path, strerror (errno)); nlist_free(NULL, clnt); free(path); goto failure; @@ -265,7 +268,9 @@ sm_unmon_1_svc(struct mon_id *argp, struct svc_req *rqstp) clnt = NL_NEXT(clnt); } +#ifdef RESTRICTED_STATD failure: +#endif note(N_WARNING, "Received erroneous SM_UNMON request from %s for %s", my_name, mon_name); return (&result); @@ -333,6 +338,8 @@ sm_unmon_all_1_svc(struct my_id *argp, struct svc_req *rqstp) dprintf(N_DEBUG, "SM_UNMON_ALL request from %s with no " "SM_MON requests from it.", my_name); } +#ifdef RESTRICTED_STATD failure: +#endif return (&result); }