]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
sm-notify command: clean up error logging
authorChuck Lever <chuck.lever@oracle.com>
Fri, 26 Sep 2008 17:23:18 +0000 (13:23 -0400)
committerSteve Dickson <steved@redhat.com>
Fri, 26 Sep 2008 17:23:18 +0000 (13:23 -0400)
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 <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>

No differences found