[yast-commit] r59576 - /trunk/storage/storage/src/include/custom_part_lib.ycp
Author: aschnell Date: Tue Nov 17 10:30:47 2009 New Revision: 59576 URL: http://svn.opensuse.org/viewcvs/yast?rev=59576&view=rev Log: - disallow /lib64 and /sys as mount points - some cleanup Modified: trunk/storage/storage/src/include/custom_part_lib.ycp Modified: trunk/storage/storage/src/include/custom_part_lib.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/custom_part_lib.ycp?rev=59576&r1=59575&r2=59576&view=diff ============================================================================== --- trunk/storage/storage/src/include/custom_part_lib.ycp (original) +++ trunk/storage/storage/src/include/custom_part_lib.ycp Tue Nov 17 10:30:47 2009 @@ -193,19 +193,18 @@ * @param mount mount point * @return boolean */ -define boolean check_lvm_mount_points( string mount ) - ``{ - list not_allowed_lvm_mount_points = [ Partitions::BootMount() ]; - y2milestone( " check lvm mount"); - if( contains( not_allowed_lvm_mount_points, mount )) + boolean check_lvm_mount_points(string mount) + { + list<string> not_allowed_lvm_mount_points = [ Partitions::BootMount() ]; + y2milestone("check lvm mount"); + if (contains(not_allowed_lvm_mount_points, mount)) { - // error popup text - Popup::Error(sformat(_("You cannot use the mount point \"%1\" for LVM.\n"), Partitions::BootMount())); - + // error popup text + Popup::Error(sformat(_("You cannot use the mount point \"%1\" for LVM.\n"), Partitions::BootMount())); return false; } - return true; - }; + return true; + } /** @@ -213,25 +212,22 @@ * @param mount mount point * @return boolean **/ -define boolean check_raid_mount_points( string mount ) - ``{ - list not_allowed_raid_mount_points = [ ]; - if( Arch::ppc () || Arch::s390 () || Arch::sparc () ) - { - not_allowed_raid_mount_points = - add( not_allowed_raid_mount_points, Partitions::BootMount() ); - } - y2milestone( " check raid mount"); - if( contains( not_allowed_raid_mount_points, mount )) + boolean check_raid_mount_points(string mount) + { + list<string> not_allowed_raid_mount_points = []; + if (Arch::ppc() || Arch::s390()) + { + not_allowed_raid_mount_points = add(not_allowed_raid_mount_points, Partitions::BootMount()); + } + y2milestone("check raid mount"); + if (contains( not_allowed_raid_mount_points, mount)) { - // error popup text + // error popup text Popup::Error(sformat(_("You cannot use the mount point %1 for RAID."), Partitions::BootMount())); - return false; } return true; - }; - + } /** @@ -335,19 +331,19 @@ * @param mount mount point * @return boolean **/ -define boolean check_mount_point( map<string,map> targetMap, string dev, - map part ) -{ + boolean check_mount_point(map<string,map> targetMap, string dev, map part) + { string mount = part["mount"]:""; symbol used_fs = part["used_fs"]:`unknown; y2milestone( "check_mount_point part:%1", part ); boolean allowed = true; - list not_allowed_system_mount_points = - [ "/proc", "/dev", "/mnt", "/var/adm/mnt", "/lost+found", "/lib", - "/bin", "/etc", "/sbin" ]; - if (mount == "") + list<string> not_allowed_system_mount_points = [ "/proc", "/sys", + "/dev", "/mnt", "/var/adm/mnt", "/lost+found", "/lib", "/lib64", + "/bin", "/etc", "/sbin" ]; + + if (isempty(mount)) { Popup::Error(_("Mount point must not be empty.")); allowed = false; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
aschnell@svn.opensuse.org