[yast-commit] r55486 - in /trunk/storage: package/yast2-storage.changes storage/src/include/do_proposal_flexible.ycp
Author: aschnell
Date: Fri Feb 13 10:48:19 2009
New Revision: 55486
URL: http://svn.opensuse.org/viewcvs/yast?rev=55486&view=rev
Log:
- restrict number of disks considered for proposal (see bnc #468922)
Modified:
trunk/storage/package/yast2-storage.changes
trunk/storage/storage/src/include/do_proposal_flexible.ycp
Modified: trunk/storage/package/yast2-storage.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/package/yast2-storage.changes?rev=55486&r1=55485&r2=55486&view=diff
==============================================================================
--- trunk/storage/package/yast2-storage.changes (original)
+++ trunk/storage/package/yast2-storage.changes Fri Feb 13 10:48:19 2009
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Fri Feb 13 10:44:54 CET 2009 - aschnell@suse.de
+
+- restrict number of disks considered for proposal (see bnc
+ #468922)
+
+-------------------------------------------------------------------
Thu Feb 12 12:06:48 CET 2009 - aschnell@suse.de
- keep bios_id in functions that update target-map (bnc #472476)
Modified: trunk/storage/storage/src/include/do_proposal_flexible.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/do_proposal_flexible.ycp?rev=55486&r1=55485&r2=55486&view=diff
==============================================================================
--- trunk/storage/storage/src/include/do_proposal_flexible.ycp (original)
+++ trunk/storage/storage/src/include/do_proposal_flexible.ycp Fri Feb 13 10:48:19 2009
@@ -486,39 +486,29 @@
return( ret );
}
-define list<string> restrict_disk_names( list<string> disks )
+
+list<string> restrict_disk_names(list<string> disks)
+{
+ void helper(string s)
{
- list<string> ddev = disks;
- list<string> d1 = filter( string s, ddev, ``(search(s,"/dev/hd")==0));
- ddev = filter( string s, ddev, ``(search(s,"/dev/hd")!=0));
- if( size(d1)>2 )
- {
- integer count=1;
- d1 = maplist( string s, d1,
- ``{
- return( (count<=2)?s:"" );
- count=count+1;
- });
- d1 = filter( string s, d1, ``(size(s)>0));
- }
- d1 = (list<string>)merge( d1, filter( string s, ddev,
- ``(search(s,"/dev/sd")==0)));
- ddev = filter( string s, ddev, ``(search(s,"/dev/sd")!=0));
- ddev = (list<string>)merge( d1, ddev );
- if( size(ddev)>4 )
- {
- integer count=1;
- ddev = maplist( string s, ddev,
- ``{
- return( (count<=4)?s:"" );
- count=count+1;
- });
- ddev = filter( string s, ddev, ``(size(s)>0));
- }
- y2milestone( "restrict_disk_names: ret %1", ddev );
- return( ddev );
+ integer count = 0;
+ disks = filter(string dist, disks, {
+ if (search(dist, s) != 0)
+ return true;
+ count = count + 1;
+ return count <= 16;
+ });
}
+ helper("/dev/sd");
+ helper("/dev/hd");
+ helper("/dev/cciss/");
+
+ y2milestone("restrict_disk_names: ret %1", disks);
+ return disks;
+}
+
+
define map do_pflex( map
participants (1)
-
aschnell@svn.opensuse.org