[yast-commit] r59701 - in /branches/SuSE-Code-11-SP1-Branch/bootloader/src/routines: lilolike.ycp misc.ycp
Author: juhliarik Date: Mon Nov 23 13:33:26 2009 New Revision: 59701 URL: http://svn.opensuse.org/viewcvs/yast?rev=59701&view=rev Log: added support for special MD RAIDs from Intel Modified: branches/SuSE-Code-11-SP1-Branch/bootloader/src/routines/lilolike.ycp branches/SuSE-Code-11-SP1-Branch/bootloader/src/routines/misc.ycp Modified: branches/SuSE-Code-11-SP1-Branch/bootloader/src/routines/lilolike.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/bootloader/src/routines/lilolike.ycp?rev=59701&r1=59700&r2=59701&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/bootloader/src/routines/lilolike.ycp (original) +++ branches/SuSE-Code-11-SP1-Branch/bootloader/src/routines/lilolike.ycp Mon Nov 23 13:33:26 2009 @@ -1304,6 +1304,29 @@ device_mapping[tmp] = "hd0"; }*/ } +/** + * Check if MD raid is build on disks not on paritions + * @param devices - list of devices from MD raid + * @param tm - unfiltered target map + * @return - true if MD RAID is build on disks (not on partitions) + */ + +boolean checkMDRaidDevices(list<string> devices, map<string,map> tm) +{ + boolean ret = true; + foreach (string key, devices, { + if (key != "" && ret) + { + if (tm[key]:nil != nil) + ret = true; + else + ret = false; + } + }); + return ret; +} + + /*** helper functions END ***/ /** @@ -1344,7 +1367,8 @@ // filter out non-disk devices targetMap = filter (string k, map v, targetMap, { return v["type"]:`CT_UNKNOWN==`CT_DMRAID || v["type"]:`CT_UNKNOWN==`CT_DISK - || v["type"]:`CT_UNKNOWN==`CT_DMMULTIPATH; + || v["type"]:`CT_UNKNOWN==`CT_DMMULTIPATH || + (v["type"]:`CT_UNKNOWN==`CT_MDPART && checkMDRaidDevices(v["devices"]:[], targetMap)); }); y2milestone ("Target map: %1", targetMap); Modified: branches/SuSE-Code-11-SP1-Branch/bootloader/src/routines/misc.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/bootloader/src/routines/misc.ycp?rev=59701&r1=59700&r2=59701&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/bootloader/src/routines/misc.ycp (original) +++ branches/SuSE-Code-11-SP1-Branch/bootloader/src/routines/misc.ycp Mon Nov 23 13:33:26 2009 @@ -882,7 +882,7 @@ ``(p["fstype"]:"" == "Linux native" || p["fstype"]:"" == "Extended" || p["fstype"]:"" == "Linux RAID" - || p["fstype"]:"" == "MD Raid")); + || tolower(p["fstype"]:"") == "md raid")); } list<string>partition_names = maplist (map p, partitions, ``((string)(p["device"]:""))); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
juhliarik@svn.opensuse.org