public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2/test/api test.c vgtest.c
@ 2009-07-29 14:06 agk
  0 siblings, 0 replies; 2+ messages in thread
From: agk @ 2009-07-29 14:06 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2009-07-29 14:06:32

Modified files:
	test/api       : test.c vgtest.c 

Log message:
	renamed include files

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/api/test.c.diff?cvsroot=lvm2&r1=1.23&r2=1.24
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/api/vgtest.c.diff?cvsroot=lvm2&r1=1.8&r2=1.9

--- LVM2/test/api/test.c	2009/07/28 14:12:29	1.23
+++ LVM2/test/api/test.c	2009/07/29 14:06:31	1.24
@@ -16,7 +16,8 @@
 #include <string.h>
 #include <stdlib.h>
 #include <readline/readline.h>
-#include "lvm.h"
+
+#include "lvm2app.h"
 
 #define MAX_ARGS 64
 
--- LVM2/test/api/vgtest.c	2009/07/28 11:03:29	1.8
+++ LVM2/test/api/vgtest.c	2009/07/29 14:06:31	1.9
@@ -20,7 +20,8 @@
 #include <stdio.h>
 #include <unistd.h>
 #include <inttypes.h>
-#include "lvm.h"
+
+#include "lvm2app.h"
 
 lvm_t handle;
 vg_t *vg;


^ permalink raw reply	[flat|nested] 2+ messages in thread

* LVM2/test/api test.c vgtest.c
@ 2009-07-26 20:29 wysochanski
  0 siblings, 0 replies; 2+ messages in thread
From: wysochanski @ 2009-07-26 20:29 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	wysochanski@sourceware.org	2009-07-26 20:29:56

Modified files:
	test/api       : test.c vgtest.c 

Log message:
	Update test/api/*.c to use consistent liblvm error returns.
	
	For now, liblvm will return -1 (fail) / 0 (success) or
	NULL (fail) / non-NULL (success).  Upon failure, lvm_errno and
	lvm_errmsg should be used to determine the precise error.
	
	Author: Dave Wysochanski <dwysocha@redhat.com>

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

--- LVM2/test/api/test.c	2009/07/26 16:44:05	1.13
+++ LVM2/test/api/test.c	2009/07/26 20:29:56	1.14
@@ -327,7 +327,7 @@
 	}
 	if (!(lv = _lookup_lv_by_name(argv[2])))
 		return;
-	if (!lvm_vg_remove_lv(lv))
+	if (lvm_vg_remove_lv(lv))
 		printf("Error ");
 	else {
 		printf("Success ");
--- LVM2/test/api/vgtest.c	2009/07/22 22:25:30	1.4
+++ LVM2/test/api/vgtest.c	2009/07/26 20:29:56	1.5
@@ -50,7 +50,7 @@
 
 	printf("Extending VG %s\n", vg_name);
 	status = lvm_vg_extend(vg, device);
-	if (!status) {
+	if (status) {
 		fprintf(stderr, "Error extending volume group %s "
 			"with device %s\n", vg_name, device);
 		goto bad;
@@ -58,7 +58,7 @@
 
 	printf("Setting VG %s extent_size to %"PRIu64"\n", vg_name, size);
 	status = lvm_vg_set_extent_size(vg, size);
-	if (!status) {
+	if (status) {
 		fprintf(stderr, "Can not set physical extent "
 			"size '%"PRIu64"' for '%s'\n",
 			size, vg_name);
@@ -67,7 +67,7 @@
 
 	printf("Committing VG %s to disk\n", vg_name);
 	status = lvm_vg_write(vg);
-	if (!status) {
+	if (status) {
 		fprintf(stderr, "Creation of volume group '%s' on "
 			"device '%s' failed\n",
 			vg_name, device);
@@ -75,14 +75,14 @@
 	}
 
 	printf("Closing VG %s\n", vg_name);
-	if (!lvm_vg_close(vg))
+	if (lvm_vg_close(vg))
 		goto bad;
 	printf("Re-opening VG %s for reading\n", vg_name);
 	vg = lvm_vg_open(handle, vg_name, "r", 0);
 	if (!vg)
 		goto bad;
 	printf("Closing VG %s\n", vg_name);
-	if (!lvm_vg_close(vg))
+	if (lvm_vg_close(vg))
 		goto bad;
 	printf("Re-opening VG %s for writing\n", vg_name);
 	vg = lvm_vg_open(handle, vg_name, "w", 0);
@@ -90,7 +90,7 @@
 		goto bad;
 	printf("Removing VG %s from system\n", vg_name);
 	status = lvm_vg_remove(vg);
-	if (lvm_errno(handle)) {
+	if (status) {
 		fprintf(stderr, "Revmoval of volume group '%s' failed\n",
 			vg_name);
 		goto bad;


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-07-29 14:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-29 14:06 LVM2/test/api test.c vgtest.c agk
  -- strict thread matches above, loose matches on Subject: below --
2009-07-26 20:29 wysochanski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).