Author: aschnell
Date: Fri Dec 5 15:37:40 2008
New Revision: 53948
URL: http://svn.opensuse.org/viewcvs/yast?rev=53948&view=rev
Log:
- don't show disks used by DM RAID or DM Multipath in disk selection dialog (bnc #456776)
Modified:
trunk/storage/package/yast2-storage.changes
trunk/storage/storage/src/inst_target_selection.ycp
Modified: trunk/storage/package/yast2-storage.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/package/yast2-storage.changes?rev=53948&r1=53947&r2=53948&view=diff
==============================================================================
--- trunk/storage/package/yast2-storage.changes (original)
+++ trunk/storage/package/yast2-storage.changes Fri Dec 5 15:37:40 2008
@@ -4,6 +4,8 @@
- fixed creation of partitions on device-mapper devices (bnc
#456615)
- fixed used_by_device for DM RAID (bnc #456774)
+- don't show disks used by DM RAID or DM Multipath in disk
+ selection dialog (bnc #456776)
- 2.17.61
-------------------------------------------------------------------
Modified: trunk/storage/storage/src/inst_target_selection.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/inst_target_selection.ycp?rev=53948&r1=53947&r2=53948&view=diff
==============================================================================
--- trunk/storage/storage/src/inst_target_selection.ycp (original)
+++ trunk/storage/storage/src/inst_target_selection.ycp Fri Dec 5 15:37:40 2008
@@ -64,48 +64,39 @@
term buttonbox = `VBox();
- integer dskcnt = size( filter( string d, map e, targetMap,
- ``(Storage::IsPartitionable( e ))));
+ map usable_target_map = filter(string d, map e, targetMap, {
+ return Storage::IsPartitionable(e) &&
+ !contains([ `UB_DMRAID, `UB_DMMULTIPATH ], e["used_by_type"]:`UB_NONE);
+ });
+
+ integer dskcnt = size(usable_target_map);
y2milestone( "dskcnt %1", dskcnt );
- if( dskcnt>10 )
- {
+ if (dskcnt > 10)
+ {
integer i = 1;
list disklist = [];
- foreach( string tname, map tdata, targetMap,
- ``{
- if( Storage::IsPartitionable( tdata ))
- {
- disklist = add( disklist,
- `item(`id(tname),
- sformat( "%1: %2", i, tname )));
- i = i + 1;
- }
- });
- buttonbox = add( buttonbox,
- `SelectionBox(`id(`disklist), `opt(`notify),
- _("Available &Disks"),
- disklist ));
- }
+ foreach(string tname, map tdata, usable_target_map, {
+ disklist = add(disklist, `item(`id(tname), sformat("%1: %2", i, tname)));
+ i = i + 1;
+ });
+ buttonbox = add(buttonbox, `SelectionBox(`id(`disklist), `opt(`notify),
+ _("Available &Disks"), disklist));
+ }
else
- {
+ {
integer i = 1;
- foreach( string tname, map tdata, targetMap,
- ``{
- if( Storage::IsPartitionable( tdata ))
- {
- string tlinename = tdata["name"]:"?";
- if( tdata["type"]:`CT_UNKNOWN==`CT_DMRAID )
- tlinename = "BIOS RAID " + tdata["name"]:"?";
- string tline = "&" + i + ": " + tlinename;
- boolean sel = Storage::GetPartDisk()==tname &&
- !custom_val;
- buttonbox = add( buttonbox,
- `Left(`RadioButton(`id(tname), tline, sel )));
- i = i + 1;
- }
- });
- }
+ foreach(string tname, map tdata, usable_target_map, {
+ string tlinename = tdata["name"]:"?";
+ if( tdata["type"]:`CT_UNKNOWN==`CT_DMRAID )
+ tlinename = "BIOS RAID " + tdata["name"]:"?";
+ string tline = "&" + i + ": " + tlinename;
+ boolean sel = Storage::GetPartDisk()==tname &&
+ !custom_val;
+ buttonbox = add(buttonbox, `Left(`RadioButton(`id(tname), tline, sel)));
+ i = i + 1;
+ });
+ }
buttonbox = add(buttonbox, `VSpacing(0.8) );
// Check box for expert partitioning mode rather than
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org