]> git.ipfire.org Git - thirdparty/mdadm.git/commit - Monitor.c
Mdmonitor: Add helper functions
authorMateusz Grzonka <mateusz.grzonka@intel.com>
Thu, 2 Feb 2023 11:27:01 +0000 (12:27 +0100)
committerJes Sorensen <jes@trained-monkey.org>
Thu, 2 Mar 2023 15:51:02 +0000 (10:51 -0500)
commitcc3df167c599d2ee0c132149c86fc0ad70d9f14e
tree77bea3d9a950958172d4bef531e192af190cc2bf
parent50232a6ec4a5c46c608181d72d0c633831a03134
Mdmonitor: Add helper functions

Add functions:
- is_email_event(),
- get_syslog_event_priority(),
- sprint_event_message(),
with kernel style comments containing more detailed descriptions.

Also update event syslog priorities to be consistent with man. MoveSpare event was described in man as priority info, while implemented as warning. Move event data into a struct, so that it is passed between different functions if needed.
Sort function declarations alphabetically and remove redundant alert() declaration.

Signed-off-by: Mateusz Grzonka <mateusz.grzonka@intel.com>
Acked-by: Coly Li <colyli@suse.de>
Signed-off-by: Jes Sorensen <jes@trained-monkey.org>
Monitor.c