multipath-tools: remove pointless ".*" at the end of a regex
PATCH 1/2 multipath-tools: remove pointless ".*" at the end of a regex
At your option, they can be preserved to indicate "maybe anything could appear".
Cc Christophe Varoqui <[email protected]>
Cc device-mapper development <[email protected]>
Signed-off-by Xose Vazquez Perez <[email protected]>
--- libmultipath/hwtable.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-)
libmultipath/hwtable.c +12 -12
@@ -31,7 +31,7 @@ static struct hwentry default_hw[] = {* Mail : [email protected] */ { - .vendor = "APPLE.*", + .vendor = "APPLE", .product = "Xserve RAID", .pgpolicy = MULTIBUS, .pgfailback = FAILBACK_UNDEF,
@@ -70,7 +70,7 @@ static struct hwentry default_hw[] = { {/* MSA 1000/1500 and EVA 3000/5000, with old firmware */ .vendor = "(COMPAQ|HP)", - .product = "(MSA|HSV)1.0.*", + .product = "(MSA|HSV)1.0", .features = "1 queue_if_no_path", .hwhandler = "1 hp_sw", .pgpolicy = GROUP_BY_PRIO,
@@ -143,7 +143,7 @@ static struct hwentry default_hw[] = { {/* Smart Array */ .vendor = "HP", - .product = "LOGICAL VOLUME.*", + .product = "LOGICAL VOLUME", .pgpolicy = MULTIBUS, .pgfailback = FAILBACK_UNDEF, .no_path_retry = 12,
@@ -290,14 +290,14 @@ static struct hwentry default_hw[] = { {/* USP-V, HUS VM, VSP, VSP G1000 and VSP GX00 families */ .vendor = "(HITACHI|HP)", - .product = "OPEN-.*", + .product = "OPEN-", .pgpolicy = MULTIBUS, .pgfailback = FAILBACK_UNDEF, }, {/* AMS 2000 and HUS 100 families */ .vendor = "HITACHI", - .product = "DF.*", + .product = "DF", .features = "1 queue_if_no_path", .pgpolicy = GROUP_BY_PRIO, .pgfailback = -FAILBACK_IMMEDIATE,
@@ -479,7 +479,7 @@ static struct hwentry default_hw[] = { { .vendor = "IBM", .product = "S/390 DASD ECKD", - .bl_product = "S/390.*", + .bl_product = "S/390", .uid_attribute = "ID_UID", .features = "1 queue_if_no_path", .pgpolicy = MULTIBUS,
@@ -488,7 +488,7 @@ static struct hwentry default_hw[] = { { .vendor = "IBM", .product = "S/390 DASD FBA", - .bl_product = "S/390.*", + .bl_product = "S/390", .uid_attribute = "ID_UID", .features = "1 queue_if_no_path", .pgpolicy = MULTIBUS,
@@ -497,7 +497,7 @@ static struct hwentry default_hw[] = { {/* Power RAID */ .vendor = "IBM", - .product = "^IPR.*", + .product = "^IPR", .features = "1 queue_if_no_path", .hwhandler = "1 alua", .pgpolicy = GROUP_BY_PRIO,
@@ -562,7 +562,7 @@ static struct hwentry default_hw[] = {* Mail : [email protected] */ .vendor = "NETAPP", - .product = "LUN.*", + .product = "LUN", .features = "3 queue_if_no_path pg_init_retries 50", .pgpolicy = GROUP_BY_PRIO, .pgfailback = -FAILBACK_IMMEDIATE,
@@ -627,7 +627,7 @@ static struct hwentry default_hw[] = { {/* InfiniteStorage ??? */ .vendor = "SGI", - .product = "IS.*", + .product = "IS", .bl_product = "Universal Xport", .features = "2 pg_init_retries 50", .hwhandler = "1 rdac",
@@ -660,7 +660,7 @@ static struct hwentry default_hw[] = {* Mail : [email protected] */ .vendor = "Pillar", - .product = "Axiom.*", + .product = "Axiom", .pgpolicy = GROUP_BY_PRIO, .pgfailback = -FAILBACK_IMMEDIATE, .prio_name = PRIO_ALUA,
@@ -836,7 +836,7 @@ static struct hwentry default_hw[] = {*/ { .vendor = "NFINIDAT", - .product = "InfiniBox.*", + .product = "InfiniBox", .prio_name = PRIO_ALUA, .selector = "round-robin 0", .pgpolicy = GROUP_BY_PRIO,
Signature · 1 line
2.7.4
PATCH 2/2 multipath-tools: inform that regex can be used in vendor, product and bl_product
Right now they are too wide regex, for example: "HITACHI"/"DF" or "SGI"/"IS". It should be used more extensively, at least, in product-ID.
As I did in 34e345e8
Cc Christophe Varoqui <[email protected]>
Cc device-mapper development <[email protected]>
Signed-off-by Xose Vazquez Perez <[email protected]>
--- libmultipath/hwtable.c | 1 + 1 file changed, 1 insertion(+)
libmultipath/hwtable.c +1 -0
@@ -868,6 +868,7 @@ static struct hwentry default_hw[] = {* Keep only mandatory and modified attributes. * Attributes with default values must be removed. * .vendor and .product are mandatory, all other are optional. +* POSIX regex can be used in .vendor, .product and .bl_product * * COMPANY_NAME *
Signature · 1 line
2.7.4
Re: [PATCH 2/2] multipath-tools: inform that regex can be used in vendor, product and bl_product
On 08/04/2016 07:31 PM, Xose Vazquez Perez wrote:
Please, DROP this one. Thanks.
Quoted 24 lines
Right now they are too wide regex, for example: "HITACHI"/"DF" or "SGI"/"IS". It should be used more extensively, at least, in product-ID.
As I did in34e345e8Cc Christophe Varoqui <[email protected]>Cc device-mapper development <[email protected]>Signed-off-by Xose Vazquez Perez <[email protected]>--- libmultipath/hwtable.c | 1 + 1 file changed, 1 insertion(+)libmultipath/hwtable.c +1
-0@@ -868,6 +868,7 @@ static struct hwentry default_hw[] = {* Keep only mandatory and modified attributes. * Attributes with default values must be removed. * .vendor and .product are mandatory, all other are optional. +* POSIX regex can be used in .vendor, .product and .bl_product * * COMPANY_NAME *