2
* Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
3
* Copyright (C) 2004 Red Hat, Inc. All rights reserved.
5
* This file is part of LVM2.
7
* This copyrighted material is made available to anyone wishing to use,
8
* modify, copy, or redistribute it subject to the terms and conditions
9
* of the GNU General Public License v.2.
11
* You should have received a copy of the GNU General Public License
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
18
#include "dbg_malloc.h"
20
#include "pretty_print.h"
25
int main(int argc, char **argv)
28
struct list_head *pvs, *tmp;
32
init_debug(_LOG_INFO);
34
if (!dev_cache_init()) {
35
fprintf(stderr, "init of dev-cache failed\n");
39
if (!dev_cache_add_dir("/dev/loop")) {
40
fprintf(stderr, "couldn't add /dev to dir-cache\n");
44
if (!(mem = pool_create(10 * 1024))) {
45
fprintf(stderr, "couldn't create pool\n");
49
ios = create_lvm1_format("/dev", mem, NULL);
52
fprintf(stderr, "failed to create io_space for format1\n");
56
pvs = ios->get_pvs(ios);
59
fprintf(stderr, "couldn't read vg %s\n", argv[1]);
63
list_for_each(tmp, pvs) {
64
struct pv_list *pvl = list_entry(tmp, struct pv_list, list);
65
dump_pv(&pvl->pv, stdout);