History log of /openbsd-src/sbin/disklabel/extern.h (Results 1 – 25 of 36)
Revision Date Author Comments
# 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 ...


# 43ba7787 04-Jan-2023 krw <krw@openbsd.org>

Use 'const struct disklabel *' parameters where the disklabel is
not altered. And 'const struct partition *' for pointers into
newly const disklabels.

No intentional functional change.


# 7831279e 18-Feb-2022 krw <krw@openbsd.org>

Move prototypes for checklabel(), readlabel() and parselabel()
into disklabel.c since editor.c and dkcksum.c have no need to
know.


# da3a6591 18-Feb-2022 krw <krw@openbsd.org>

No need for makebootarea() prototype as makebootarea() perished with NUMBOOT in
2015 (r1.211).


# 864c4485 31-Mar-2019 krw <krw@openbsd.org>

Enhance prompt shown during -E label editing. Always
display the disk device whose label is being
edited. Change '>' to '#' when in expert mode.


# 8e58de64 03-Jul-2018 krw <krw@openbsd.org>

No need for print_unit to be a global.

ok otto@


# 185664b4 29-Sep-2017 otto <otto@openbsd.org>

don't be silent on auto-allocation failure in write mode. ok millert@ krw@


# 4bf1fc9d 04-Mar-2017 otto <otto@openbsd.org>

Allow R (resize auto-partition) after A as well as when started with -A.
This ability was lost in editor.c 1.264; noted by ajacoutot@; ok krw@


# ed5b94b5 19-Jun-2016 tb <tb@openbsd.org>

Split readlabel() into two functions, readlabel() and parselabel(), and
pledge in-between the two funtion calls. The new readlabel() only does
a DIOC*DINFO ioctl, making sure the fd points to a disk

Split readlabel() into two functions, readlabel() and parselabel(), and
pledge in-between the two funtion calls. The new readlabel() only does
a DIOC*DINFO ioctl, making sure the fd points to a disk, while
parselabel() does the scary string manipulations. In the makelabel()
code path do an early DIOCGDINFO before pledge. This fixes yet another
pledge problem (disklabel -w /dev/tty floppy576).

Some of this was discussed with beck.

ok semarie, earlier version ok deraadt

show more ...


# 40bba581 17-Oct-2015 krw <krw@openbsd.org>

NUMBOOT is dead! Nuke the variables and abstractions that were used
to build boot blocks.

ok miod@


# a2c1f847 29-Apr-2015 henning <henning@openbsd.org>

support passing a template file for the auto-allocation to disklabel.
template gives mountpoints, min-max size ranges and percentage of disk
foremost intended for autoinstalls, installer bits to foll

support passing a template file for the auto-allocation to disklabel.
template gives mountpoints, min-max size ranges and percentage of disk
foremost intended for autoinstalls, installer bits to follow soon.
with input from many, ok theo

show more ...


# 5118a4ec 10-Jul-2014 florian <florian@openbsd.org>

Forward declarations for mpcopy & mpfree.
OK miod@, deraadt@


# 930241e9 13-Jul-2012 krw <krw@openbsd.org>

Replace a '512' with DEV_BSIZE. Calculate physmem size in blocks and
not sectors, since the values being tested/manipulated in the auto_alloc
tables are blocks at that point. Use MEG(256) instead of

Replace a '512' with DEV_BSIZE. Calculate physmem size in blocks and
not sectors, since the values being tested/manipulated in the auto_alloc
tables are blocks at that point. Use MEG(256) instead of hand
expanding it when testing physmem.

show more ...


# 7f5b2a5b 16-Jan-2012 krw <krw@openbsd.org>

Nuke unused parameter (f) to makebootarea(). Unused since r1.123
(2008), when '-r' support was removed. Spotted by jsg@ with the
assistance of clang.


# d6d80bb0 16-Apr-2011 krw <krw@openbsd.org>

Add '-F'. Same as '-f' but uses DUIDs when writing the mount point
information to the specified file. After every label write, read the
label to get current UID info.

Some internal code cleanup with

Add '-F'. Same as '-f' but uses DUIDs when writing the mount point
information to the specified file. After every label write, read the
label to get current UID info.

Some internal code cleanup with no intended functional change.

ok deraadt@

show more ...


# 69a6ffbc 24-Nov-2010 jsing <jsing@openbsd.org>

When dealing with disklabel UIDs (DUIDs) be specific and consistent with
naming.

ok krw@


# f6ad9e2d 23-Sep-2010 jsing <jsing@openbsd.org>

Print disklabel UIDs using printf/fprintf instead of using the hand rolled
uid_print() function.

ok krw@


# d71533c9 12-Aug-2010 tedu <tedu@openbsd.org>

fix a few warnings. ok jsing


# 2f1aa2ab 07-Aug-2009 martynas <martynas@openbsd.org>

move editor_allocspace & mpsave out to extern.h so that disklabel.c
gets the declarations it uses. ok krw@


# 6534e983 04-Jun-2009 deraadt <deraadt@openbsd.org>

Recycle four ancient fields in the disklabel structure, replacing them with
bounds information, ie. the zone of the disk that OpenBSD can use. Have each
pre-disklabel parser (MBR, DPME, or per-arch

Recycle four ancient fields in the disklabel structure, replacing them with
bounds information, ie. the zone of the disk that OpenBSD can use. Have each
pre-disklabel parser (MBR, DPME, or per-arch MD disklabel parsers) figure out
this area and pass it up to userland. Then, delete all the same disk parsing
code from disklabel(8) since the kernel passes it up. Lots and lots of - signs
in the disklabel(8) code.
Tested on as many platforms as possible, the fallout will be repaired as time
goes on. To test, use disklabel -d <drive> and validate that the bounds do not
overlap any boot blocks. This same information is used by disklabel -A...
OK for the concept from krw, miod, and drahn

show more ...


# 352d199b 02-Jun-2009 krw <krw@openbsd.org>

Add '-h' flag, and '*' as a unit specifier for 'p' Editor command.
Both cause partition sizes to be displayed using a human readable
format with the units automatically chosen by looking at the small

Add '-h' flag, and '*' as a unit specifier for 'p' Editor command.
Both cause partition sizes to be displayed using a human readable
format with the units automatically chosen by looking at the smallest
partition in the disk label. Remove forceable humanization in 'A'
code and use '-h' in install scripts.

Prodded & ok deraadt@, verbiage tweaks from jmc@

show more ...


# 0c30c0ae 18-Apr-2009 sthen <sthen@openbsd.org>

Alexander Hall points out that disklabel -AE <disk> followed by quitting
without making manual changes does not ask whether you'd like to save the
new automatic disklabel. Change to follow the behavi

Alexander Hall points out that disklabel -AE <disk> followed by quitting
without making manual changes does not ask whether you'd like to save the
new automatic disklabel. Change to follow the behaviour of -d and ask
every time. ok krw@.

show more ...


# d2b6991b 12-Apr-2009 krw <krw@openbsd.org>

When auto-allocating, check the size of the disk and display
offset/size information in MB if the disk is <10G, and in GB
otherwise. '-p' will override this default.


# 77a43662 11-Apr-2009 krw <krw@openbsd.org>

readlabel() either errored out or returned a pointer to the global
'lab'. So there is no need for the return value. Just use &lab
wherever it was used. No functional change.

Slightly different versi

readlabel() either errored out or returned a pointer to the global
'lab'. So there is no need for the return value. Just use &lab
wherever it was used. No functional change.

Slightly different version read ok to blambert@

show more ...


# 34ae4198 10-Apr-2009 krw <krw@openbsd.org>

Re-work '-A' so that it sets a flag that -E and -w use, and which will
just display the auto-allocation plan otherwise. Don't overwrite any
spoofed partitions, insert auto allocated partitions where

Re-work '-A' so that it sets a flag that -E and -w use, and which will
just display the auto-allocation plan otherwise. Don't overwrite any
spoofed partitions, insert auto allocated partitions where we can.

This is much more install script and weird architecture friendly. I'm
talking about you, macppc.

Many suggestions and code from otto@, feedback from many, cattle
prod applied by deraadt@.

ok deraadt@
"if it works for >8GB ... put it in" miod@
"to be clear, ok" todd@

show more ...


12