[lvm-devel] [PATCH 10/11] Update test/api/test.c to handle read/write open modes.

Dave Wysochanski dwysocha at redhat.com
Sat Jul 25 00:08:19 UTC 2009


Signed-off-by: Dave Wysochanski <dwysocha at redhat.com>
---
 test/api/test.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/test/api/test.c b/test/api/test.c
index c9500ff..a7d6bc6 100644
--- a/test/api/test.c
+++ b/test/api/test.c
@@ -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;
-- 
1.6.0.6




More information about the lvm-devel mailing list