diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/commands/toolcontext.h | 1 | ||||
-rw-r--r-- | lib/filters/filter-regex.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/commands/toolcontext.h b/lib/commands/toolcontext.h index 7f5fd12fc..4069b6116 100644 --- a/lib/commands/toolcontext.h +++ b/lib/commands/toolcontext.h @@ -207,6 +207,7 @@ struct cmd_context { unsigned udevoutput:1; unsigned online_vg_file_removed:1; unsigned disable_dm_devs:1; /* temporarily disable use of dm devs cache */ + unsigned filter_regex_set_preferred_name_disable:1; /* prevent dev_set_preferred_name */ /* * Devices and filtering. diff --git a/lib/filters/filter-regex.c b/lib/filters/filter-regex.c index 05c5b3f2d..d9ed0104c 100644 --- a/lib/filters/filter-regex.c +++ b/lib/filters/filter-regex.c @@ -179,7 +179,7 @@ static int _accept_p(struct cmd_context *cmd, struct dev_filter *f, struct devic if (m >= 0) { if (dm_bit(rf->accept, m)) { - if (!first) + if (!first && !cmd->filter_regex_set_preferred_name_disable) dev_set_preferred_name(sl, dev); return 1; |