[yast-commit] r48514 - /branches/tmp/aschnell/part-redesign/storage/src/modules/StorageFields.ycp
Author: aschnell Date: Tue Jun 24 18:08:05 2008 New Revision: 48514 URL: http://svn.opensuse.org/viewcvs/yast?rev=48514&view=rev Log: - show raid data dependent on raid type Modified: branches/tmp/aschnell/part-redesign/storage/src/modules/StorageFields.ycp Modified: branches/tmp/aschnell/part-redesign/storage/src/modules/StorageFields.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/modules/StorageFields.ycp?rev=48514&r1=48513&r2=48514&view=diff ============================================================================== --- branches/tmp/aschnell/part-redesign/storage/src/modules/StorageFields.ycp (original) +++ branches/tmp/aschnell/part-redesign/storage/src/modules/StorageFields.ycp Tue Jun 24 18:08:05 2008 @@ -477,8 +477,11 @@ case `chunk_size: { - integer chunksize = data["chunk_size"]:0; - string value = Storage::ByteToHumanStringWithPrecision(chunksize*1024, 2, true); + string value = ""; + if (contains(["raid0", "raid5"], data["raid_type"]:"")) { + integer chunksize = data["chunk_size"]:0; + value = Storage::ByteToHumanStringWithPrecision(chunksize*1024, 2, true); + } if (style == `table) return value; else @@ -487,9 +490,11 @@ case `parity_algorithm: { - string value = data["parity_algorithm"]:""; - list <string> tmp = splitstring(value, "_"); - value = mergestring(tmp, "-"); + string value = ""; + if (contains(["raid5"], data["raid_type"]:"")) { + value = data["parity_algorithm"]:""; + value = mergestring(splitstring(value, "_"), "-"); + } if (style == `table) return value; else -- 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