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 <neilb@suse.de>
This commit is contained in:
parent
783bbc2b13
commit
b033913a3c
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue