From: Chuck Lever Date: Fri, 26 Sep 2008 17:23:18 +0000 (-0400) Subject: sm-notify command: clean up error logging X-Git-Tag: nfs-utils-1-1-4~23 X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=commitdiff_plain;h=7862a784c2990b1f5330959d30069a637a041715;hp=7862a784c2990b1f5330959d30069a637a041715 sm-notify command: clean up error logging Clean up a few issues with logging in sm-notify.c. Sometimes in sm-notify, when a system call fails the problem is reported to stderr but not logged, and then usually sm-notify exits. In cases like this, there are probably more hosts to notify, but sm-notify dies silently. Make sure these errors are logged, and that the log messages explain the nature of the problem. Also, if sm-notify exits prematurely, make sure this is always reported at the LOG_ERR level, not at the LOG_WARNING level. Remove a couple of unnecessary '\n' in the arguments of nsm_log() calls -- nsm_log() already appends an '\n' to the message. Finally, use exit() consistently in main(). Signed-off-by: Chuck Lever Signed-off-by: Steve Dickson ---