]> sourceware.org Git - lvm2.git/blame - tools/vgck.c
thin: tighten discard string conversions
[lvm2.git] / tools / vgck.c
CommitLineData
677a06d5 1/*
67cdbd7e 2 * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
be684599 3 * Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved.
677a06d5 4 *
6606c3ae 5 * This file is part of LVM2.
677a06d5 6 *
6606c3ae
AK
7 * This copyrighted material is made available to anyone wishing to use,
8 * modify, copy, or redistribute it subject to the terms and conditions
be684599 9 * of the GNU Lesser General Public License v.2.1.
677a06d5 10 *
be684599 11 * You should have received a copy of the GNU Lesser General Public License
6606c3ae
AK
12 * along with this program; if not, write to the Free Software Foundation,
13 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
677a06d5
AK
14 */
15
16#include "tools.h"
d726767f 17#include "metadata.h"
677a06d5 18
08f1ddea 19static int vgck_single(struct cmd_context *cmd __attribute__((unused)),
72b2cb61 20 const char *vg_name,
13e8c7e4 21 struct volume_group *vg,
08f1ddea 22 void *handle __attribute__((unused)))
677a06d5 23{
651ff9b3
AK
24 if (!vg_check_status(vg, EXPORTED_VG)) {
25 stack;
677a06d5 26 return ECMD_FAILED;
651ff9b3 27 }
677a06d5 28
651ff9b3
AK
29 if (!vg_validate(vg)) {
30 stack;
7f436a0f 31 return ECMD_FAILED;
651ff9b3 32 }
7f436a0f 33
82c99fb6
PR
34 if (vg_missing_pv_count(vg)) {
35 log_error("The volume group is missing %d physical volumes.",
36 vg_missing_pv_count(vg));
37 return ECMD_FAILED;
38 }
39
cfb7bfc7 40 return ECMD_PROCESSED;
677a06d5 41}
5a52dca9
AK
42
43int vgck(struct cmd_context *cmd, int argc, char **argv)
44{
13e8c7e4 45 return process_each_vg(cmd, argc, argv, 0, NULL,
5a52dca9
AK
46 &vgck_single);
47}
This page took 0.09073 seconds and 5 git commands to generate.