[yast-commit] r60217 - /trunk/storage/storage/src/include/raid_lib.ycp
Author: aschnell Date: Mon Jan 4 12:39:28 2010 New Revision: 60217 URL: http://svn.opensuse.org/viewcvs/yast?rev=60217&view=rev Log: - disallow RAIDs on partitioned RAIDs Modified: trunk/storage/storage/src/include/raid_lib.ycp Modified: trunk/storage/storage/src/include/raid_lib.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/raid_lib.ycp?rev=60217&r1=60216&r2=60217&view=diff ============================================================================== --- trunk/storage/storage/src/include/raid_lib.ycp (original) +++ trunk/storage/storage/src/include/raid_lib.ycp Mon Jan 4 12:39:28 2010 @@ -52,14 +52,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 ]; 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 ) && @@ -67,6 +70,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
participants (1)
-
aschnell@svn.opensuse.org