FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 04-27-2011, 07:52 PM
Benjamin Marzinski
 
Default multipath: clear checker message

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] = '';
+}
+
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 */

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 04-27-2011, 09:01 PM
Christophe Varoqui
 
Default multipath: clear checker message

On mer., 2011-04-27 at 14:52 -0500, Benjamin Marzinski wrote:
> Clear the checker message at the start of get_state, so that stale checker
> messages aren't accidentally printed.
>
doh!
applied, thanks.

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 01:05 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org