From ed09608f96b2d1efb230679fe50ab97ecbc2d4c4 Mon Sep 17 00:00:00 2001 From: David Teigland Date: Tue, 23 Feb 2021 11:39:35 -0600 Subject: remove options --deviceid and --deviceidtype It's not clear why or if these options would be used. --- tools/args.h | 6 ------ tools/command-lines.in | 9 +++------ tools/lvmdevices.c | 5 ++--- tools/toollib.c | 10 ++++------ tools/vgimportdevices.c | 7 +------ 5 files changed, 10 insertions(+), 27 deletions(-) diff --git a/tools/args.h b/tools/args.h index 884410aab..ca8f9ec51 100644 --- a/tools/args.h +++ b/tools/args.h @@ -217,12 +217,6 @@ arg(detachprofile_ARG, '\0', "detachprofile", 0, 0, 0, "Detaches a metadata profile from a VG or LV.\n" "See \\fBlvm.conf\\fP(5) for more information about profiles.\n") -arg(deviceid_ARG, '\0', "deviceid", string_VAL, 0, 0, - "A device ID with a format determined by --deviceidtype.") - -arg(deviceidtype_ARG, '\0', "deviceidtype", string_VAL, 0, 0, - "A device ID type: sys_wwid, sys_serial, mpath_uuid.") - arg(devices_ARG, '\0', "devices", pv_VAL, ARG_GROUPABLE, 0, "Devices that the command can use. This option can be repeated\n" "or accepts a comma separated list of devices. This overrides\n" diff --git a/tools/command-lines.in b/tools/command-lines.in index 8ead80fc2..836b72c75 100644 --- a/tools/command-lines.in +++ b/tools/command-lines.in @@ -1398,14 +1398,12 @@ lvmdevices --update ID: lvmdevices_update lvmdevices --adddev PV -OO: --deviceidtype String, --deviceid String ID: lvmdevices_edit lvmdevices --deldev PV ID: lvmdevices_edit lvmdevices --addpvid String -OO: --deviceidtype String, --deviceid String ID: lvmdevices_edit lvmdevices --delpvid String @@ -1543,8 +1541,7 @@ OO: --dataalignment SizeKB, --dataalignmentoffset SizeKB, --bootloaderareasize S --force, --labelsector Number, --metadatatype MetadataType, --pvmetadatacopies MetadataCopiesPV, --metadatasize SizeMB, --metadataignore Bool, --norestorefile, --setphysicalvolumesize SizeMB, ---reportformat ReportFmt, --restorefile String, --uuidstr String, --zero Bool, ---deviceidtype String, --deviceid String +--reportformat ReportFmt, --restorefile String, --uuidstr String, --zero Bool ID: pvcreate_general RULE: --norestorefile not --restorefile RULE: --bootloaderareasize not --restorefile @@ -1800,12 +1797,12 @@ ID: vgimportclone_general --- vgimportdevices VG|Tag|Select ... -OO: --deviceidtype String, --select String, --foreign, --reportformat ReportFmt +OO: --select String, --foreign, --reportformat ReportFmt ID: vgimportdevices_some DESC: Add devices from specific VGs to the devices file. vgimportdevices --all -OO: --deviceidtype String, --foreign, --reportformat ReportFmt +OO: --foreign, --reportformat ReportFmt ID: vgimportdevices_all DESC: Add devices from all accessible VGs to the devices file. diff --git a/tools/lvmdevices.c b/tools/lvmdevices.c index 0d651f636..73820992d 100644 --- a/tools/lvmdevices.c +++ b/tools/lvmdevices.c @@ -281,9 +281,8 @@ int lvmdevices(struct cmd_context *cmd, int argc, char **argv) dev_name(dev), dev_filtered_reason(dev)); } - if (!device_id_add(cmd, dev, dev->pvid, - arg_str_value(cmd, deviceidtype_ARG, NULL), - arg_str_value(cmd, deviceid_ARG, NULL))) + /* allow deviceidtype_ARG/deviceid_ARG ? */ + if (!device_id_add(cmd, dev, dev->pvid, NULL, NULL)) goto_bad; if (!device_ids_write(cmd)) goto_bad; diff --git a/tools/toollib.c b/tools/toollib.c index 062e1be37..5c9ccb6f2 100644 --- a/tools/toollib.c +++ b/tools/toollib.c @@ -5651,9 +5651,8 @@ do_command: pvl->pv = vgpvl->pv; dm_list_add(&pp->pvs, &pvl->list); - device_id_add(cmd, pd->dev, (const char *)&pvl->pv->id.uuid, - arg_str_value(cmd, deviceidtype_ARG, NULL), - arg_str_value(cmd, deviceid_ARG, NULL)); + /* allow deviceidtype_ARG/deviceid_ARG ? */ + device_id_add(cmd, pd->dev, (const char *)&pvl->pv->id.uuid, NULL, NULL); } else { log_error("Failed to find PV %s", pd->name); @@ -5691,9 +5690,8 @@ do_command: continue; } - device_id_add(cmd, pd->dev, (const char *)&pv->id.uuid, - arg_str_value(cmd, deviceidtype_ARG, NULL), - arg_str_value(cmd, deviceid_ARG, NULL)); + /* allow deviceidtype_ARG/deviceid_ARG ? */ + device_id_add(cmd, pd->dev, (const char *)&pv->id.uuid, NULL, NULL); log_verbose("Set up physical volume for \"%s\" with %" PRIu64 " available sectors.", pv_name, pv_size(pv)); diff --git a/tools/vgimportdevices.c b/tools/vgimportdevices.c index fc5345f0e..b7b363369 100644 --- a/tools/vgimportdevices.c +++ b/tools/vgimportdevices.c @@ -31,7 +31,7 @@ static int _vgimportdevices_single(struct cmd_context *cmd, struct physical_volume *pv; int update_vg = 1; int updated_pvs = 0; - const char *idtypestr; + const char *idtypestr = NULL; /* deviceidtype_ARG ? */ dm_list_iterate_items(pvl, &vg->pvs) { if (is_missing_pv(pvl->pv) || !pvl->pv->dev) { @@ -53,11 +53,6 @@ static int _vgimportdevices_single(struct cmd_context *cmd, if (vg_is_foreign(vg) || vg_is_shared(vg)) update_vg = 0; - /* - * User can select the idtype to use when importing. - */ - idtypestr = arg_str_value(cmd, deviceidtype_ARG, NULL); - dm_list_iterate_items(pvl, &vg->pvs) { pv = pvl->pv; -- cgit v1.2.1