Author: aschnell
Date: Fri Dec 11 15:43:51 2009
New Revision: 60072
URL: http://svn.opensuse.org/viewcvs/yast?rev=60072&view=rev
Log:
- cleanup
Modified:
trunk/storage/storage/src/modules/Storage.ycp
Modified: trunk/storage/storage/src/modules/Storage.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/modules/Storage.ycp?rev=60072&r1=60071&r2=60072&view=diff
==============================================================================
--- trunk/storage/storage/src/modules/Storage.ycp (original)
+++ trunk/storage/storage/src/modules/Storage.ycp Fri Dec 11 15:43:51 2009
@@ -938,8 +938,8 @@
* @param map target
* @return map target
*/
-global define map AddMountPointInfo( map target )
- ``{
+global map AddMountPointInfo( map target )
+ {
list<map> mounts = Partitions::CurMounted();
foreach(string diskdev, map disk, target,
``{
@@ -2887,16 +2887,14 @@
* @parm primary handle primary or logical partitions
* @return list new partitions with windows mountpoints
*/
-define void AddMountPointsForWinParts( list<map> partitions, boolean primary,
- integer max_prim, integer& foreign_nr )
- ``{
+void AddMountPointsForWinParts( list<map> partitions, boolean primary,
+ integer max_prim, integer& foreign_nr )
+ {
if( !Arch::i386 () && !Arch::ia64 () && !Arch::x86_64 () )
return;
string foreign_ids = "CDEFGHIJKLMNOPQRSTUVW";
- list<map> new_partitions = [];
-
foreach(map partition, partitions,
``{
map new_partition = partition;
@@ -2937,8 +2935,8 @@
};
-global define void AddMountPointsForWin( map targets )
- ``{
+global void AddMountPointsForWin( map targets )
+ {
y2milestone( "AddMountPointsForWin called" );
integer foreign_nr = 0;
@@ -2993,9 +2991,9 @@
* @param target Disk map
* @return map modified target
*/
-global define map AddSwapMp( map target )
- ``{
- list swaps = SwappingPartitions();
+global map AddSwapMp( map target )
+ {
+ list<string> swaps = SwappingPartitions();
y2milestone( "AddSwapMp swaps %1", swaps );
foreach(string diskdev, map disk, target,
``{
@@ -3025,7 +3023,7 @@
});
target[diskdev] = disk;
});
- return( target );
+ return target;
}
@@ -3960,25 +3958,20 @@
return( ret );
}
+
/**
* Check if swap paritition is availbe on a disk
* @param disk Disk to be checked
* @return boolean true if swap available.
*/
-global define boolean CheckSwapOn( string disk )``{
- boolean ret = false;
- list swaps = SwappingPartitions();
- while( size(swaps)>0 && !ret )
- {
- if( search( swaps[0]:"", disk )==0)
- {
- ret = true;
- }
- swaps = remove( swaps, 0 );
- }
- y2milestone( "CheckSwapOn %1 ret %2", disk, ret );
- return( ret );
- }
+global boolean CheckSwapOn(string disk)
+{
+ list<string> swaps = SwappingPartitions();
+ boolean ret = contains(SwappingPartitions(), disk);
+ y2milestone("CheckSwapOn disk:%1 ret:%2", disk, ret);
+ return ret;
+}
+
/**
* Returns list of primary partitions found
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org