Author: juhliarik
Date: Thu Jun 19 15:51:56 2008
New Revision: 48426
URL: http://svn.opensuse.org/viewcvs/yast?rev=48426&view=rev
Log:
added fix for writting crashkernel option to XEN boot section correctly
(bnc #390842)
added handling new syntax of value for crashkernel (FATE #303161)
M kdump/src/uifunctions.ycp
* added checking if user want to rewrite ranges for crashkernel
M kdump/src/Kdump.ycp
* handling new syntax of value for crashkernel
* fixed problem witj XEN boot section
M kdump/src/kdump.ycp
* update command line
M kdump/src/dialogs.ycp
* added function for asking user about rewritting ranges
Modified:
trunk/kdump/src/Kdump.ycp
trunk/kdump/src/dialogs.ycp
trunk/kdump/src/kdump.ycp
trunk/kdump/src/uifunctions.ycp
Modified: trunk/kdump/src/Kdump.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/kdump/src/Kdump.ycp?rev=48426&r1=48425&r2=48426&view=diff
==============================================================================
--- trunk/kdump/src/Kdump.ycp (original)
+++ trunk/kdump/src/Kdump.ycp Thu Jun 19 15:51:56 2008
@@ -81,13 +81,21 @@
global list <string> uknown_fs_partitions =[];
/**
- * Total available memory
+ * Total available memory [MB]
*
*
* integer
*/
global integer total_memory =0;
+/** Boolean option indicates that "crashkernel" includes
+ * several ranges
+ *
+ * boolean true if there are several ranges (>1)
+ */
+global boolean crashkernel_list_ranges = false;
+
+
/**
* Number of cpus
*
@@ -95,6 +103,23 @@
*/
integer number_of_cpus = 1;
+/**
+ * kernel version (uname -r)
+ *
+ * string
+ */
+string kernel_version = "";
+
+
+/**
+ * Position actual boot section in BootCommon::sections list
+ * it is relevant only if XEN boot section is used
+ *
+ * integer
+ */
+integer section_pos = -1;
+
+
/** Boolean option indicates kernel parameter
* "crashkernel"
*
@@ -221,7 +246,7 @@
map disks = filter( string k, map disk, tg, ``(disk["type"]:`CT_UNKNOWN==`CT_DISK));
// extract only disks
list <string> list_of_disks = (list<string>) Map::Keys(disks);
- //get a list of all partitions usable for data storage
+ // get a list of all partitions usable for data storage
list <string> list_disks = (list<string>) Map::Keys(disks);
y2milestone("[kdump] (ReadDiskPartitions) ----------------Begin of ReadDiskPartitions ()--------------");
@@ -233,7 +258,7 @@
});
//list<map> data_parts = filter( map p, disks["/dev/sda","partitions"]:[], ``(p["type"]:`primary!=`extended));
- //parse partiotions with uknown file system
+ // parse partiotions with uknown file system
list<map> unknown = [];
unknown = filter( map p, data_parts, ``(p["detected_fs"]:nil==`unknown));
@@ -254,11 +279,11 @@
y2milestone("[kdump] (ReadDiskPartitions) list of udev ids of partitions: %1", udevids);
- //combination name + uids to one list
+ // combination name + uids to one list
integer i = 0;
- //available_partitions = parts;
+ // available_partitions = parts;
foreach (string key, udevids, {
- //string disk_from_partition = filterchars(parts[i]:"", "abcdefghijklmnopqrstuvwxyz/");
+ // string disk_from_partition = filterchars(parts[i]:"", "abcdefghijklmnopqrstuvwxyz/");
string value = "/dev/disk/by-id/" + udevids[i]:"" +" ( " + parts[i]:"" +" )";
available_partitions = available_partitions + value;
i= i+1;
@@ -302,7 +327,7 @@
list <string> AddDeviceVgamode (map section) {
string tmp_boot_section = tostring(section["append"]:nil);
- //adding root device
+ // adding root device
tmp_boot_section = tmp_boot_section + " root=" + tostring(section["root"]:nil);
tmp_boot_section = tmp_boot_section + " vga=" + tostring(section["vgamode"]:nil);
@@ -320,19 +345,18 @@
string GetActualBootSection () {
- //read option from bootlaoder
+ // read option from bootlaoder
string result = "";
string kernel_boot_options = "";
- string kernel_version = "";
integer min_dif_size = 1000;
- //reading bootloader settings
+ // reading bootloader settings
boolean old_progress = Progress::set (false);
Bootloader::Read();
Progress::set (old_progress);
- //reading kernel options
+ // reading kernel options
string command = "cat /proc/cmdline";
map options = (map)SCR::Execute (.target.bash_output, command);
y2milestone("[kdump] (GetActualBootSection) command read boot options from kernel: %1 output: %2",command, options);
@@ -341,9 +365,8 @@
return "";
kernel_boot_options = tostring(options["stdout"]:nil);
- //Popup::Message(kernel_boot_options);
- //reading version of kernel
+ // reading version of kernel
command = "uname -r";
options = (map)SCR::Execute (.target.bash_output, command);
y2milestone("[kdump] (GetActualBootSection) command read kernel version: %1 output: %2",command, options);
@@ -351,29 +374,24 @@
if (options["exit"]:nil != 0)
return "";
- kernel_version = tostring(options["stdout"]:nil);
-
- //Popup::Message(kernel_version);
-
+ kernel_version = tostring(options["stdout"]:nil);
y2milestone("[kdump] (GetActualBootSection) kerne version: %1",kernel_version);
-
- //boot sections from bootloader
+ // boot sections from bootloader
list