#
ce0ca44b |
| 04-Aug-2018 |
krw <krw@openbsd.org> |
Oops. Missing chunk from previous 'secs' -> 'ui'.
|
#
914b3475 |
| 04-Aug-2018 |
krw <krw@openbsd.org> |
Rename local variable 'secs' to 'ui' to be consistant with all other uses of getuint64(). No change to executable.
|
#
94f15639 |
| 02-Aug-2018 |
krw <krw@openbsd.org> |
errno is never checked after a call to getuint64(). So there is no point to getuint64() setting it to EINVAL when the user enters an invalid value or aborts input with a ^D.
|
#
1fec2892 |
| 12-Jul-2018 |
krw <krw@openbsd.org> |
Cleanup and clarify getuint64() by using the same functions as auto-allocation. parse_sizespec() and apply_unit(). No intentional functional change.
Looked good to tb@
|
#
0f1cd5a2 |
| 12-Jul-2018 |
krw <krw@openbsd.org> |
Cleanup and clarify the has_overlap() logic so it can be read by normal people and is more efficient to boot.
The only intentional functional change was to use mergesort() instead of heapsort() so t
Cleanup and clarify the has_overlap() logic so it can be read by normal people and is more efficient to boot.
The only intentional functional change was to use mergesort() instead of heapsort() so that partitions with the same offset retain their order in the emitted verbiage.
Looked good to tb@, ok kn@
show more ...
|
#
5f6cf98a |
| 07-Jul-2018 |
krw <krw@openbsd.org> |
Add recommended error checks around the use of strtod() in parse_sizespec().
ok otto@
|
#
7ad973c1 |
| 03-Jul-2018 |
krw <krw@openbsd.org> |
Reduce display_edit() parameter list by one. Just call editor_countfree() in the function body rather than in the invocation.
ok millert@
|
#
d97c8f79 |
| 03-Jul-2018 |
krw <krw@openbsd.org> |
Nuke some leading spaces and mis-indentations that crept in over the years.
ok otto@
|
#
40b226e8 |
| 01-Jul-2018 |
krw <krw@openbsd.org> |
Rework partition offset/size rounding logic, removing it from getuint64() which struggled to know what to do. Add it to the places rounding is actually wanted by creating and using alignpartition() w
Rework partition offset/size rounding logic, removing it from getuint64() which struggled to know what to do. Add it to the places rounding is actually wanted by creating and using alignpartition() which takes parameters to determine what is rounded, to what boundaries and in what direction.
Simplifies and clarifies logic.
Various minor verbiage tweaks and shuffling of output under expert mode to improve output during alignments.
Been in snaps for a couple of weeks.
much back & forth with and ok otto@
show more ...
|
#
0db7769a |
| 27-Apr-2018 |
krw <krw@openbsd.org> |
Add getnumber() to extract simple deciaml values from the user. Doesn't handle units, '*', etc. Replace the more complex getuint64 when getting things like the number of tracks per cylinder.
ok otto@
|
#
aa3970cd |
| 27-Apr-2018 |
krw <krw@openbsd.org> |
Create and use a couple of #defines for the magic return values of getuint64 that indicate errors.
Suggested by & ok otto@
|
#
9a4afaaf |
| 26-Apr-2018 |
krw <krw@openbsd.org> |
No need for two copies of tricky user input gathering code. Just use getstring() to get the string and then parse that in getuint64().
Fix a mis-use of %lld and some whitespace while passing.
ok ot
No need for two copies of tricky user input gathering code. Just use getstring() to get the string and then parse that in getuint64().
Fix a mis-use of %lld and some whitespace while passing.
ok otto@
show more ...
|
#
f1bc1b27 |
| 26-Apr-2018 |
krw <krw@openbsd.org> |
Add some range checks to make sure we don't attempt to store values too large for the receiving fields. Change a couple of do{}while() to for(;;) for consistancy.
Tweaks & ok otto@
|
#
d4c7cce3 |
| 26-Apr-2018 |
yasuoka <yasuoka@openbsd.org> |
Fix previous. Adding "offset" to "maxval" was required.
ok otto krw
|
#
ac30837a |
| 26-Apr-2018 |
krw <krw@openbsd.org> |
Consolidate duplicate error messages, 'return' is not a function so space before '(', eliminate extraneous '{}'. Start of cleaning up user input processing.
No intentional functional change.
ok ott
Consolidate duplicate error messages, 'return' is not a function so space before '(', eliminate extraneous '{}'. Start of cleaning up user input processing.
No intentional functional change.
ok otto@ give or take a few '{}' removals.
show more ...
|
#
a4139c56 |
| 06-Apr-2018 |
krw <krw@openbsd.org> |
Round user input to cylinder boundaries more betterer.
Improve emitted verbiage while there.
tweaks & ok otto@
|
#
59c4e6f1 |
| 08-Mar-2018 |
krw <krw@openbsd.org> |
Check required partition size against the size of the largest free chunk, not the total amount of free space on the disk. Removes need for 'totsecs'.
ok otto@ as part of larger diff now completely c
Check required partition size against the size of the largest free chunk, not the total amount of free space on the disk. Removes need for 'totsecs'.
ok otto@ as part of larger diff now completely committed
show more ...
|
#
859c13c7 |
| 08-Mar-2018 |
krw <krw@openbsd.org> |
Calculate chunk size after adjusting both the chunk offset and chunk end in SUN_CYLCHECK case. Fixes potential off-by-one in calculating the number of cylinders available in a chunk.
ok otto@ as par
Calculate chunk size after adjusting both the chunk offset and chunk end in SUN_CYLCHECK case. Fixes potential off-by-one in calculating the number of cylinders available in a chunk.
ok otto@ as part of larger diff
show more ...
|
#
133ccbb1 |
| 08-Mar-2018 |
krw <krw@openbsd.org> |
Instead of a SUN_CYLCHECK block in both parts of an if/else, with a goto from one to the other, just move the logic after the if/else. One less #ifdef. Decrements total_secs in either case.
ok otto@
Instead of a SUN_CYLCHECK block in both parts of an if/else, with a goto from one to the other, just move the logic after the if/else. One less #ifdef. Decrements total_secs in either case.
ok otto@ as part of larger diff
show more ...
|
#
4f05c2dd |
| 08-Mar-2018 |
krw <krw@openbsd.org> |
Bail out of a strategy early if the sum of the minsz values exceeds the space available.
ok otto@ as part of larger diff
|
#
3c723e85 |
| 08-Mar-2018 |
krw <krw@openbsd.org> |
Bail out of a strategy early if it requires more partitions than are available.
ok otto@ as part of larger diff
|
#
598ec681 |
| 08-Mar-2018 |
krw <krw@openbsd.org> |
Simplify the strategy looping.
ok otto@ as part of larger diff
|
#
1298f28a |
| 04-Mar-2018 |
krw <krw@openbsd.org> |
Add if (D_VENDOR) check to last SUN_CYLCHECK block lacking it.
While there move local variable declaration inside the 'if' and eliminate separate SUN_CYLCHECK block containing said local variable de
Add if (D_VENDOR) check to last SUN_CYLCHECK block lacking it.
While there move local variable declaration inside the 'if' and eliminate separate SUN_CYLCHECK block containing said local variable declaration.
Add check for attempt to resize a partition to 0, and simplify logic a bit by recognizing that this means the number of sectors will always be > 0.
ok otto@
show more ...
|
#
e0befca8 |
| 02-Mar-2018 |
krw <krw@openbsd.org> |
Tweak a couple of long lines.
|
#
4aa85578 |
| 02-Mar-2018 |
krw <krw@openbsd.org> |
Always call get_cpg() after calling get_bsize(). Initialize p_cpg inside get_cpg() instead of separately, much like get_fsize() and get_bsize() work.
ok otto@
|