Author: aschnell Date: Fri Nov 14 17:33:48 2008 New Revision: 53336 URL: http://svn.opensuse.org/viewcvs/yast?rev=53336&view=rev Log: - removed old code Modified: trunk/storage/storage/src/inst_custom_part.ycp Modified: trunk/storage/storage/src/inst_custom_part.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/inst_custom_p... ============================================================================== --- trunk/storage/storage/src/inst_custom_part.ycp (original) +++ trunk/storage/storage/src/inst_custom_part.ycp Fri Nov 14 17:33:48 2008 @@ -535,115 +535,4 @@ return ( pri_line + ext_line + log_line ); }; - - symbol ret = nil; - - - map<string,map> tg = Storage::GetTargetMap(); - - ret = (symbol)Wizard::UserInput(); - - - ///////////////////////////////////////////////////////////// - // RESIZE - ///////////////////////////////////////////////////////////// - if (ret == `resize) - { - string id = (string)UI::QueryWidget(`id(`table), `CurrentItem); - map part = $[]; - map disk = Storage::GetDisk( tg, id ); - if( !haskey( tg, id ) ) - part = Storage::GetPartition( tg, id ); - - if( disk["readonly"]:false ) - { - Popup::Error( Partitions::RdonlyText( disk["device"]:"", true )); - ret = `again; - } - - y2milestone( "disk=%1", disk ); - y2milestone( "RESIZE id=%1 part=%2", id, part ); - map possible = Storage::IsResizable( part ); - if( size(part)==0 || - part["used_by_type"]:`UB_NONE == `UB_LVM || - part["used_by_type"]:`UB_NONE == `UB_MD || - part["type"]:`unknown == `sw_raid || - part["type"]:`unknown == `nfs || - part["type"]:`unknown == `loop || - part["type"]:`unknown == `dm ) - { - // popup text - Popup::Message(_(" -You cannot resize a disk device, LVM volume group, LVM physical volume, -NFS mount, or MD device. -")); - } - else if( !part["format"]:false && - !possible["extend"]:false && !possible["shrink"]:false ) - { - // popup text - Popup::Message(_(" -You cannot resize the selected partition because the file system -on this partition does not support resizing. -")); - } - else if( part["type"]:`unknown == `lvm ) - { - // HandleEditLv( tg, id ); - } - else - { - map new_val = part; - if( Mode::normal() && new_val["used_fs"]:`none == `ntfs ) - { - Package::InstallAll( ["ntfsprogs"] ); - } - string dev = new_val["device"]:""; - if( new_val["ori_nr"]:0 > 0 && - new_val["ori_nr"]:0 != new_val["nr"]:0 ) - { - dev = Storage::GetDeviceName( disk["device"]:"", new_val["ori_nr"]:0 ); - } - new_val = ResizePartDlg( new_val, dev, disk, possible ); - if( new_val != nil ) - { - integer size_change = part["region",1]:0 - - new_val["region",1]:0; - y2milestone( "region old=%1 new:%2", part["region"]:[], - new_val["region"]:[] ); - y2milestone( "size_change=%1", size_change ); - tg = Storage::SetPartition( tg, new_val ); - Storage::SetTargetMap(tg); - if( size_change != 0 && - Storage::CheckNextCreated( disk, - part["region"]:[0,0] )) - { - if( size_change < 0 ) - { - // popup text - Popup::Message( _(" -You decreased the size available for Linux partitions. -Linux partition sizes have been adapted accordingly. -Check the new sizes in the partition list. -")); - Storage::AdaptResize( disk["device"]:"", - part["region"]:[0,0], - size_change ); - } - // popup text - else if( Popup::YesNo( _(" -You decreased a partition that is followed by a newly-created partition. -Should the newly-created partition be automatically increased to use the -freed disk space? -")) ) - { - Storage::AdaptResize( disk["device"]:"", - part["region"]:[0,0], - size_change ); - } - } - } - } - } - } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org