1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

vgchange: Prevent lvm1 system ID changes.

(This system_id setting code shouldn't be in two places.)
This commit is contained in:
Alasdair G Kergon 2015-03-04 00:50:54 +00:00
parent 340369ab25
commit dcba4781ea

View File

@ -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;