Author: aschnell Date: Mon Jan 4 12:39:18 2010 New Revision: 60216 URL: http://svn.opensuse.org/viewcvs/yast?rev=60216&view=rev Log: - disallow RAIDs on partitioned RAIDs Modified: branches/SuSE-Code-11-SP1-Branch/storage/storage/src/include/raid_lib.ycp Modified: branches/SuSE-Code-11-SP1-Branch/storage/storage/src/include/raid_lib.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/storage/storage/src/include/raid_lib.ycp?rev=60216&r1=60215&r2=60216&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/storage/storage/src/include/raid_lib.ycp (original) +++ branches/SuSE-Code-11-SP1-Branch/storage/storage/src/include/raid_lib.ycp Mon Jan 4 12:39:18 2010 @@ -53,14 +53,17 @@ // no RAID devices (this is for experts only, by hand) list<map> allret = []; + + list<symbol> allowed_ctypes = [ `CT_DISK, `CT_DMRAID, `CT_DMMULTIPATH ]; list types_no = [ `lvm, `sw_raid, `evms ]; list fsids = [ Partitions::fsid_lvm, Partitions::fsid_raid, Partitions::fsid_native ]; list ubs = [ `UB_NONE, `UB_MD ]; list allowed_enc_types = [ `none ]; - foreach( string dev, map devmap, targetMap, - ``{ + foreach (string dev, map devmap, targetMap, { + if (contains(allowed_ctypes, devmap["type"]:`CT_UNKNOWN)) + { ret = filter( map p, devmap["partitions"]:[], ``( size(p["mount"]:"")==0 && !contains( types_no, p["type"]:`primary ) && @@ -68,6 +71,7 @@ contains( ubs, p["used_by_type"]:`UB_NONE ) && (!haskey(p,"fsid")||contains( fsids, p["fsid"]:0 )))); allret = (list<map>)merge(allret, ret ); + } }); return( allret ); }; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org