diff mbox series

[07/21] libmultipath/checkers: hp_sw: use message id

Message ID 20181011222707.3631-8-mwilck@suse.com (mailing list archive)
State Not Applicable, archived
Delegated to: christophe varoqui
Headers show
Series libmultipath: checkers overhaul | expand

Commit Message

Martin Wilck Oct. 11, 2018, 10:26 p.m. UTC
Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 libmultipath/checkers/hp_sw.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

Comments

Benjamin Marzinski Oct. 25, 2018, 8:58 p.m. UTC | #1
On Fri, Oct 12, 2018 at 12:26:53AM +0200, Martin Wilck wrote:

Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>

> Signed-off-by: Martin Wilck <mwilck@suse.com>
> ---
>  libmultipath/checkers/hp_sw.c | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)
> 
> diff --git a/libmultipath/checkers/hp_sw.c b/libmultipath/checkers/hp_sw.c
> index 0ad34a6b..d7f1018c 100644
> --- a/libmultipath/checkers/hp_sw.c
> +++ b/libmultipath/checkers/hp_sw.c
> @@ -27,10 +27,6 @@
>  #define MX_ALLOC_LEN		255
>  #define HEAVY_CHECK_COUNT       10
>  
> -#define MSG_HP_SW_UP	"hp_sw checker reports path is up"
> -#define MSG_HP_SW_DOWN	"hp_sw checker reports path is down"
> -#define MSG_HP_SW_GHOST	"hp_sw checker reports path is ghost"
> -
>  struct sw_checker_context {
>  	void * dummy;
>  };
> @@ -128,14 +124,14 @@ int libcheck_check(struct checker * c)
>  	char buff[MX_ALLOC_LEN];
>  
>  	if (0 != do_inq(c->fd, 0, 1, 0x80, buff, MX_ALLOC_LEN, 0, c->timeout)) {
> -		MSG(c, MSG_HP_SW_DOWN);
> +		c->msgid = CHECKER_MSGID_DOWN;
>  		return PATH_DOWN;
> -	}
> +	};
>  
>  	if (do_tur(c->fd, c->timeout)) {
> -		MSG(c, MSG_HP_SW_GHOST);
> +		c->msgid = CHECKER_MSGID_GHOST;
>  		return PATH_GHOST;
>  	}
> -	MSG(c, MSG_HP_SW_UP);
> +	c->msgid = CHECKER_MSGID_UP;
>  	return PATH_UP;
>  }
> -- 
> 2.19.0

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

Patch

diff --git a/libmultipath/checkers/hp_sw.c b/libmultipath/checkers/hp_sw.c
index 0ad34a6b..d7f1018c 100644
--- a/libmultipath/checkers/hp_sw.c
+++ b/libmultipath/checkers/hp_sw.c
@@ -27,10 +27,6 @@ 
 #define MX_ALLOC_LEN		255
 #define HEAVY_CHECK_COUNT       10
 
-#define MSG_HP_SW_UP	"hp_sw checker reports path is up"
-#define MSG_HP_SW_DOWN	"hp_sw checker reports path is down"
-#define MSG_HP_SW_GHOST	"hp_sw checker reports path is ghost"
-
 struct sw_checker_context {
 	void * dummy;
 };
@@ -128,14 +124,14 @@  int libcheck_check(struct checker * c)
 	char buff[MX_ALLOC_LEN];
 
 	if (0 != do_inq(c->fd, 0, 1, 0x80, buff, MX_ALLOC_LEN, 0, c->timeout)) {
-		MSG(c, MSG_HP_SW_DOWN);
+		c->msgid = CHECKER_MSGID_DOWN;
 		return PATH_DOWN;
-	}
+	};
 
 	if (do_tur(c->fd, c->timeout)) {
-		MSG(c, MSG_HP_SW_GHOST);
+		c->msgid = CHECKER_MSGID_GHOST;
 		return PATH_GHOST;
 	}
-	MSG(c, MSG_HP_SW_UP);
+	c->msgid = CHECKER_MSGID_UP;
 	return PATH_UP;
 }