Author: aschnell
Date: Fri Jul 11 23:31:20 2008
New Revision: 49013
URL: http://svn.opensuse.org/viewcvs/yast?rev=49013&view=rev
Log:
- dasdfmt
Modified:
branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd-lib.ycp
branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd.ycp
Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd-lib.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd-lib.ycp?rev=49013&r1=49012&r2=49013&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd-lib.ycp (original)
+++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd-lib.ycp Fri Jul 11 23:31:20 2008
@@ -214,4 +214,38 @@
TreePanel::Create();
}
}
+
+
+ void EpDasdfmtDisk(string device)
+ {
+ map target_map = Storage::GetTargetMap();
+
+ map disk = target_map[device]:$[];
+
+ if (!disk["dasdfmt"]:false)
+ {
+ // popup text %1 is replaced by a dasd name e.g. /dev/dasda
+ boolean doit = Popup::YesNo(sformat(
+_("Running dasdfmt deletes all data on the disk.
+Really execute dasdfmt on disk %1?
+"), device));
+
+ if (doit)
+ {
+ Storage::InitializeDisk(device, true);
+ }
+ }
+ else
+ {
+ Popup::Message(_("The disk is no longer marked for dasdfmt.
+
+Partitions currently present on this disk are again
+displayed.
+"));
+ Storage::InitializeDisk(device, false);
+ }
+
+ UpdateNavigationTree(nil);
+ TreePanel::Create();
+ }
}
Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd.ycp?rev=49013&r1=49012&r2=49013&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd.ycp (original)
+++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd.ycp Fri Jul 11 23:31:20 2008
@@ -245,7 +245,7 @@
_("Create New Partition Table"))
];
- if (Arch::s390())
+ if (Arch::s390() && search(device, "/dev/dasd") == 0)
{
expert_cmds = add(expert_cmds,
`item(`id(`dasdfmt),
@@ -298,7 +298,7 @@
break;
case `dasdfmt:
- // TODO
+ EpDasdfmtDisk(disk_device);
break;
}
}
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org