Skip to contentSkip to conversation

LVM2/test/api test.c

PATCH [email protected] 1 participant 1 message Jul 26, 2009

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: wysochanski at sourceware.org 2009-07-26 02:35:20

Modified files:
test/api : test.c

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

Author: Dave Wysochanski <[email protected]>

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/api/test.c.diff?cvsroot=lvm2&r1=1.5&r2=1.6

test/api/test.c +4 -2
@@ -162,8 +162,10 @@
 		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;