Author: aschnell Date: Mon Feb 9 11:34:03 2009 New Revision: 55333 URL: http://svn.opensuse.org/viewcvs/yast?rev=55333&view=rev Log: - round size during creation of partitions Modified: trunk/storage/storage/src/include/ep-hd-dialogs.ycp Modified: trunk/storage/storage/src/include/ep-hd-dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-hd-dialogs.ycp?rev=55333&r1=55332&r2=55333&view=diff ============================================================================== --- trunk/storage/storage/src/include/ep-hd-dialogs.ycp (original) +++ trunk/storage/storage/src/include/ep-hd-dialogs.ycp Mon Feb 9 11:34:03 2009 @@ -102,8 +102,11 @@ list<integer> region = data["region"]:slot; integer size_k = (region[1]:0 * cyl_size) / 1024; - integer min_size_k = tointeger(float::ceil(cyl_size / 1024.0)); - integer max_size_k = (slot[1]:0 * cyl_size) / 1024; + integer min_num_cyl = 1; + integer max_num_cyl = slot[1]:0; + + integer min_size_k = tointeger(min_num_cyl * cyl_size / 1024.0); + integer max_size_k = tointeger(max_num_cyl * cyl_size / 1024.0); symbol type = data["type"]:`unknown; symbol what = `nothing; // ;-) @@ -240,7 +243,8 @@ case `manual_size: { - integer num_cyl = size_k * 1024 / cyl_size; + integer num_cyl = tointeger(1024.0 * size_k / cyl_size + 0.5); + num_cyl = Integer::Clamp(num_cyl, min_num_cyl, max_num_cyl); data["region"] = [ slot[0]:0, num_cyl ]; break; } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org