From: NeilBrown Date: Tue, 7 Apr 2015 23:17:17 +0000 (+1000) Subject: Monitor: Obey "space protocol" when writing to syslog. X-Git-Tag: mdadm-3.3.3~72 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b033913a3cc3cdd2c1dea9a9fcb13e6c463a689a;p=thirdparty%2Fmdadm.git Monitor: Obey "space protocol" when writing to syslog. "alert" treats the "disc" arg differently if it starts with a space. At least it does for sending email. It doesn't for writing to syslog. Make this consistent and obey the 'space protocol' when writing to syslog. Signed-off-by: NeilBrown --- diff --git a/Monitor.c b/Monitor.c index 50ff7ecb..3647768a 100644 --- a/Monitor.c +++ b/Monitor.c @@ -426,9 +426,13 @@ static void alert(char *event, char *dev, char *disc, struct alert_info *info) else priority = LOG_INFO; - if (disc) + if (disc && disc[0] != ' ') syslog(priority, "%s event detected on md device %s, component device %s", event, dev, disc); + else if (disc) + syslog(priority, + "%s event detected on md device %s: %s", + event, dev, disc); else syslog(priority, "%s event detected on md device %s",