[yast-commit] r67416 - in /trunk/s390/src: dasd/dialogs.ycp modules/DASDController.ycp modules/ZFCPController.ycp zfcp/dialogs.ycp

Author: aschnell Date: Fri Feb 10 17:47:54 2012 New Revision: 67416 URL: http://svn.opensuse.org/viewcvs/yast?rev=67416&view=rev Log: - removed defines and double back ticks Modified: trunk/s390/src/dasd/dialogs.ycp trunk/s390/src/modules/DASDController.ycp trunk/s390/src/modules/ZFCPController.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=674... ============================================================================== --- trunk/s390/src/dasd/dialogs.ycp (original) +++ trunk/s390/src/dasd/dialogs.ycp Fri Feb 10 17:47:54 2012 @@ -440,7 +440,8 @@ * Run the dialog for adding DASDs * @return symbol from AddDASDDiskDialog */ -define symbol AddDASDDiskDialog () ``{ +symbol AddDASDDiskDialog () +{ if (! Mode::config ()) { y2error ("DASD Add Disk dialog shouldn't be run in Mode::config ()"); Modified: trunk/s390/src/modules/DASDController.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/s390/src/modules/DASDController.y... ============================================================================== --- trunk/s390/src/modules/DASDController.ycp (original) +++ trunk/s390/src/modules/DASDController.ycp Fri Feb 10 17:47:54 2012 @@ -31,12 +31,12 @@ global map<string, boolean> diag = $[]; -global define void ActivateDisk (string channel, boolean diag); -global define void DeactivateDisk (string channel, boolean diag); -global define void ProbeDisks (); -global define void FormatDisks (list<string> disks_list, integer par, +global void ActivateDisk (string channel, boolean diag); +global void DeactivateDisk (string channel, boolean diag); +global void ProbeDisks (); +global void FormatDisks (list<string> disks_list, integer par, boolean write_vl, boolean interactive); -global define string GetPartitionInfo (string disk); +global string GetPartitionInfo (string disk); boolean disk_configured = false; @@ -71,7 +71,8 @@ * Abort function * @return blah blah lahjk */ -global define boolean Abort() ``{ +global boolean Abort() +{ if(AbortFunction != nil) return AbortFunction (); return false; @@ -297,43 +298,38 @@ return $[ "install":[], "remove":[] ]; } + /** * Check if DASD subsystem is available * @return boolean True if more than one disk */ -global define boolean IsAvailable () { - list<map<string,any> > disks = (list<map<string,any> >) - SCR::Read (.probe.disk); - - disks = filter (map<string,any> d, disks, ``( - tolower (d["device"]:"") == "dasd" - )); +global boolean IsAvailable() +{ + list<map<string, any> > disks = (list<map<string,any> >) SCR::Read(.probe.disk); + disks = filter (map<string,any> d, disks, { return tolower(d["device"]:"") == "dasd"; }); integer count = size (disks); y2milestone ("Detected %1 DASD disks", count); - return (count > 0); + return count > 0; } /** * Probe for DASD disks */ -global define void ProbeDisks () { +global void ProbeDisks() +{ /* if (Mode::config ()) return; */ // popup label UI::OpenDialog (`Label (_("Reading Configured DASD Disks"))); - list<map<string,any> > disks = (list<map<string,any> >) - SCR::Read (.probe.disk); - - disks = filter (map<string,any> d, disks, ``( - tolower (d["device"]:"") == "dasd" - )); - - disks = maplist (map<string,any> d, disks, ``{ + list<map<string, any> > disks = (list<map<string, any> >) SCR::Read(.probe.disk); + disks = filter (map<string, any> d, disks, { return tolower(d["device"]:"") == "dasd"; }); + + disks = maplist (map<string,any> d, disks, { string channel = d["sysfs_bus_id"]:"0.0.0000"; d["channel"] = channel; boolean active = d["resource", "io", 0, "active"]:false; @@ -362,7 +358,7 @@ return d; }); integer index = -1; - DASDController::devices = listmap (map<string,any> d, disks, ``{ + DASDController::devices = listmap (map<string,any> d, disks, { index = index + 1; return $[ index : d ]; }); @@ -408,7 +404,8 @@ * @param id integer chanel id of the device * @param ret integer exit code of the operation */ -define void ReportActivationError (any id, integer ret) { +void ReportActivationError(any id, integer ret) +{ if (ret != 0) { if (ret == 1) @@ -459,7 +456,8 @@ * @param channel string Name of the disk to activate * @param diag boolean Activate DIAG or not */ -global define void ActivateDisk (string channel, boolean diag) { +global void ActivateDisk(string channel, boolean diag) +{ // if (! Arch::s390_32 ()) diag = false; string command = sformat ( "/sbin/dasd_configure '%1' '%2' '%3'", @@ -503,7 +501,8 @@ * @param channel string Name of the disk to deactivate * @param diag boolean Activate DIAG or not */ -global define void DeactivateDisk (string channel, boolean diag) { +global void DeactivateDisk(string channel, boolean diag) +{ // if (! Arch::s390_32 ()) diag = false; string command = sformat ( "/sbin/dasd_configure '%1' '%2' '%3'", @@ -524,8 +523,8 @@ * @param write_vl boolean Write a Volume label * @param interactive boolean Interactive yes/no */ -global define void FormatDisks (list<string> disks_list, integer par, - boolean write_vl, boolean interactive) +global void FormatDisks(list<string> disks_list, integer par, boolean write_vl, + boolean interactive) { if (par > size (disks_list)) par = size (disks_list); Modified: trunk/s390/src/modules/ZFCPController.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/s390/src/modules/ZFCPController.y... ============================================================================== --- trunk/s390/src/modules/ZFCPController.ycp (original) +++ trunk/s390/src/modules/ZFCPController.ycp Fri Feb 10 17:47:54 2012 @@ -32,8 +32,8 @@ map<string,boolean> activated_controllers = $[]; -global define void ActivateDisk (string channel, string wwpn, string lun); -global define void ProbeDisks(); +global void ActivateDisk(string channel, string wwpn, string lun); +global void ProbeDisks(); boolean disk_configured = false; @@ -87,11 +87,13 @@ */ global boolean() AbortFunction = Modified; + /** * Abort function * @return blah blah lahjk */ -global define boolean Abort() ``{ +global boolean Abort() +{ if(AbortFunction != nil) return AbortFunction (); return false; @@ -274,7 +276,8 @@ * Get available zfcp controllers * @return list<map<string,any> > of availabel Controllers */ -global define list<map<string,any> > GetControllers () { +global list<map<string, any> > GetControllers() +{ if (controllers == nil) { controllers = (list<map<string,any> >)SCR::Read (.probe.storage); @@ -330,7 +333,8 @@ * @param id integer chanel id of the device * @param ret integer exit code of the operation */ -define void ReportActivationError (any id, integer ret) { +void ReportActivationError(any id, integer ret) +{ if (ret != 0) { if (ret == 1) @@ -381,7 +385,8 @@ * @param id integer chanel id of the device * @param ret integer exit code of the operation */ -define void ReportControllerActivationError (any id, integer ret) { +void ReportControllerActivationError(any id, integer ret) +{ if (ret != 0) { if (ret == 1) @@ -421,8 +426,8 @@ * @param wwpn string wwpn (hexa number) * @param lun string lun (hexa number) */ -global define void ActivateDisk (string channel, string wwpn, string lun) { - +global void ActivateDisk(string channel, string wwpn, string lun) +{ if (! activated_controllers[channel]:false) { string command = sformat ( @@ -462,7 +467,8 @@ * @param wwpn string wwpn (hexa number) * @param lun string lun (hexa number) */ -global define void DeactivateDisk (string channel, string wwpn, string lun) { +global void DeactivateDisk(string channel, string wwpn, string lun) +{ string command = sformat ( "/sbin/zfcp_disk_configure '%1' '%2' '%3' '%4'", channel, Modified: trunk/s390/src/zfcp/dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/s390/src/zfcp/dialogs.ycp?rev=674... ============================================================================== --- trunk/s390/src/zfcp/dialogs.ycp (original) +++ trunk/s390/src/zfcp/dialogs.ycp Fri Feb 10 17:47:54 2012 @@ -145,7 +145,8 @@ * Show the ZFCP-Dialog * @return symbol From the dialog */ -define symbol ZFCPDialog () ``{ +symbol ZFCPDialog() +{ DisplayZFCPDialog (); ReloadZFCPDialog (); @@ -216,7 +217,8 @@ * Add ZFCP-Dialog * @return symbol the dialog */ -define symbol AddZFCPDiskDialog () ``{ +symbol AddZFCPDiskDialog() +{ /* Minimal text for the help */ string help = ZFCP_HELPS["disk_add"]:""; @@ -229,7 +231,7 @@ integer i_lun = tointeger (fcp_lun); integer new_lun = i_lun; - foreach (integer k, map<string,any> v, ZFCPController::devices, ``{ + foreach (integer k, map<string,any> v, ZFCPController::devices, { if (i_lun == tointeger (v["detail", "fcp_lun"]:"")) { if (v["vendor"]:"" == "IBM" && v["device"]:"" == "25f03") @@ -245,19 +247,15 @@ list<string>items = []; if (Mode::config ()) { - items = maplist (integer index, map<string,any> d, - ZFCPController::devices, - { + items = maplist (integer index, map<string, any> d, ZFCPController::devices, { return d["detail", "controller_id"]:""; }); items = toset (items); - items = filter (string i, items, ``(i != "" && i != nil)); + items = filter (string i, items, { return i != "" && i != nil; }); } else { - items = maplist (map<string,any> c, - ZFCPController::GetControllers (), - ``{ + items = maplist (map<string, any> c, ZFCPController::GetControllers(), { string channel = c["sysfs_bus_id"]:"0.0.0000"; return channel; }); -- 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