Skip to contentSkip to conversation

master - vgchange: split out code for systemid

PATCH David Teigland 1 participant 1 message Jul 24, 2017

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=1460cac27391ace1047588bb915d2734e4703fa6
Commit:        1460cac27391ace1047588bb915d2734e4703fa6
Parent:        07cd88dcfa1411f23f5c0c8189377eee8ea2ee50
Author:        David Teigland <[email protected]>
AuthorDate:    Thu Jul 13 13:43:39 2017 -0500
Committer:     David Teigland <[email protected]>
CommitterDate: Mon Jul 24 14:12:08 2017 -0500

vgchange: split out code for systemid

Use the command definitions to separate the implementation of vgchange systemid from the rest of vgchange.

---
 tools/command-lines.in |    6 ++-
 tools/lvmcmdline.c     |    1 +
 tools/tools.h          |    1 +
 tools/vgchange.c       |  112 ++++++++++++++++++++++++++----------------------
 4 files changed, 68 insertions(+), 52 deletions(-)
tools/command-lines.in +5 -1
index 4cfbe74..f2ad915 100644
@@ -1474,7 +1474,7 @@ OO_VGCHANGE: --autobackup Bool, --ignoremonitoring, --ignoreskippedcluster,
 OO_VGCHANGE_META: --addtag Tag, --deltag Tag,
 --logicalvolume Uint32, --maxphysicalvolumes Uint32, --alloc Alloc, --uuid,
 --clustered Bool, --pvmetadatacopies MetadataCopiesPV, --vgmetadatacopies MetadataCopiesVG,
---physicalextentsize SizeMB, --resizeable Bool, --systemid String,
+--physicalextentsize SizeMB, --resizeable Bool,
 --profile String, --detachprofile, --metadataprofile String
 
 vgchange OO_VGCHANGE_META
@@ -1510,6 +1510,10 @@ OP: VG|Tag|Select ...
 ID: vgchange_refresh
 DESC: Reactivate LVs using the latest metadata.
 
+vgchange --systemid String VG
+ID: vgchange_systemid
+DESC: Change the system ID of a VG.
+
 vgchange --lockstart
 OO: --lockopt String, --select String
 OP: VG|Tag|Select ...
tools/lvmcmdline.c +1 -0
index dda75c6..ae55e12 100644
@@ -106,6 +106,7 @@ static const struct command_function command_functions[CMD_COUNT] = {
 	{ vgchange_locktype_CMD, vgchange_locktype_cmd },
 	{ vgchange_lockstart_CMD, vgchange_lock_start_stop_cmd },
 	{ vgchange_lockstop_CMD, vgchange_lock_start_stop_cmd },
+	{ vgchange_systemid_CMD, vgchange_systemid_cmd },
 
 	/* lvconvert utilities related to repair. */
 	{ lvconvert_repair_pvs_or_thinpool_CMD,	lvconvert_repair_pvs_or_thinpool_cmd },
tools/tools.h +1 -0
index b2ddad2..ba4edeb 100644
@@ -225,6 +225,7 @@ int vgchange_background_polling(struct cmd_context *cmd, struct volume_group *vg
 
 int vgchange_locktype_cmd(struct cmd_context *cmd, int argc, char **argv);
 int vgchange_lock_start_stop_cmd(struct cmd_context *cmd, int argc, char **argv);
+int vgchange_systemid_cmd(struct cmd_context *cmd, int argc, char **argv);
 
 struct lv_prop *get_lv_prop(int lvp_enum);
 struct lv_type *get_lv_type(int lvt_enum);
tools/vgchange.c +61 -51

145 lines not on this page · raw message