Author: fehr Date: Wed Aug 10 16:48:04 2011 New Revision: 65303 URL: http://svn.opensuse.org/viewcvs/yast?rev=65303&view=rev Log: do not allow to partition disks used by LVM in disk selection Modified: trunk/storage/package/yast2-storage.changes trunk/storage/storage/src/inst_target_selection.ycp trunk/storage/storage/src/modules/StorageFields.ycp Modified: trunk/storage/package/yast2-storage.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/package/yast2-storage.cha... ============================================================================== --- trunk/storage/package/yast2-storage.changes (original) +++ trunk/storage/package/yast2-storage.changes Wed Aug 10 16:48:04 2011 @@ -2,6 +2,7 @@ Wed Aug 10 14:59:41 CEST 2011 - fehr@suse.de - allow label on btrfs when format is true +- do not allow to partition disks used by LVM in disk selection ------------------------------------------------------------------- Tue Aug 9 16:29:08 CEST 2011 - fehr@suse.de Modified: trunk/storage/storage/src/inst_target_selection.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/inst_target_s... ============================================================================== --- trunk/storage/storage/src/inst_target_selection.ycp (original) +++ trunk/storage/storage/src/inst_target_selection.ycp Wed Aug 10 16:48:04 2011 @@ -24,6 +24,7 @@ import "Partitions"; import "Wizard"; import "Storage"; + import "StorageFields"; include "partitioning/custom_part_helptexts.ycp"; @@ -230,6 +231,12 @@ Popup::Error( Partitions::RdonlyText( (string)option, true )); sym = `again; } + else if( Storage::IsUsedBy(targetMap[(string)option]:$[])) + { + string s = StorageFields::UsedByString(targetMap[(string)option,"used_by",0]:$[] ); + Popup::Error( sformat(_("Disk %1 is in use by %2"), (string)option, s )); + sym = `again; + } else { Storage::SetPartMode( "USE_DISK" ); Modified: trunk/storage/storage/src/modules/StorageFields.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/modules/Stora... ============================================================================== --- trunk/storage/storage/src/modules/StorageFields.ycp (original) +++ trunk/storage/storage/src/modules/StorageFields.ycp Wed Aug 10 16:48:04 2011 @@ -57,7 +57,7 @@ } - string UsedByString(map<string, any> used_by) +global string UsedByString(map<string, any> used_by) { symbol type = used_by["type"]:`UB_NONE; string device = used_by["device"]:""; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org