1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-07 04:58:47 +03:00

get_vgs must check for text format VGs when no lvm1 format VGs present

This commit is contained in:
Alasdair Kergon 2002-04-30 12:27:13 +00:00
parent 6e2ff7fb35
commit e1f93d52e3
2 changed files with 3 additions and 2 deletions

View File

@ -376,7 +376,7 @@ static struct list *_get_vgs(struct format_type *fmt, struct list *names)
}
if (list_empty(names))
goto err;
pool_free(fmt->cmd->mem, pvs);
return names;

View File

@ -512,7 +512,8 @@ struct list *get_vgs(struct cmd_context *cmd)
list_init(names);
if (!cmd->fmt1->ops->get_vgs(cmd->fmt1, names) ||
!cmd->fmtt->ops->get_vgs(cmd->fmtt, names)) {
!cmd->fmtt->ops->get_vgs(cmd->fmtt, names) ||
list_empty(names)) {
pool_free(cmd->mem, names);
return NULL;
}