[dm-devel] [PATCH] multipath-tools: remove pointless ".*" from devnode blacklists
Christophe Varoqui
christophe.varoqui at opensvc.com
Mon Oct 3 16:05:40 UTC 2016
Merged.
Thanks.
On Mon, Oct 3, 2016 at 5:53 PM, Xose Vazquez Perez <xose.vazquez at gmail.com>
wrote:
> ".*" is useless at the end of a regex, and just "*" is a bug.
> And document them.
>
> Cc: Christophe Varoqui <christophe.varoqui at opensvc.com>
> Cc: device-mapper development <dm-devel at redhat.com>
> Signed-off-by: Xose Vazquez Perez <xose.vazquez at gmail.com>
> ---
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20161003/24f99a5c/attachment.htm>
More information about the dm-devel
mailing list