Author: aschnell
Date: Mon Aug 18 16:38:47 2008
New Revision: 50186
URL: http://svn.opensuse.org/viewcvs/yast?rev=50186&view=rev
Log:
- implemented deletion of bios raid
Modified:
trunk/storage/storage/src/include/ep-hd-lib.ycp
trunk/storage/storage/src/include/ep-hd.ycp
Modified: trunk/storage/storage/src/include/ep-hd-lib.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-hd-lib.ycp?rev=50186&r1=50185&r2=50186&view=diff
==============================================================================
--- trunk/storage/storage/src/include/ep-hd-lib.ycp (original)
+++ trunk/storage/storage/src/include/ep-hd-lib.ycp Mon Aug 18 16:38:47 2008
@@ -64,6 +64,34 @@
}
+ void EpDeleteDisk(string device)
+ {
+ if (device == nil)
+ {
+ Popup::Error(_("No disk selected."));
+ return;
+ }
+
+ map target_map = Storage::GetTargetMap();
+ map disk = Storage::GetDisk(target_map, device);
+
+ if (disk["type"]:`CT_UNKNOWN == `CT_DMRAID)
+ {
+ if (Popup::YesNo(sformat(_("Really delete BIOS RAID %1?"), device)))
+ {
+ if (deleteAllDevPartitions(disk, Stage::initial(), false))
+ Storage::DeleteDmraid(device);
+ UpdateNavigationTree(`hd);
+ TreePanel::Create();
+ }
+ }
+ else
+ {
+ Popup::Error(_("The disk cannot be deleted."));
+ }
+ }
+
+
map GetPossibleSlots(map disk, string disk_device)
{
list<map> slots = [];
Modified: trunk/storage/storage/src/include/ep-hd.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-hd.ycp?rev=50186&r1=50185&r2=50186&view=diff
==============================================================================
--- trunk/storage/storage/src/include/ep-hd.ycp (original)
+++ trunk/storage/storage/src/include/ep-hd.ycp Mon Aug 18 16:38:47 2008
@@ -229,7 +229,7 @@
switch (widget)
{
case `delete:
- // TODO: dmraid can be deleted
+ EpDeleteDisk(disk_device);
break;
case `smart:
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org