Author: aschnell Date: Mon Feb 8 14:21:21 2010 New Revision: 60726 URL: http://svn.opensuse.org/viewcvs/yast?rev=60726&view=rev Log: - do not allow deletion of partitions on DASD when other partitions of that DASD are in use (bnc #577468) Modified: branches/SuSE-Code-11-SP1-Branch/storage/package/yast2-storage.changes branches/SuSE-Code-11-SP1-Branch/storage/storage/src/modules/Storage.ycp Modified: branches/SuSE-Code-11-SP1-Branch/storage/package/yast2-storage.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/storage/package/yast2-storage.changes?rev=60726&r1=60725&r2=60726&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/storage/package/yast2-storage.changes (original) +++ branches/SuSE-Code-11-SP1-Branch/storage/package/yast2-storage.changes Mon Feb 8 14:21:21 2010 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Mon Feb 08 14:03:47 CET 2010 - aschnell@suse.de + +- do not allow deletion of partitions on DASD when other partitions + of that DASD are in use (bnc #577468) + +------------------------------------------------------------------- Mon Feb 08 11:25:39 CET 2010 - aschnell@suse.de - allow deletion of certain partitioned RAIDs (bnc #577468) Modified: branches/SuSE-Code-11-SP1-Branch/storage/storage/src/modules/Storage.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/storage/storage/src/modules/Storage.ycp?rev=60726&r1=60725&r2=60726&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/storage/storage/src/modules/Storage.ycp (original) +++ branches/SuSE-Code-11-SP1-Branch/storage/storage/src/modules/Storage.ycp Mon Feb 8 14:21:21 2010 @@ -4079,6 +4079,21 @@ Popup::Message( txt ); } } + + if (ret && substring(disk["device"]:"", 0, 9) == "/dev/dasd") + { + if (find(map partition, disk["partitions"]:[], { + return partition["device"]:"" != p["device"]:"" && + partition["used_by_type"]:`UB_NONE != `UB_NONE; }) != nil) + { + txt = sformat(_(" +Partition %1 cannot be removed since other partitions on the +disk %2 are in used."), p["device"]:"", disk["device"]:""); + Popup::Message(txt); + ret = false; + }; + } + y2milestone( "CanDelete dev:%1 verbose:%2 ret:%3", p["device"]:"", verbose, ret ); return( ret ); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org