Author: fehr Date: Tue Jan 15 15:44:08 2008 New Revision: 43619 URL: http://svn.opensuse.org/viewcvs/yast?rev=43619&view=rev Log: adapt size restrictions of disk label to parted (#352484) Modified: branches/SuSE-SLE-10-SP1-Branch/storage/package/yast2-storage.changes branches/SuSE-SLE-10-SP1-Branch/storage/storage/src/include/do_proposal_flexible.ycp branches/SuSE-SLE-10-SP1-Branch/storage/storage/src/inst_custom_part.ycp branches/SuSE-SLE-10-SP1-Branch/storage/storage/src/modules/Storage.ycp Modified: branches/SuSE-SLE-10-SP1-Branch/storage/package/yast2-storage.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP1-Branch/storage/package/yast2-storage.changes?rev=43619&r1=43618&r2=43619&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP1-Branch/storage/package/yast2-storage.changes (original) +++ branches/SuSE-SLE-10-SP1-Branch/storage/package/yast2-storage.changes Tue Jan 15 15:44:08 2008 @@ -1,8 +1,13 @@ ------------------------------------------------------------------- +Tue Jan 15 15:41:36 CET 2008 - fehr@suse.de + +- adapt size restrictions of disk label to parted (#352484) +- version 2.13.96 + +------------------------------------------------------------------- Mon Jan 14 15:46:38 CET 2008 - fehr@suse.de - backport NFS support for SLES10 SP2 (feature #300779) -- version 2.13.96 ------------------------------------------------------------------- Thu Oct 25 17:55:57 CEST 2007 - fehr@suse.de Modified: branches/SuSE-SLE-10-SP1-Branch/storage/storage/src/include/do_proposal_flexible.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP1-Branch/storage/storage/src/include/do_proposal_flexible.ycp?rev=43619&r1=43618&r2=43619&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP1-Branch/storage/storage/src/include/do_proposal_flexible.ycp (original) +++ branches/SuSE-SLE-10-SP1-Branch/storage/storage/src/include/do_proposal_flexible.ycp Tue Jan 15 15:44:08 2008 @@ -1703,7 +1703,7 @@ list<integer> exist_pnr = sort( maplist( map e, plist, ``(e["nr"]:0) )); integer max_prim = Partitions::MaxPrimary(disk["label"]:"msdos"); boolean has_ext = Partitions::HasExtended( disk["label"]:"msdos" ); - integer max_pos_cyl = Storage::MaxCylLabel( disk ); + integer max_pos_cyl = Storage::MaxCylLabel( disk, 0 ); integer end = 0; if( has_ext ) { @@ -1714,8 +1714,8 @@ if( size(ext)>0 ) { end = ext["region",0]:0 + ext["region",1]:1-1; - if( end > max_pos_cyl ) - end = max_pos_cyl; + if( end > ext["region",0]:0 + max_pos_cyl ) + end = ext["region",0]:0 + max_pos_cyl; gap = get_gaps( ext["region",0]:0, end, filter( map p, plist, ``(p["nr"]:0>max_prim)), add_exist_linux ); @@ -1735,7 +1735,6 @@ if( end > max_pos_cyl ) end = max_pos_cyl; gap = (list<map>)union( gap, get_gaps( 0, end, plist, add_exist_linux )); - gap = filter( map g, gap, ``(g["end"]:0<=max_pos_cyl) ); integer av_size = 0; gap = maplist( map e, gap, ``{ Modified: branches/SuSE-SLE-10-SP1-Branch/storage/storage/src/inst_custom_part.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP1-Branch/storage/storage/src/inst_custom_part.ycp?rev=43619&r1=43618&r2=43619&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP1-Branch/storage/storage/src/inst_custom_part.ycp (original) +++ branches/SuSE-SLE-10-SP1-Branch/storage/storage/src/inst_custom_part.ycp Tue Jan 15 15:44:08 2008 @@ -1251,7 +1251,7 @@ { ////////////////////// STEP D ///////////////////// - integer max_cyl = Storage::MaxCylLabel(disk); + integer max_cyl = Storage::MaxCylLabel(disk,int_start_cyl); int_end_cyl = int_start_cyl + ToEndRegion( str_start_cyl, str_end_part, cyl_size ) - 1; Modified: branches/SuSE-SLE-10-SP1-Branch/storage/storage/src/modules/Storage.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP1-Branch/storage/storage/src/modules/Storage.ycp?rev=43619&r1=43618&r2=43619&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP1-Branch/storage/storage/src/modules/Storage.ycp (original) +++ branches/SuSE-SLE-10-SP1-Branch/storage/storage/src/modules/Storage.ycp Tue Jan 15 15:44:08 2008 @@ -2170,11 +2170,11 @@ integer ret = 0; string tmp = disk["label"]:""; ret = LibStorage::StorageInterface::maxSizeLabelK( sint, tmp ); - y2milestone( "MaxSizeLabel %1 is %2", disk["label"]:"", ret ); + y2milestone( "MaxSizeLabelK %1 is %2", disk["label"]:"", ret ); return( ret ); } -global integer MaxCylLabel( map disk ) +global integer MaxCylLabel( map disk, integer start_cyl ) { integer ret = MaxSizeLabelK(disk); y2milestone( "MaxCylLabel val_k:%1 cyl_size:%2", ret, disk["cyl_size"]:1 ); @@ -2183,6 +2183,8 @@ cylk2 = 2; y2milestone( "MaxCylLabel val_k:%1 cylk2:%2", ret, cylk2 ); ret = ret*2 / cylk2 - 1; + ret = ret + start_cyl; + y2milestone( "MaxCylLabel ret:%1", ret ); return( ret ); } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org