From 13e8c7e4344ec57917f5c74f9bca071274d235ce Mon Sep 17 00:00:00 2001 From: Dave Wysochanski Date: Wed, 1 Jul 2009 17:00:50 +0000 Subject: Rework the toollib interface (process_each_*) on top of new vg_read. Sun May 3 12:32:30 CEST 2009 Petr Rockai * Rework the toollib interface (process_each_*) on top of new vg_read. Rebased 6/26/09 by Dave W. - Add skipping message to process_each_lv - Remove inconsistent_t. --- tools/vgremove.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'tools/vgremove.c') diff --git a/tools/vgremove.c b/tools/vgremove.c index e5ad15da..5956075e 100644 --- a/tools/vgremove.c +++ b/tools/vgremove.c @@ -16,10 +16,10 @@ #include "tools.h" static int vgremove_single(struct cmd_context *cmd, const char *vg_name, - struct volume_group *vg, int consistent, + struct volume_group *vg, void *handle __attribute((unused))) { - if (!vg_remove_single(cmd, vg_name, vg, consistent, + if (!vg_remove_single(cmd, vg_name, vg, arg_count(cmd, force_ARG))) return ECMD_FAILED; @@ -40,10 +40,8 @@ int vgremove(struct cmd_context *cmd, int argc, char **argv) return ECMD_FAILED; } - ret = process_each_vg(cmd, argc, argv, LCK_VG_WRITE, - arg_count(cmd, force_ARG) ? - VG_INCONSISTENT_REPAIR : - VG_INCONSISTENT_ABORT, + ret = process_each_vg(cmd, argc, argv, + READ_FOR_UPDATE | LOCK_NONBLOCKING, NULL, &vgremove_single); unlock_vg(cmd, VG_ORPHANS); -- cgit