1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00

Fix vgck and vgremove segfault if non-existent vg given.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
This commit is contained in:
Dave Wysochanski 2009-07-14 19:37:18 +00:00
parent ea18f8e19b
commit fedb3704f3
2 changed files with 6 additions and 0 deletions

View File

@ -21,6 +21,9 @@ static int vgck_single(struct cmd_context *cmd __attribute((unused)),
struct volume_group *vg,
void *handle __attribute((unused)))
{
if (vg_read_error(vg))
return ECMD_FAILED;
if (!vg_check_status(vg, EXPORTED_VG))
return ECMD_FAILED;

View File

@ -22,6 +22,9 @@ static int vgremove_single(struct cmd_context *cmd, const char *vg_name,
unsigned lv_count;
force_t force;
if (vg_read_error(vg))
return ECMD_FAILED;
if (!vg_check_status(vg, EXPORTED_VG))
return ECMD_FAILED;