Author: aschnell
Date: Thu Jul 10 15:31:32 2008
New Revision: 48964
URL: http://svn.opensuse.org/viewcvs/yast?rev=48964&view=rev
Log:
- added checks
Modified:
branches/tmp/aschnell/part-redesign/storage/src/include/ep-dm-lib.ycp
branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd-lib.ycp
branches/tmp/aschnell/part-redesign/storage/src/include/ep-raid-lib.ycp
Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-dm-lib.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/include/ep-dm-lib.ycp?rev=48964&r1=48963&r2=48964&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/include/ep-dm-lib.ycp (original)
+++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-dm-lib.ycp Thu Jul 10 15:31:32 2008
@@ -19,6 +19,13 @@
map target_map = Storage::GetTargetMap();
map data = Storage::GetPartition(target_map, device);
+ if (data["used_by"]:"" != "")
+ {
+ Error(sformat(_("The DM %1 is in use. It cannot be
+edited. To edit %1, make sure it is not used."), device));
+ return;
+ }
+
if (DlgEditDmVolume(data))
{
Storage::ChangeVolumeProperties(data);
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=48964&r1=48963&r2=48964&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 Thu Jul 10 15:31:32 2008
@@ -156,6 +156,13 @@
map target_map = Storage::GetTargetMap();
map data = Storage::GetPartition(target_map, device);
+ if (data["used_by"]:"" != "")
+ {
+ Error(sformat(_("The partition %1 is in use. It cannot be
+edited. To edit %1, make sure it is not used."), device));
+ return;
+ }
+
if (DlgEditPartition(data))
{
Storage::ChangeVolumeProperties(data);
@@ -174,6 +181,16 @@
return;
}
+ map target_map = Storage::GetTargetMap();
+ map data = Storage::GetPartition(target_map, device);
+
+ if (data["used_by"]:"" != "")
+ {
+ Error(sformat(_("The partition %1 is in use. It cannot be
+resized. To resize %1, make sure it is not used."), device));
+ return;
+ }
+
DlgResizePartition(device);
}
Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-raid-lib.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/include/ep-raid-lib.ycp?rev=48964&r1=48963&r2=48964&view=diff
==============================================================================
--- branches/tmp/aschnell/part-redesign/storage/src/include/ep-raid-lib.ycp (original)
+++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-raid-lib.ycp Thu Jul 10 15:31:32 2008
@@ -34,6 +34,13 @@
map target_map = Storage::GetTargetMap();
map data = Storage::GetPartition(target_map, device);
+ if (data["used_by"]:"" != "")
+ {
+ Error(sformat(_("The RAID %1 is in use. It cannot be
+edited. To edit %1, make sure it is not used."), device));
+ return;
+ }
+
if (DlgEditRaid(data))
{
Storage::ChangeVolumeProperties(data);
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org