Don't truncate existing error when writing the log.

Suggested by:	markj
MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
This commit is contained in:
Bryan Drewery 2016-05-27 23:58:00 +00:00
parent 33094a87c4
commit b7622235d0

View File

@ -66,7 +66,7 @@ filemon_output(struct filemon *filemon, char *msg, size_t len)
bwillwrite();
error = fo_write(filemon->fp, &auio, filemon->cred, 0, curthread);
if (error != 0)
if (error != 0 && filemon->error == 0)
filemon->error = error;
}