Author: kmachalkova
Date: Thu Nov 5 14:23:18 2009
New Revision: 59331
URL: http://svn.opensuse.org/viewcvs/yast?rev=59331&view=rev
Log:
- Disks with different cylinder size do not qualify
- Ask user whether to delete partitions only when
there's anything to do
Modified:
branches/SuSE-Code-11-SP1-Branch/storage/storage/src/include/ep-hd-lib.ycp
Modified: branches/SuSE-Code-11-SP1-Branch/storage/storage/src/include/ep-hd-lib.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/storage/storage/src/include/ep-hd-lib.ycp?rev=59331&r1=59330&r2=59331&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/storage/storage/src/include/ep-hd-lib.ycp (original)
+++ branches/SuSE-Code-11-SP1-Branch/storage/storage/src/include/ep-hd-lib.ycp Thu Nov 5 14:23:18 2009
@@ -353,6 +353,7 @@
map target_map = Storage::GetTargetMap();
integer mysize = target_map[ device, "size_k"]:0;
+ integer mycyl_size = target_map[ device, "cyl_size"]:0;
list <map> myparts = target_map[ device, "partitions"]:[];
string mypart_table_type = target_map[ device, "label" ]:Storage::DefaultDiskLabel( mysize );
@@ -382,7 +383,8 @@
filter( string dev, map props, target_map, {
return ( dev != device &&
props["type"]:`CT_UNKNOWN == `CT_DISK &&
- props["used_by_device"]:"" == "");
+ props["used_by_device"]:"" == "" &&
+ props["cyl_size"]:0 == mycyl_size );
});
y2milestone("Available and unused disks (other than %1): %2", device, Map::Keys(filtered_target_map));
@@ -484,7 +486,9 @@
}
});
- if (!ConfirmDeletePartitions( partitions_to_delete )){
+ //if there is anything to delete, ask user if s/he really wants to delete
+ if ( size(partitions_to_delete) > 0 &&
+ !ConfirmDeletePartitions( partitions_to_delete )) {
ret = nil;
continue;
}
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org