Skip to contentSkip to conversation

main - pvscan: recognize "pci" as a common symlink component in filters

PATCH David Teigland 1 participant 1 message Jan 31, 2023

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=6d14144d311fb347e4225ad6a48d4900b39445c4
Commit:        6d14144d311fb347e4225ad6a48d4900b39445c4
Parent:        c9fdc828ff0504bc2e57f65862bc382f7663a8a2
Author:        David Teigland <[email protected]>
AuthorDate:    Fri Jan 27 16:46:03 2023 -0600
Committer:     David Teigland <[email protected]>
CommitterDate: Tue Jan 31 15:30:35 2023 -0600

pvscan: recognize "pci" as a common symlink component in filters

In case the filter strings don't include "/dev/disk", and only include "pci".

---
 lib/filters/filter-regex.c | 2 ++
 1 file changed, 2 insertions(+)
lib/filters/filter-regex.c +2 -0
index 40dc8aa1b..ecc32914b 100644
@@ -284,6 +284,8 @@ static int _filter_contains_symlink(struct cmd_context *cmd, int filter_cfg)
 				return 1;
 			if (strstr(fname, "wwn-"))
 				return 1;
+			if (strstr(fname, "pci-"))
+				return 1;
 		}
 	}