Re: [PATCH] multipath-tools: remove pointless ".*" from devnode blacklists

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Merged.
Thanks.

On Mon, Oct 3, 2016 at 5:53 PM, Xose Vazquez Perez <xose.vazquez@xxxxxxxxx> wrote:
".*" is useless at the end of a regex, and just "*" is a bug.
And document them.

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@xxxxxxxxxx>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@xxxxxxxxx>
---
 libmultipath/blacklist.c   | 8 ++++----
 multipath/multipath.conf.5 | 6 +++++-
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/libmultipath/blacklist.c b/libmultipath/blacklist.c
index 9687399..aa8d975 100644
--- a/libmultipath/blacklist.c
+++ b/libmultipath/blacklist.c
@@ -172,7 +172,7 @@ setup_default_blist (struct config * conf)
        char * str;
        int i;

-       str = STRDUP("^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*");
+       str = STRDUP("^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]");
        if (!str)
                return 1;
        if (store_ble(conf->blist_devnode, str, ORIGIN_DEFAULT))
@@ -184,19 +184,19 @@ setup_default_blist (struct config * conf)
        if (store_ble(conf->blist_devnode, str, ORIGIN_DEFAULT))
                return 1;

-       str = STRDUP("^dcssblk[0-9]*");
+       str = STRDUP("^dcssblk[0-9]");
        if (!str)
                return 1;
        if (store_ble(conf->blist_devnode, str, ORIGIN_DEFAULT))
                return 1;

-       str = STRDUP("^nvme.*");
+       str = STRDUP("^nvme");
        if (!str)
                return 1;
        if (store_ble(conf->blist_devnode, str, ORIGIN_DEFAULT))
                return 1;

-       str = STRDUP("(SCSI_IDENT_.*|ID_WWN)");
+       str = STRDUP("(SCSI_IDENT_|ID_WWN)");
        if (!str)
                return 1;
        if (store_ble(conf->elist_property, str, ORIGIN_DEFAULT))
diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5
index 7dd997a..7bb847a 100644
--- a/multipath/multipath.conf.5
+++ b/multipath/multipath.conf.5
@@ -849,6 +849,10 @@ The following keywords are recognized:
 .TP 17
 .B devnode
 Regular _expression_ of the device nodes to be excluded.
+.RS
+.TP
+Default value is: \fB^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]\fR, \fB^(td|hd|vd)[a-z]\fR, \fB^dcssblk[0-9]\fR and \fB^nvme\fR
+.RE
 .TP
 .B wwid
 The \fIWorld Wide Identification\fR of a device.
@@ -888,7 +892,7 @@ The \fIWorld Wide Identification\fR of a device.
 Regular _expression_ of the udev property to be whitelisted.
 .RS
 .TP
-Default value is: \fB(ID_WWN|SCSI_IDENT_.*)\fR
+Default value is: \fB(SCSI_IDENT_|ID_WWN)\fR
 .RE
 .TP
 .B device
--
2.10.0


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

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux