From 9fbd5c08c4bf0c74ebb75c40358ee7a45138f080 Mon Sep 17 00:00:00 2001 From: Angus Salkeld Date: Sat, 22 Oct 2011 10:50:17 +1100 Subject: [PATCH] don't log an error if exiting with 0 Signed-off-by: Angus Salkeld Reviewed-by: Steven Dake --- exec/util.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/exec/util.c b/exec/util.c index 16ba3c84..064bee22 100644 --- a/exec/util.c +++ b/exec/util.c @@ -140,9 +140,13 @@ void _corosync_exit_error ( void _corosync_exit_error ( enum e_ais_done err, const char *file, unsigned int line) { - log_printf (LOGSYS_LEVEL_ERROR, "Corosync Cluster Engine exiting " - "with status %d at %s:%u.\n", err, file, line); - + if (err == AIS_DONE_EXIT) { + log_printf (LOGSYS_LEVEL_NOTICE, + "Corosync Cluster Engine exiting normally"); + } else { + log_printf (LOGSYS_LEVEL_ERROR, "Corosync Cluster Engine exiting " + "with status %d at %s:%u.\n", err, file, line); + } qb_log_fini(); exit (err); }