diff mbox

[16/94] multipath-tools: replace spaces with a regex in IBM/"3303 NVDISK"

Message ID 1476410236-9368-16-git-send-email-tang.wenjun3@zte.com.cn (mailing list archive)
State Not Applicable, archived
Delegated to: Mike Snitzer
Headers show

Commit Message

tang.wenjun3@zte.com.cn Oct. 14, 2016, 1:55 a.m. UTC
From: Xose Vazquez Perez <xose.vazquez@gmail.com>

Replace six spaces with any number of them.
Exact regex is "3303[ ]{6,6}NVDISK", but it looks too overloaded.

Tested with a regex checker from:
http://eli.thegreenplace.net/2012/11/14/some-notes-on-posix-regular-expressions

Cc: Brian King <brking@linux.vnet.ibm.com>
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
---
 libmultipath/hwtable.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c
index 9a4ab6e..9366829 100644
--- a/libmultipath/hwtable.c
+++ b/libmultipath/hwtable.c
@@ -529,8 +529,9 @@  static struct hwentry default_hw[] = {
 		.no_path_retry = (300 / DEFAULT_CHECKINT),
 	},
 	{
+		/* 3303 NVDISK */
 		.vendor        = "IBM",
-		.product       = "3303      NVDISK",
+		.product       = "3303[ ]+NVDISK",
 		.pgfailback    = FAILBACK_UNDEF,
 		.no_path_retry = (300 / DEFAULT_CHECKINT),
 	},