[yast-commit] r67403 - in /trunk/s390/src: dasd/dialogs.ycp modules/DASDController.ycp zfcp/dialogs.ycp
Author: aschnell Date: Fri Feb 10 11:45:05 2012 New Revision: 67403 URL: http://svn.opensuse.org/viewcvs/yast?rev=67403&view=rev Log: - replaced FourDigitHex by tohexstring - removed unneeded casts Modified: trunk/s390/src/dasd/dialogs.ycp trunk/s390/src/modules/DASDController.ycp trunk/s390/src/zfcp/dialogs.ycp Modified: trunk/s390/src/dasd/dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/s390/src/dasd/dialogs.ycp?rev=67403&r1=67402&r2=67403&view=diff ============================================================================== --- trunk/s390/src/dasd/dialogs.ycp (original) +++ trunk/s390/src/dasd/dialogs.ycp Fri Feb 10 11:45:05 2012 @@ -98,36 +98,24 @@ else { items = maplist(integer k, map<string, any> d, devices, { - boolean active = (boolean)(d["resource", "io", 0, "active"]:false); - integer channel = (integer)(d["resource", "io", 0, "start"]:0); - string str_channel = (string)(d["channel"]:""); - string access = toupper ((string)(d["resource", "io", 0, "mode"]:"RO")); + boolean active = d["resource", "io", 0, "active"]:false; + integer channel = d["resource", "io", 0, "start"]:0; + string str_channel = d["channel"]:""; + string access = toupper(d["resource", "io", 0, "mode"]:"RO"); string diag = DASDController::diag[str_channel]:false // table cell ? _("Yes") // table cell : _("No"); string device = d["dev_name"]:""; - string type = toupper (sformat ("%1/%2, %3/%4", - substring ( - DASDController::FourDigitHex ( - d["device_id"]:0 & tointeger ("0xffff") - ), - 2), - substring ( - DASDController::FourDigitHex (d["detail", "cu_model"]:0), - 4), - substring ( - DASDController::FourDigitHex ( - d["sub_device_id"]:0 & tointeger ("0xffff") - ), - 2), - substring ( - DASDController::FourDigitHex (d["detail", "dev_model"]:0), - 4) + string type = toupper(sformat("%1/%2, %3/%4", + substring(tohexstring(d["device_id"]:0 & 0xffff, 4), 2), + substring(tohexstring(d["detail", "cu_model"]:0, 4), 4), + substring(tohexstring(d["sub_device_id"]:0 & 0xffff, 4), 2), + substring(tohexstring(d["detail", "dev_model"]:0, 4), 4) )); - string formatted = (boolean)d["formatted"]:false + string formatted = d["formatted"]:false // table cell ? _("Yes") // table cell Modified: trunk/s390/src/modules/DASDController.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/s390/src/modules/DASDController.ycp?rev=67403&r1=67402&r2=67403&view=diff ============================================================================== --- trunk/s390/src/modules/DASDController.ycp (original) +++ trunk/s390/src/modules/DASDController.ycp Fri Feb 10 11:45:05 2012 @@ -323,26 +323,6 @@ /** - * Translate integer number to its hexadecimal representation with leading - * 0x and exactliy 4 hexadecimal numbers - * @param i integer integer number - * @return string hexadecimal number - */ -global define string FourDigitHex(integer i) ``{ - string s = tohexstring(i); - string zeros = ""; - - integer l = 6 - size(s); - - while (l > 0) { - zeros = zeros + "0"; - l = l - 1; - } - - return substring(s, 0, 2) + zeros + substring(s, 2); -} - -/** * Probe for DASD disks */ global define void ProbeDisks () { Modified: trunk/s390/src/zfcp/dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/s390/src/zfcp/dialogs.ycp?rev=67403&r1=67402&r2=67403&view=diff ============================================================================== --- trunk/s390/src/zfcp/dialogs.ycp (original) +++ trunk/s390/src/zfcp/dialogs.ycp Fri Feb 10 11:45:05 2012 @@ -58,7 +58,7 @@ list<term> items = []; items = maplist(integer k, map<string, any> d, devices, { - string dev_name = (string)(d["dev_name"]:""); + string dev_name = d["dev_name"]:""; string channel = d["detail", "controller_id"]:"unknown"; string wwpn = d["detail", "wwpn"]:"unknown"; string fcp_lun = d["detail", "fcp_lun"]:"unknown"; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
aschnell@svn2.opensuse.org