]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/statd/monitor.c
In recent Fedora builds, the '-D _FORTIFY_SOURCE=2' compile
[nfs-utils.git] / utils / statd / monitor.c
index 169cd78ac82b17a99c5ce90850bb97f4d4fac901..a2c9e2b091c126d2d24b84a870f946f1f479ca68 100644 (file)
@@ -204,7 +204,10 @@ sm_mon_1_svc(struct mon *argp, struct svc_req *rqstp)
                        e += sprintf(e, "%02x", 0xff & (argp->priv[i]));
                if (e+1-buf != LINELEN) abort();
                e += sprintf(e, " %s %s\n", mon_name, my_name);
-               write(fd, buf, e-buf);
+               if (write(fd, buf, e-buf) != (e-buf)) {
+                       note(N_WARNING, "writing to %s failed: errno %d (%s)",
+                               path, errno, strerror(errno));
+               }
        }
 
        free(path);