device-mapper-multipath/0008-multipathd-add-failures-path-format-wildcard.patch
Benjamin Marzinski 938e745304 device-mapper-multipath-0.7.6-3.git1cb704b
Add 0008-multipathd-add-failures-path-format-wildcard.patch
Add 0009-multipathd-fix-reservation_key-check.patch
Rename files
  * Previous patches 0008-0015 are now patches 0010-0017
2018-04-24 15:54:32 -05:00

41 lines
1.2 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Benjamin Marzinski <bmarzins@redhat.com>
Date: Thu, 19 Apr 2018 17:36:56 -0500
Subject: [PATCH] multipathd: add failures path format wildcard
multipath already tracks this, so it should be able to print it out.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
libmultipath/print.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/libmultipath/print.c b/libmultipath/print.c
index d532994..b1844c9 100644
--- a/libmultipath/print.c
+++ b/libmultipath/print.c
@@ -632,6 +632,12 @@ snprint_path_foreign (char * buff, size_t len, const struct path * pp)
return snprintf(buff, len, "%s", "--");
}
+static int
+snprint_path_failures(char * buff, size_t len, const struct path * pp)
+{
+ return snprint_int(buff, len, pp->failcount);
+}
+
struct multipath_data mpd[] = {
{'n', "name", 0, snprint_name},
{'w', "uuid", 0, snprint_multipath_uuid},
@@ -680,6 +686,7 @@ struct path_data pd[] = {
{'r', "target WWPN", 0, snprint_tgt_wwpn},
{'a', "host adapter", 0, snprint_host_adapter},
{'G', "foreign", 0, snprint_path_foreign},
+ {'0', "failures", 0, snprint_path_failures},
{0, NULL, 0 , NULL}
};
--
2.7.4