rpms/dmraid/devel return_error_wo_disks.patch, NONE, 1.1 dmraid.spec, 1.111, 1.112

Heinz Mauelshagen mauelsha at fedoraproject.org
Thu Nov 5 11:43:14 UTC 2009


Author: mauelsha

Update of /cvs/pkgs/rpms/dmraid/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11923

Modified Files:
	dmraid.spec 
Added Files:
	return_error_wo_disks.patch 
Log Message:
Return error in case of no block devices or no RAID disks

return_error_wo_disks.patch:
 metadata.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- NEW FILE return_error_wo_disks.patch ---
diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c
index eb8af10..4da6b64 100644
--- a/lib/metadata/metadata.c
+++ b/lib/metadata/metadata.c
@@ -2096,7 +2096,7 @@ get_metadata(struct lib_context *lc, enum action action,
 
 	if (!count_devices(lc, DEVICE)) {
 		log_print(lc, "no block devices found");
-		return 1;
+		return 0;
 	}
 
 	if (!(M_RAID & p->metadata))
@@ -2118,7 +2118,7 @@ get_metadata(struct lib_context *lc, enum action action,
 	if (!OPT_HOT_SPARE_SET(lc) && !OPT_CREATE(lc)
 	    && !count_devices(lc, RAID)) {
 		format_error(lc, "disks", argv);
-		return 1;
+		return 0;
 	}
 
 	if (M_SET & p->metadata) {


Index: dmraid.spec
===================================================================
RCS file: /cvs/pkgs/rpms/dmraid/devel/dmraid.spec,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -p -r1.111 -r1.112
--- dmraid.spec	16 Oct 2009 11:28:37 -0000	1.111
+++ dmraid.spec	5 Nov 2009 11:43:14 -0000	1.112
@@ -7,7 +7,7 @@
 Summary: dmraid (Device-mapper RAID tool and library)
 Name: dmraid
 Version: 1.0.0.rc16
-Release: 6%{?dist}
+Release: 7%{?dist}
 License: GPLv2+
 Group: System Environment/Base
 URL: http://people.redhat.com/heinzm/sw/dmraid
@@ -26,6 +26,7 @@ Source: ftp://people.redhat.com/heinzm/s
 Patch0: dmraid-1.0.0.rc16-test_devices.patch
 Patch1: ddf1_lsi_persistent_name.patch
 Patch2: pdc_raid10_failure.patch
+Patch3: return_error_wo_disks.patch
 
 %description
 DMRAID supports RAID device discovery, RAID set activation, creation,
@@ -68,6 +69,7 @@ Device failure reporting has to be activ
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %build
 %define _libdir /%{_lib}




More information about the scm-commits mailing list