[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



Signed-off-by: Dave Wysochanski <dwysocha 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]