1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-11 09:18:25 +03:00

Update test/api/test.c to handle read/write open modes.

Author: Dave Wysochanski <dwysocha@redhat.com>
This commit is contained in:
Dave Wysochanski 2009-07-26 02:35:19 +00:00
parent f698db8346
commit 0307c0366a

View File

@ -162,8 +162,10 @@ static void _vg_open(char **argv, int argc, lvm_t libh)
printf ("VG already open\n");
return;
}
/* FIXME: allow different open modes */
vg = lvm_vg_open(libh, argv[1], "r", 0);
if (argc < 3)
vg = lvm_vg_open(libh, argv[1], "r", 0);
else
vg = lvm_vg_open(libh, argv[1], argv[2], 0);
if (!vg || !lvm_vg_get_name(vg)) {
printf("Error opening %s\n", argv[1]);
return;