[yast-commit] r51474 - /trunk/storage/storage/src/include/ep-dialogs.ycp
Author: kmachalkova
Date: Wed Sep 24 16:25:28 2008
New Revision: 51474
URL: http://svn.opensuse.org/viewcvs/yast?rev=51474&view=rev
Log:
This is utterly broken but let's make at least few
things work:
1) Propose to format newly created partition
2) Set correct filesystem ID (fsid) for partition
Modified:
trunk/storage/storage/src/include/ep-dialogs.ycp
Modified: trunk/storage/storage/src/include/ep-dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-dialogs.ycp?rev=51474&r1=51473&r2=51474&view=diff
==============================================================================
--- trunk/storage/storage/src/include/ep-dialogs.ycp (original)
+++ trunk/storage/storage/src/include/ep-dialogs.ycp Wed Sep 24 16:25:28 2008
@@ -33,27 +33,48 @@
string mount = data["mount"]:"";
boolean do_mount = mount != "";
+ /* MiniWorkflowStepPartitionSize data:
+ $["create":true,
+ "cyl_size":8225280,
+ "device":"/dev/sda1",
+ "disk_device":"/dev/sda",
+ "new":true,
+ "slots":$[`primary:[1, 65]],
+ "type":`primary]
+ */
+
+ //Supply some reasonable defaults for newly created partitions
+ //and mark it for formatting, too
if (data["new"]:false && !data["formatmount_proposed"]:false)
{
data["formatmount_proposed"] = true;
+ //propose new mountpoint and filesystem
string mount_point_proposal = GetMountPointProposal(Storage::GetTargetMap(), []);
-
symbol used_fs = Partitions::DefaultFs();
+
+ //special case for boot partition
if (mount_point_proposal == Partitions::BootMount())
used_fs = Partitions::DefaultBootFs();
- // TODO
data["format"] = true;
data["fsid"] = Partitions::fsid_native;
+ data["used_fs"] = used_fs;
+
+ //set globals
+ do_format = true;
mount = mount_point_proposal;
do_mount = mount != "";
- data["used_fs"] = used_fs;
}
+
term tmp1 = `Empty();
if (contains([`primary, `extended, `logical], data["type"]:`none))
- tmp1 = `VBox(`id(`do_not_format_attachment), FsidComboBox(data, FileSystems::GetAllFileSystems(true, true)));
+ {
+ tmp1 = `VBox(`id(`do_not_format_attachment),
+ FsidComboBox(data, FileSystems::GetAllFileSystems(true, true))
+ );
+ }
list mountpoints = nil;
if (mountpoints == nil)
@@ -121,14 +142,27 @@
switch (widget)
{
case `fs:
+ {
+ //retrieve all filesystems
+ map
participants (1)
-
kmachalkova@svn.opensuse.org