[yast-commit] r41500 - in /branches/SuSE-SLE-10-SP2-Branch/network: VERSION package/yast2-network.changes src/lan/hardware.ycp src/modules/Lan.ycp
Author: mzugec Date: Mon Oct 22 10:42:04 2007 New Revision: 41500 URL: http://svn.opensuse.org/viewcvs/yast?rev=41500&view=rev Log: allow user to change CCW of qeth devices - CHAN IDS (#306291) Modified: branches/SuSE-SLE-10-SP2-Branch/network/VERSION branches/SuSE-SLE-10-SP2-Branch/network/package/yast2-network.changes branches/SuSE-SLE-10-SP2-Branch/network/src/lan/hardware.ycp branches/SuSE-SLE-10-SP2-Branch/network/src/modules/Lan.ycp Modified: branches/SuSE-SLE-10-SP2-Branch/network/VERSION URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP2-Branch/network/VERSION?rev=41500&r1=41499&r2=41500&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP2-Branch/network/VERSION (original) +++ branches/SuSE-SLE-10-SP2-Branch/network/VERSION Mon Oct 22 10:42:04 2007 @@ -1 +1 @@ -2.13.98 +2.13.99 Modified: branches/SuSE-SLE-10-SP2-Branch/network/package/yast2-network.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP2-Branch/network/package/yast2-network.changes?rev=41500&r1=41499&r2=41500&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP2-Branch/network/package/yast2-network.changes (original) +++ branches/SuSE-SLE-10-SP2-Branch/network/package/yast2-network.changes Mon Oct 22 10:42:04 2007 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Mon Oct 22 10:41:37 CEST 2007 - mzugec@suse.cz + +- allow user to change CCW of qeth devices - CHAN IDS (#306291) +- 2.13.99 + +------------------------------------------------------------------- Thu Apr 5 10:09:14 CEST 2007 - mzugec@suse.cz - for s390 write hwcfg file although driver doesn't provide busID Modified: branches/SuSE-SLE-10-SP2-Branch/network/src/lan/hardware.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP2-Branch/network/src/lan/hardware.ycp?rev=41500&r1=41499&r2=41500&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP2-Branch/network/src/lan/hardware.ycp (original) +++ branches/SuSE-SLE-10-SP2-Branch/network/src/lan/hardware.ycp Mon Oct 22 10:42:04 2007 @@ -467,6 +467,25 @@ type = (string) UI::QueryWidget(`id(`dev), `Value); Lan::type = type; } + if (type=="qeth"){ + integer devid = 0; + string devstr = ""; + + y2milestone("nm_name=%1", Lan::nm_name); + string s390chanid = "[0-9]+\\.[0-9]+\\."; + if(regexpmatch(Lan::nm_name, s390chanid)) { + devid = tointeger("0x" + regexpsub(Lan::nm_name, s390chanid + "(.*)", "\\1")); + devstr = regexpsub(Lan::nm_name, ".*[^0-9](" + s390chanid + ").*", "\\1"); + } + + y2milestone("devid=%1(%2)", devid, devstr); + if(devid == nil) devid = 0; + string devid0 = String::PadZeros(regexpsub(tohexstring(devid), "0x(.*)", "\\1"), 4); + string devid1 = String::PadZeros(regexpsub(tohexstring(devid+1), "0x(.*)", "\\1"), 4); + string devid2 = String::PadZeros(regexpsub(tohexstring(devid+2), "0x(.*)", "\\1"), 4); + Lan::qeth_chanids = sformat("%1%2 %1%3 %1%4", devstr, devid0, devid1, devid2); +Popup::Message(sformat("chanids %1", Lan::qeth_chanids)); + } y2milestone("type=%1",type); } @@ -580,7 +599,6 @@ string helptext = ""; term contents = `Empty (); - if(Lan::type == "qeth") { contents = `HBox( `HSpacing(6), @@ -600,7 +618,9 @@ `Left(`CheckBox(`id(`qeth_layer2), `opt(`notify), _("Enable &Layer 2 Support"))), /* TextEntry label */ `TextEntry(`id(`qeth_macaddress), _("Layer2 &MAC Address"), Lan::qeth_macaddress), - `VSpacing(1) + `VSpacing(1), + /* TextEntry label */ + `TextEntry(`id(`qeth_chanids), _("CHAN IDS"), Lan::qeth_chanids) ), `HSpacing(2))), `HSpacing(6) ); @@ -774,6 +794,7 @@ Lan::ipa_takeover = (boolean) UI::QueryWidget(`id(`ipa_takeover), `Value); Lan::qeth_layer2 = (boolean) UI::QueryWidget(`id(`qeth_layer2), `Value); Lan::qeth_macaddress = (string) UI::QueryWidget(`id(`qeth_macaddress), `Value); + Lan::qeth_chanids = (string) UI::QueryWidget(`id(`qeth_chanids), `Value); } } Modified: branches/SuSE-SLE-10-SP2-Branch/network/src/modules/Lan.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP2-Branch/network/src/modules/Lan.ycp?rev=41500&r1=41499&r2=41500&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP2-Branch/network/src/modules/Lan.ycp (original) +++ branches/SuSE-SLE-10-SP2-Branch/network/src/modules/Lan.ycp Mon Oct 22 10:42:04 2007 @@ -144,6 +144,7 @@ // MAC address handling for IPv4 with the layer2 option global boolean qeth_layer2 = false; global string qeth_macaddress = "00:00:00:00:00:00"; +global string qeth_chanids = ""; // Timeout for LCS LANCMD global string lcs_timeout = "5"; @@ -1124,7 +1125,7 @@ if (qeth_layer2 ) { qeth_macaddress = devmap["LLADDR"]:"00:00:00:00:00:00"; } - + qeth_chanids = NetworkModules::CCW_CHAN_IDS; //if(bootproto == "none") bootproto = "static"; return true; @@ -1235,7 +1236,7 @@ NetworkModules::SCRIPTDOWN = "hwdown-ccw"; NetworkModules::SCRIPTUP_ccwgroup = "hwup-" + type2; } - +/* integer devid = 0; string devstr = ""; @@ -1251,15 +1252,16 @@ string devid0 = String::PadZeros(regexpsub(tohexstring(devid), "0x(.*)", "\\1"), 4); string devid1 = String::PadZeros(regexpsub(tohexstring(devid+1), "0x(.*)", "\\1"), 4); string devid2 = String::PadZeros(regexpsub(tohexstring(devid+2), "0x(.*)", "\\1"), 4); +*/ if(type2 == "ctc" || type2 == "lcs") { - NetworkModules::CCW_CHAN_IDS = sformat("%1%2 %1%3", devstr, devid0, devid1); + NetworkModules::CCW_CHAN_IDS = qeth_chanids; //sformat("%1%2 %1%3", devstr, devid0, devid1); NetworkModules::CCW_CHAN_MODE = chan_mode; NetworkModules::CCW_CHAN_NUM = "2"; NetworkModules::LCS_LANCMD_TIMEOUT = lcs_timeout; } else if(type2 == "qeth") { - NetworkModules::CCW_CHAN_IDS = sformat("%1%2 %1%3 %1%4", devstr, devid0, devid1, devid2); + NetworkModules::CCW_CHAN_IDS = qeth_chanids; //sformat("%1%2 %1%3 %1%4", devstr, devid0, devid1, devid2); NetworkModules::CCW_CHAN_MODE = chan_mode; NetworkModules::CCW_CHAN_NUM = "3"; NetworkModules::QETH_OPTIONS = qeth_options; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
mzugec@svn.opensuse.org