From 8935dfee56fe2cfb29152f0af2a4c4c32e62895b Mon Sep 17 00:00:00 2001 From: David Teigland Date: Mon, 13 Sep 2021 14:11:07 -0500 Subject: lvmdevices: allow deviceidtype with addpvid in addition to using with adddev --- tools/lvmdevices.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tools/lvmdevices.c') 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)) -- cgit v1.2.1