summaryrefslogtreecommitdiffstats
path: root/mdmon.h
diff options
context:
space:
mode:
authorPawel Baldysiak <pawel.baldysiak@intel.com>2015-02-11 22:25:03 +0100
committerNeilBrown <neilb@suse.de>2015-02-12 02:11:01 +0100
commitd56dd607ba433d9334f0fb4114fe081742ae4361 (patch)
tree80fa1ea9cdc500c5316b6b58998e4de37694272c /mdmon.h
parentMonitor: fix for regression with container devices (diff)
downloadmdadm-d56dd607ba433d9334f0fb4114fe081742ae4361.tar.xz
mdadm-d56dd607ba433d9334f0fb4114fe081742ae4361.zip
Change way of printing name of a process
Sometimes mdadm prints messages with wrong name "mdmon", and vice versa. This patch solves this problem by changing method of determining process name. Now "Name" will be set in const at start of a program, previously was hardcoded as #define. Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com> Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdmon.h')
-rw-r--r--mdmon.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/mdmon.h b/mdmon.h
index 5a8e1209..aa750c68 100644
--- a/mdmon.h
+++ b/mdmon.h
@@ -18,8 +18,7 @@
* 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#undef pr_err
-#define pr_err(fmt ...) fprintf(stderr, "mdmon: " fmt)
+extern const char Name[];
enum array_state { clear, inactive, suspended, readonly, read_auto,
clean, active, write_pending, active_idle, bad_word};