From: Benjamin Marzinski <bmarzins@redhat.com>
To: device-mapper development <dm-devel@redhat.com>
Subject: [PATCH] multipath: clear checker message
Date: Wed, 27 Apr 2011 14:52:14 -0500 [thread overview]
Message-ID: <20110427195214.GP23657@ether.msp.redhat.com> (raw)
Clear the checker message at the start of get_state, so that stale checker
messages aren't accidentally printed.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
libmultipath/checkers.c | 5 +++++
libmultipath/checkers.h | 1 +
libmultipath/discovery.c | 1 +
3 files changed, 7 insertions(+)
Index: multipath-tools-110412/libmultipath/discovery.c
===================================================================
--- multipath-tools-110412.orig/libmultipath/discovery.c
+++ multipath-tools-110412/libmultipath/discovery.c
@@ -848,6 +848,7 @@ get_state (struct path * pp, int daemon)
return PATH_UNCHECKED;
}
}
+ checker_clear_message(c);
state = path_offline(pp);
if (state != PATH_UP) {
condlog(3, "%s: path inaccessible", pp->dev);
Index: multipath-tools-110412/libmultipath/checkers.c
===================================================================
--- multipath-tools-110412.orig/libmultipath/checkers.c
+++ multipath-tools-110412/libmultipath/checkers.c
@@ -183,6 +183,11 @@ char * checker_message (struct checker *
return c->message;
}
+void checker_clear_message (struct checker *c)
+{
+ c->message[0] = '\0';
+}
+
void checker_get (struct checker * dst, char * name)
{
struct checker * src = checker_lookup(name);
Index: multipath-tools-110412/libmultipath/checkers.h
===================================================================
--- multipath-tools-110412.orig/libmultipath/checkers.h
+++ multipath-tools-110412/libmultipath/checkers.h
@@ -114,6 +114,7 @@ int checker_check (struct checker *);
int checker_selected (struct checker *);
char * checker_name (struct checker *);
char * checker_message (struct checker *);
+void checker_clear_message (struct checker *c);
void checker_get (struct checker *, char *);
#endif /* _CHECKERS_H */
next reply other threads:[~2011-04-27 19:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-27 19:52 Benjamin Marzinski [this message]
2011-04-27 21:01 ` [PATCH] multipath: clear checker message Christophe Varoqui
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110427195214.GP23657@ether.msp.redhat.com \
--to=bmarzins@redhat.com \
--cc=dm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.