This is the mail archive of the lvm2-cvs@sourceware.org mailing list for the LVM2 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

LVM2/test/api test.c


CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	wysochanski@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 <dwysocha@redhat.com>

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

--- LVM2/test/api/test.c	2009/07/24 12:51:32	1.5
+++ LVM2/test/api/test.c	2009/07/26 02:35:19	1.6
@@ -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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]