Age | Commit message (Collapse) | Author |
|
ok miod@, deraadt@, otto@ and bluhm@
|
|
ok krw@
|
|
|
|
Tweaks and ok jmc@
|
|
Empty or FS_UNUSED partitions don't intrude into the OpenBSD area
of a disk and therefore should not disable partition resizing.
Encountered by claudio@
|
|
Fixes segfault in -e if you happen to delete everything after
a partition line's ":".
|
|
|
|
randomly mixing 'return (blah)' and 'return blah' idioms.
Nuke the '()'s. No intentional functional change.
|
|
'N-* 100' means a max of all 'extra' disk space not all disk
space.
Fixes templates with partitions after a 'N-* 100' entry.
Reported by anton@
|
|
editor_allocspace() interates over alloc_tables calling
allocate_space(). allocate_space() iterates over
space_allocations calling allocate_partition().
allocate_partition() calls allocate_diskchunk() which finds disk
space for the partition.
No intentional functional change.
ok otto@
|
|
or keep the memory pointed at by the char ** parameter.
Allows mpfree() to be used against the global mountpoints[] and
eliminates a couple of manual loops to free the current contents
of mountpoints[].
No intentional functional change.
|
|
and err(1, NULL) with consistent err(1, NULL) when responding to
out of memory conditions.
|
|
occurrances.
Shorter lines, more obvious intent.
|
|
its maximum.
|
|
get_cpt() simply set a partition's p_fragblock/p_cpg to default
values. Replace them with a single function set_fragblock().
No functional change.
|
|
0. Just use p_fragblock = 0 as in all other initializations of
p_fragblock.
No functional change.
|
|
use the d_type value provided by the kernel when creating,
editing or printing a disklabel.
i.e. treat d_type as disk geometry is treated, reflecting
current reality as opposed to historical data.
|
|
literal '0's.
No functional change.
|
|
confusing users with FFS attributes that only experts should
fiddle with. Actual use has withered away with functionality
rendered moot or moved elsewhere.
'-e' remains for the truly obscure corner cases.
Simply excise the code for now to see if hidden users/uses are
exposed. Further simplifications are possible if no such
users/uses surface.
ok with sthen@ millert@ kn@ otto@
|
|
"EXAMPLES" sections. Build tables with 'Bd -column' instead of
tabs inside 'Bl -literal'. Columns now line up (more or less) in
text, .pdf and .html versions.
Prompted by kn@, feedback & suggestions from jmc@ and schwarze@.
|
|
|
|
putting the maximum available free space into a partition.
Extend command line parsing to allow 'T-' as the specification to
read the template file from stdin.
Prompted by, feedback, testing and ok kn@
|
|
|
|
into the OpenBSD area that is about to be auto-allocated.
Fixes resizing partitions on an auto-allocated disk that had a
boot partition.
Found by dv@
|
|
|
|
allow '*' to select all partitions when the action is 'delete'.
No intentional functional change.
|
|
the default partition and allow selection of partitions up to
MAXPARTITION.
No intentional functional change.
|
|
|
|
editor_name() use identical logic to choose a partition to act
on, with some minor verbiage differences.
Extract getpartno() to contain/tighten this logic and shrink the
editor_* functions by using it.
No intentional functional change but for verbiage tweaks.
|
|
const'ify some parameters and local variables.
|
|
|
|
|
|
|
|
|
|
of free space, when checking for sufficient space to add a
partition. As a side-benefit the list of free chunks only needs
to be built once.
|
|
and assignment to RAW_PART + 1.
|
|
Don't stop counting free partitions just because a spoofed
partition is encountered.
Always check for (end - start) underflow after rounding
start/end to cylinder boundaries.
|
|
ok krw@
|
|
modify chunks outside of free_chunks(). Adjust local variables taking
the return value as needed.
No intentional functional change.
|
|
not altered. And 'const struct partition *' for pointers into
newly const disklabels.
No intentional functional change.
|
|
the pointer instead.
No intentional functional change.
|
|
free_chunks() with a parameter that names the partition to treat
as FS_UNUSED when building the list of free space chunks. With -1
indicating that no partition should be ignored.
Simplifies code and enables further simplifications and a raft
of const'ifications.
No intentional functional change. Regress still happy.
SUN_CYLCHECK, SUN_AAT0 and D_VENDOR still happy.
|
|
variable 'j' in editor_allocspace().
No intentional functional change. Regress still happy.
|
|
chunks in the 'r' editor command. Just add up chunks as they are
displayed. Eliminates pointless second invocation of
free_chunks().
Increment the chunk pointer rather than using iteration
variable + indexing.
No intentional functional change.
|
|
getopt(3) returns '?' when it encounters a flag not present in the in
the optstring or if a flag is missing its option argument. We can
handle this case with the "default" failure case with no loss of
legibility. Hence, remove all the redundant "case '?':" lines.
Prompted by dlg@. With help from dlg@ and millert@.
Link: https://marc.info/?l=openbsd-tech&m=167011979726449&w=2
ok naddy@ millert@ dlg@
|
|
need to keep checking for these device names.
|
|
|
|
|
|
|
|
D_VENDOR lives in d_flags, not d_secpercyl.
Makes resizing a partition more likely to respect cylinder rounding
on sparc64.
|