Author: aschnell Date: Tue Jun 10 12:04:14 2008 New Revision: 48189 URL: http://svn.opensuse.org/viewcvs/yast?rev=48189&view=rev Log: - refactored Modified: branches/tmp/aschnell/part-redesign/storage/src/modules/Storage.ycp Modified: branches/tmp/aschnell/part-redesign/storage/src/modules/Storage.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/sto... ============================================================================== --- branches/tmp/aschnell/part-redesign/storage/src/modules/Storage.ycp (original) +++ branches/tmp/aschnell/part-redesign/storage/src/modules/Storage.ycp Tue Jun 10 12:04:14 2008 @@ -910,12 +910,11 @@ global integer GetUnusedPartitionSlots(string device, list<map> &slots) { list<any> swig_slots = []; - + integer ret = LibStorage::StorageInterface::getUnusedPartitionSlots(sint, device, swig_slots); - - foreach(any swig_slot, swig_slots, { - - map slot = $[ + + slots = maplist(any swig_slot, swig_slots, { + return $[ "region" : [ LibStorage::PartitionSlotInfo::swig_cylStart_get(swig_slot), LibStorage::PartitionSlotInfo::swig_cylSize_get(swig_slot) ], "primary_slot" : LibStorage::PartitionSlotInfo::swig_primarySlot_get(swig_slot), @@ -924,12 +923,9 @@ "extended_possible" : LibStorage::PartitionSlotInfo::swig_extendedPossible_get(swig_slot), "logical_Slot" : LibStorage::PartitionSlotInfo::swig_logicalSlot_get(swig_slot), "logical_possible" : LibStorage::PartitionSlotInfo::swig_logicalPossible_get(swig_slot) - ]; - - slots = add(slots, slot); - - }); - + ]; + }); + return ret; } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org