master - vgchange: Prevent lvm1 system ID changes.
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=dcba4781eaa5545981a831c3c27374d3fce085fe Commit: dcba4781eaa5545981a831c3c27374d3fce085fe Parent: 340369ab2526bc3cf5c52c2738998e589865f4a2 Author: Alasdair G Kergon <[email protected]> AuthorDate: Wed Mar 4 00:50:54 2015 +0000 Committer: Alasdair G Kergon <[email protected]> CommitterDate: Wed Mar 4 00:50:54 2015 +0000
vgchange: Prevent lvm1 system ID changes.
(This system_id setting code shouldn't be in two places.)
--- tools/vgchange.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
tools/vgchange.c +7 -0
@@ -523,6 +523,13 @@ static int _vgchange_system_id(struct cmd_context *cmd, struct volume_group *vg)const char *system_id;const char *system_id_arg_str =arg_str_value (cmd, systemid_ARG,NULL ); +/* FIXME Merge with vg_set_system_id() */ +if (systemid_on_pvs (vg)) { +log_error ("Metadata format %s does not support this type of system ID." , + vg->fid->fmt->name); +return 0 ; + } +if (!(system_id =system_id_from_string (cmd, system_id_arg_str))) {log_error ("Unable to set system ID." );return 0 ;