History log of /openbsd-src/sbin/disklabel/editor.c (Results 1 – 25 of 418)
Revision Date Author Comments
# 854d339c 22-Mar-2024 jan <jan@openbsd.org>

Increase /usr/src partition to 2GB - 5GB

ok miod@, deraadt@, otto@ and bluhm@


# b4709bb3 06-Sep-2023 robert <robert@openbsd.org>

explicitly cast ULLONG_MAX to double when comparing to a double

ok krw@


# 69050b3c 06-Sep-2023 jsg <jsg@openbsd.org>

remove unused variable


# 3c750429 05-Jul-2023 krw <krw@openbsd.org>

Restore (R)esize functionality to sparc64 disklabel(8).

Empty or FS_UNUSED partitions don't intrude into the OpenBSD area
of a disk and therefore should not disable partition resizing.

Encountered

Restore (R)esize functionality to sparc64 disklabel(8).

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@

show more ...


# bb12209f 03-Jul-2023 krw <krw@openbsd.org>

The only thing worse than treating 'return' as a function call is
randomly mixing 'return (blah)' and 'return blah' idioms.

Nuke the '()'s. No intentional functional change.


# 775a2993 29-Jun-2023 krw <krw@openbsd.org>

Fix handling of 'N-* 100' template entries.

'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@


# 756bef51 28-Jun-2023 krw <krw@openbsd.org>

Refactor editor_allocspace() into easier to follow pieces.

editor_allocspace() interates over alloc_tables calling
allocate_space(). allocate_space() iterates over
space_allocations calling allocat

Refactor editor_allocspace() into easier to follow pieces.

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@

show more ...


# e46ff49b 21-Jun-2023 krw <krw@openbsd.org>

Add a parameter 'action' to mpfree() so it can optionally discard
or keep the memory pointed at by the char ** parameter.

Allows mpfree() to be used against the global mountpoints[] and
eliminates a

Add a parameter 'action' to mpfree() so it can optionally discard
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.

show more ...


# b7cc13de 19-Jun-2023 krw <krw@openbsd.org>

Replace eclectic mix of errx(4, "out of memory"), err(4, NULL)
and err(1, NULL) with consistent err(1, NULL) when responding to
out of memory conditions.


# b46f7512 18-Jun-2023 krw <krw@openbsd.org>

Add and use CHUNKSZ() to replace 'chunk->stop - chunk->start'
occurrances.

Shorter lines, more obvious intent.


# 583b3ed6 18-Jun-2023 krw <krw@openbsd.org>

Use UINT64_MAX instead of -1 to set a uint64_t value to
its maximum.


# 728b9255 23-May-2023 krw <krw@openbsd.org>

With the retirement of expert mode, get_fsize(), get_bsize() and
get_cpt() simply set a partition's p_fragblock/p_cpg to default
values. Replace them with a single function set_fragblock().

No funct

With the retirement of expert mode, get_fsize(), get_bsize() and
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.

show more ...


# 4ef23dae 20-May-2023 krw <krw@openbsd.org>

p_fragblock = DISKLABELV1_FFS_FRAGBLOCK(0, 0) sets p_fragblock to
0. Just use p_fragblock = 0 as in all other initializations of
p_fragblock.

No functional change.


# 1cc333d2 13-May-2023 krw <krw@openbsd.org>

In the absence of the 'disktype' command line parameter always
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 treat

In the absence of the 'disktype' command line parameter always
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.

show more ...


# 953cd4ef 27-Apr-2023 krw <krw@openbsd.org>

Retire -E's "expert" mode. Introduced 23 years ago to avoid
confusing users with FFS attributes that only experts should
fiddle with. Actual use has withered away with functionality
rendered moot or

Retire -E's "expert" mode. Introduced 23 years ago to avoid
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@

show more ...


# e1ee966a 18-Feb-2023 miod <miod@openbsd.org>

Fix possibly uninitialized variable in editor_allocspace(); ok krw@


# bc9d58e0 07-Feb-2023 krw <krw@openbsd.org>

Extend template parsing to allow "[mount point] *" as the specification for
putting the maximum available free space into a partition.

Extend command line parsing to allow 'T-' as the specification

Extend template parsing to allow "[mount point] *" as the specification for
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@

show more ...


# 114ca9f3 02-Feb-2023 krw <krw@openbsd.org>

Tweak restored code chunk to eliminate duplicate checks.


# 8b96670a 02-Feb-2023 krw <krw@openbsd.org>

Restore incorrectly deleted test for default partitions intruding
into the OpenBSD area that is about to be auto-allocated.

Fixes resizing partitions on an auto-allocated disk that had a
boot partit

Restore incorrectly deleted test for default partitions intruding
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@

show more ...


# 6715505f 28-Jan-2023 krw <krw@openbsd.org>

Nuke unused variable.


# 81f2740f 25-Jan-2023 krw <krw@openbsd.org>

Use getpartno() in editor_delete(), enhancing getpartno() to
allow '*' to select all partitions when the action is 'delete'.

No intentional functional change.


# 96b465e9 24-Jan-2023 krw <krw@openbsd.org>

Use getpartno() in editor_add(), enhancing getpartno() to find
the default partition and allow selection of partitions up to
MAXPARTITION.

No intentional functional change.


# 715dd5c0 22-Jan-2023 krw <krw@openbsd.org>

Fix incorrect comparison. Restores ability to edit 'p'.


# 78ff4c86 21-Jan-2023 krw <krw@openbsd.org>

editor_resize(), editor_change(), editor_modify() and
editor_name() use identical logic to choose a partition to act
on, with some minor verbiage differences.

Extract getpartno() to contain/tighten

editor_resize(), editor_change(), editor_modify() and
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.

show more ...


# 41d86e10 20-Jan-2023 krw <krw@openbsd.org>

editor_name() and get_mp() don't change the disklabel so
const'ify some parameters and local variables.


12345678910>>...17