summaryrefslogtreecommitdiff
path: root/lib/metadata/vg.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/metadata/vg.c')
-rw-r--r--lib/metadata/vg.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/lib/metadata/vg.c b/lib/metadata/vg.c
index 1020a67c8..b8b1501a4 100644
--- a/lib/metadata/vg.c
+++ b/lib/metadata/vg.c
@@ -42,12 +42,6 @@ struct volume_group *alloc_vg(const char *pool_name, struct cmd_context *cmd,
return NULL;
}
- if (!(vg->lvm1_system_id = dm_pool_zalloc(vgmem, NAME_LEN + 1))) {
- log_error("Failed to allocate VG systemd id.");
- dm_pool_destroy(vgmem);
- return NULL;
- }
-
vg->system_id = "";
vg->cmd = cmd;
@@ -178,7 +172,7 @@ char *vg_name_dup(const struct volume_group *vg)
char *vg_system_id_dup(const struct volume_group *vg)
{
- return dm_pool_strdup(vg->vgmem, vg->system_id ? : vg->lvm1_system_id ? : "");
+ return dm_pool_strdup(vg->vgmem, vg->system_id ? : "");
}
char *vg_lock_type_dup(const struct volume_group *vg)
@@ -677,20 +671,11 @@ int vg_set_system_id(struct volume_group *vg, const char *system_id)
return 1;
}
- 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 (!(vg->system_id = dm_pool_strdup(vg->vgmem, system_id))) {
log_error("Failed to allocate memory for system_id in vg_set_system_id.");
return 0;
}
- if (vg->lvm1_system_id)
- *vg->lvm1_system_id = '\0';
-
return 1;
}