summaryrefslogtreecommitdiff
path: root/tools/lvmdevices.c
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2021-09-13 14:11:07 -0500
committerDavid Teigland <teigland@redhat.com>2021-09-13 14:11:07 -0500
commit8935dfee56fe2cfb29152f0af2a4c4c32e62895b (patch)
treeb43fe58f8be81fc351a69c88c9f2a0b6904e62ac /tools/lvmdevices.c
parent9857b5a3dc7b23295e47e04c5c338d189c3502d5 (diff)
downloadlvm2-8935dfee56fe2cfb29152f0af2a4c4c32e62895b.tar.gz
lvmdevices: allow deviceidtype with addpvid
in addition to using with adddev
Diffstat (limited to 'tools/lvmdevices.c')
-rw-r--r--tools/lvmdevices.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/lvmdevices.c b/tools/lvmdevices.c
index 367536d6a..8d9634848 100644
--- a/tools/lvmdevices.c
+++ b/tools/lvmdevices.c
@@ -127,6 +127,7 @@ int lvmdevices(struct cmd_context *cmd, int argc, char **argv)
struct device_list *devl;
struct device *dev;
struct dev_use *du, *du2;
+ const char *deviceidtype;
int changes = 0;
dm_list_init(&search_pvids);
@@ -269,7 +270,6 @@ int lvmdevices(struct cmd_context *cmd, int argc, char **argv)
if (arg_is_set(cmd, adddev_ARG)) {
const char *devname;
- const char *deviceidtype;
if (!(devname = arg_str_value(cmd, adddev_ARG, NULL)))
goto_bad;
@@ -366,7 +366,8 @@ int lvmdevices(struct cmd_context *cmd, int argc, char **argv)
goto bad;
}
dm_list_iterate_items(devl, &found_devs) {
- if (!device_id_add(cmd, devl->dev, devl->dev->pvid, NULL, NULL))
+ deviceidtype = arg_str_value(cmd, deviceidtype_ARG, NULL);
+ if (!device_id_add(cmd, devl->dev, devl->dev->pvid, deviceidtype, NULL))
goto_bad;
}
if (!device_ids_write(cmd))