Age | Commit message (Collapse) | Author |
|
ok miod@, deraadt@, otto@ and bluhm@
|
|
ok krw@
|
|
|
|
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@
|
|
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.
|
|
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@
|
|
|
|
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.
|
|
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.
|
|
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.
|
|
allocation of RAID partitions.
Make both 'raid' and 'swap' keywords case insensitive.
Suggested by kn@
ok kn@ miod@
|
|
No need to set them or check that they are set.
ok otto@ as part of larger diff
|
|
anything. Allowing modifications to it or displaying whatever
geometry was in use when the label was created leads to needless
inconsistency with the kernel and with the values displayed by,
e.g., fdisk(8).
Always set label fields d_secsize, d_nsectors, d_ntracks,
d_secpercyl, d_ncylinders to the current values used by the
kernel, obtained via DIOCGPDINFO. Ignore any values from the
on-disk label or the file -R uses.
Nuke editor command 'g' and restrict editor command 'e' to
changing d_type and d_packname.
|
|
OK bluhm, otto, deraadt
|
|
|
|
cannot be accommodated. "not enough space" should be enough for
anyone.
Requested by deraadt@
|
|
From Mikhail <mp39590@gmail.com>
|