Author: aschnell Date: Tue Jan 5 16:02:38 2010 New Revision: 60232 URL: http://svn.opensuse.org/viewcvs/yast?rev=60232&view=rev Log: - removed obsolete bsd_label parameter Modified: trunk/storage/storage/src/include/custom_part_check_generated.ycp trunk/storage/storage/src/include/custom_part_dialogs.ycp trunk/storage/storage/src/include/ep-hd-lib.ycp trunk/storage/storage/src/include/ep-lib.ycp Modified: trunk/storage/storage/src/include/custom_part_check_generated.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/custo... ============================================================================== --- trunk/storage/storage/src/include/custom_part_check_generated.ycp (original) +++ trunk/storage/storage/src/include/custom_part_check_generated.ycp Tue Jan 5 16:02:38 2010 @@ -486,7 +486,7 @@ } -define symbol check_devices_used( list<map> partitions, boolean not_cr ) +symbol check_devices_used(list<map> partitions, boolean not_cr) { symbol ret = `UB_NONE; list<map> pl = filter( map p, partitions, @@ -519,21 +519,8 @@ } - -define boolean check_device_edit( map curr_part, boolean bsd_label ) - ``{ - /////////////////////////////////////////////////////// - // with a BSD-Disklabel partition 3 is always an additional entry - // which describes the disk and should not be edited - - if( bsd_label && curr_part["type"]:`unknown==`primary && - curr_part["nr"]:0==3 ) - { - // popup text - Popup::Message(_("Partition 3 "Entire Disk" is not changeable")); - return false; - } - +boolean check_device_edit(map curr_part) + { symbol used = check_devices_used( [ curr_part ], false ); if( used == `UB_MD) @@ -564,25 +551,10 @@ return( ret ); } -define boolean check_device_delete( map curr_part, boolean bsd_label, - boolean installation, map disk ) - ``{ - string part_name = curr_part["device"]:""; - - if( bsd_label ) - { - /////////////////////////////////////////////////////// - // with BSD-Disklabel partition 3 is always an additionl entry, - // which describes the disk and should not be edited - if( bsd_label && curr_part["type"]:`unknown==`primary && - curr_part["nr"]:0==3 ) - { - // popup text - Popup::Message(_("Partition 3 "Entire Disk" is not changeable")); - return false; - } - } +boolean check_device_delete(map curr_part, boolean installation, map disk) + { + string part_name = curr_part["device"]:""; symbol used = check_devices_used( [ curr_part ], false ); @@ -689,11 +661,11 @@ if( ret ) ret = Storage::CanDelete( curr_part, disk, true ); return ret; - }; + } -define boolean check_extended_delete( map curr_disk, boolean installation ) - ``{ +boolean check_extended_delete( map curr_disk, boolean installation ) + { ///////////////////////////////////////////////// // filter delete partitions list<map> partitions = curr_disk["partitions"]:[]; @@ -789,5 +761,5 @@ ret = Storage::CanDelete( extd, curr_disk, true ); } return( ret ); - }; + } } Modified: trunk/storage/storage/src/include/custom_part_dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/custo... ============================================================================== --- trunk/storage/storage/src/include/custom_part_dialogs.ycp (original) +++ trunk/storage/storage/src/include/custom_part_dialogs.ycp Tue Jan 5 16:02:38 2010 @@ -1407,9 +1407,8 @@ * Check if at least on partition is mounted. * @return map targetMap */ -define boolean deleteAllDevPartitions( map<string, any> disk, - boolean installation, boolean bsd_label ) - ``{ +boolean deleteAllDevPartitions(map<string, any> disk, boolean installation) + { boolean go_on = true; string del_dev = disk["device"]:""; y2milestone( "deleteAllDevPartitions disk:%1", remove( disk, "partitions" )); @@ -1505,6 +1504,6 @@ } y2milestone( "deleteAllDevPartitions ret:%1", go_on ); return(go_on); - }; + } } Modified: trunk/storage/storage/src/include/ep-hd-lib.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-hd... ============================================================================== --- trunk/storage/storage/src/include/ep-hd-lib.ycp (original) +++ trunk/storage/storage/src/include/ep-hd-lib.ycp Tue Jan 5 16:02:38 2010 @@ -96,7 +96,7 @@ // popup text if (Popup::YesNo(sformat(_("Really delete BIOS RAID %1?"), device))) { - if (deleteAllDevPartitions(disk, Stage::initial(), false)) + if (deleteAllDevPartitions(disk, Stage::initial())) Storage::DeleteDmraid(device); UpdateMainStatus(); @@ -120,7 +120,7 @@ else { - if ( ConfirmPartitionsDelete( device, pnames) && deleteAllDevPartitions(disk, Stage::initial(), false)) + if (ConfirmPartitionsDelete(device, pnames) && deleteAllDevPartitions(disk, Stage::initial())) { UpdateMainStatus(); UpdateNavigationTree(`hd); Modified: trunk/storage/storage/src/include/ep-lib.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-li... ============================================================================== --- trunk/storage/storage/src/include/ep-lib.ycp (original) +++ trunk/storage/storage/src/include/ep-lib.ycp Tue Jan 5 16:02:38 2010 @@ -180,7 +180,7 @@ { if( Popup::YesNo( sformat(_("Really delete BIOS RAID %1?"), id ))) { - if( deleteAllDevPartitions( disk, Stage::initial(), false )) + if (deleteAllDevPartitions(disk, Stage::initial())) Storage::DeleteDmraid( id ); return true; } @@ -188,13 +188,13 @@ // YesNo popup text %1 is replaced by a disk name e.g. /dev/hda else if( Popup::YesNo( sformat(_("Really delete all partitions on %1?"), id ))) { - deleteAllDevPartitions( disk, Stage::initial(), false ); + deleteAllDevPartitions(disk, Stage::initial()); return true; } } else if( part["type"]:`unknown==`lvm ) { - if( !check_device_delete( part, false, Stage::initial(), $[] )) + if (!check_device_delete(part, Stage::initial(), $[])) { return false; } @@ -241,8 +241,7 @@ return false; } - if (!check_device_delete( part, false, Stage::initial(), - disk )) + if (!check_device_delete(part, Stage::initial(), disk)) return false; } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org