Author: mzugec
Date: Thu Nov 12 17:52:50 2009
New Revision: 59505
URL: http://svn.opensuse.org/viewcvs/yast?rev=59505&view=rev
Log:
zfcp: fixed devices list filter (bnc#538313)
Modified:
trunk/s390/VERSION
trunk/s390/package/yast2-s390.changes
trunk/s390/src/dasd/dialogs.ycp
trunk/s390/src/modules/ZFCPController.ycp
trunk/s390/src/zfcp/dialogs.ycp
Modified: trunk/s390/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/s390/VERSION?rev=59505&r1=59504&r2=59505&view=diff
==============================================================================
--- trunk/s390/VERSION (original)
+++ trunk/s390/VERSION Thu Nov 12 17:52:50 2009
@@ -1 +1 @@
-2.18.7
+2.18.8
Modified: trunk/s390/package/yast2-s390.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/s390/package/yast2-s390.changes?rev=59505&r1=59504&r2=59505&view=diff
==============================================================================
--- trunk/s390/package/yast2-s390.changes (original)
+++ trunk/s390/package/yast2-s390.changes Thu Nov 12 17:52:50 2009
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Thu Nov 12 17:48:55 CET 2009 - mzugec@suse.cz
+
+- zfcp: fixed devices list filter (bnc#538313)
+- 2.18.8
+
+-------------------------------------------------------------------
Thu Nov 5 17:30:14 CET 2009 - mzugec@suse.cz
- dasd: display DIAG mode (bnc#551268)
Modified: trunk/s390/src/dasd/dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/s390/src/dasd/dialogs.ycp?rev=59505&r1=59504&r2=59505&view=diff
==============================================================================
--- trunk/s390/src/dasd/dialogs.ycp (original)
+++ trunk/s390/src/dasd/dialogs.ycp Thu Nov 12 17:52:50 2009
@@ -254,9 +254,9 @@
term content = `VBox(
`HBox(
// text entry
- `TextEntry(`id(`min_chan), _("Mi&nimum Channel"), "0.0.0000"),
+ `InputField(`id(`min_chan), `opt(`hstretch), _("Mi&nimum Channel"), "0.0.0000"),
// text entry
- `TextEntry(`id(`max_chan), _("Ma&ximum Channel"), "0.f.ffff"),
+ `InputField(`id(`max_chan), `opt(`hstretch), _("Ma&ximum Channel"), "0.f.ffff"),
`VBox (
`Label (""),
// push button
Modified: trunk/s390/src/modules/ZFCPController.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/s390/src/modules/ZFCPController.ycp?rev=59505&r1=59504&r2=59505&view=diff
==============================================================================
--- trunk/s390/src/modules/ZFCPController.ycp (original)
+++ trunk/s390/src/modules/ZFCPController.ycp Thu Nov 12 17:52:50 2009
@@ -27,9 +27,9 @@
global map selected = $[];
-global string filter_min = "0x0000";
+global string filter_min = "0.0.0000";
-global string filter_max = "0xffff";
+global string filter_max = "0.f.ffff";
global map previous_settings = $[];
Modified: trunk/s390/src/zfcp/dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/s390/src/zfcp/dialogs.ycp?rev=59505&r1=59504&r2=59505&view=diff
==============================================================================
--- trunk/s390/src/zfcp/dialogs.ycp (original)
+++ trunk/s390/src/zfcp/dialogs.ycp Thu Nov 12 17:52:50 2009
@@ -53,20 +53,36 @@
* @param max_chan integer maximal channel number
* @return a list of terms for the table
*/
-define list<term> GetZFCPDiskItems(integer min_chan, integer max_chan) ``{
+define list<term> GetZFCPDiskItems(string min_channel, string max_channel) ``{
integer id = 0;
-
list<term> items = [];
map > devices = ZFCPController::devices;
- if (min_chan >= 0)
+ integer min_css = tointeger(substring (min_channel, 0, 1));
+ integer min_lcss = tointeger(sformat("0x%1",substring (min_channel, 2, 1)));
+ integer min_chan = tointeger(sformat("0x%1",substring (min_channel, 4, 4)));
+
+ integer max_css = tointeger(substring (max_channel, 0, 1));
+ integer max_lcss = tointeger(sformat("0x%1",substring (max_channel, 2, 1)));
+ integer max_chan = tointeger(sformat("0x%1",substring (max_channel, 4, 4)));
+
+
+ if (min_chan > 0 || min_lcss > 0 || min_css > 0 ||
+ max_chan < 0xffff || max_lcss < 0xf || max_css < 0xf)
{
devices = (map >)filter (
integer k, map d, devices,
``{
- integer channel = d["resource", "io", 0, "start"]:0;
- return (channel >= min_chan && channel <= max_chan);
+ string channel = d["detail", "controller_id"]:"0.0.0000";
+ integer tmp_css = tointeger(substring (channel, 0, 1));
+ integer tmp_lcss = tointeger(sformat("0x%1",substring (channel, 2, 1)));
+ integer tmp_chan = tointeger(sformat("0x%1",substring (channel, 4, 4)));
+
+
+ boolean ret = (tmp_css >= min_css && tmp_lcss >= min_lcss && tmp_chan >= min_chan
+ && tmp_css <= max_css && tmp_lcss <= max_lcss && tmp_chan <= max_chan);
+ return ret;
});
}
@@ -92,16 +108,12 @@
* Restart the ZFCP-Dialog
*/
define void ReloadZFCPDialog () ``{
- ZFCPController::filter_min = (string)
- UI::QueryWidget(`min_chan, `Value);
- ZFCPController::filter_max = (string)
- UI::QueryWidget(`max_chan, `Value);
+ ZFCPController::filter_min = (string) UI::QueryWidget(`min_chan, `Value);
+ ZFCPController::filter_max = (string) UI::QueryWidget(`max_chan, `Value);
ZFCPController::ProbeDisks ();
- list<term> items = GetZFCPDiskItems (
- tointeger(ZFCPController::filter_min),
- tointeger(ZFCPController::filter_max));
+ list<term> items = GetZFCPDiskItems (ZFCPController::filter_min, ZFCPController::filter_max);
UI::ChangeWidget(`id(`table), `Items, items);
UI::ChangeWidget (`id (`delete), `Enabled, size (items) > 0);
@@ -123,9 +135,9 @@
term content = `VBox(
`HBox(
// text entry
- `TextEntry(`id(`min_chan), _("Mi&nimum Channel"), "0x0000"),
+ `InputField(`id(`min_chan), `opt(`hstretch), _("Mi&nimum Channel"), ZFCPController::filter_min),
// text entry
- `TextEntry(`id(`max_chan), _("Ma&ximum Channel"), "0xffff"),
+ `InputField(`id(`max_chan), `opt(`hstretch), _("Ma&ximum Channel"), ZFCPController::filter_max),
`VBox (
`Label (""),
// push button
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org