summaryrefslogtreecommitdiffstats
path: root/usr.sbin/installboot/bootstrap.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* When system calls indicate an error they return -1, not some arbitraryderaadt2019-06-281-3/+3
| | | | | | value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
* Revert last. Breaks landisk snap building for currently unknownkrw2018-12-131-10/+27
| | | | | | reason. Noticed by deraadt@
* Don't allow the bootstrap to overlap the start of the OpenBSD area ofkrw2018-11-251-27/+10
| | | | | | | the disk. Even if the OpenBSD area starts with FS_UNUSED or FS_BOOT partitions. ok deraadt@ as part of larger diff
* Remove 'overlap_allowance' parameter from bootstrap().krw2018-09-011-3/+3
| | | | | | It was added to support Vax. Vax is dead Jim. ok deraadt@
* Replace lseek/[read|write] with pread|pwrite.krw2015-12-281-5/+3
| | | | ok millert@ a while ago.
* LABELSECTOR is a DEV_BSIZE quantity. So multiply by DEV_BSIZE and notkrw2015-10-191-3/+6
| | | | | | d_secsize when calculating disklabel location. ok jsing@
* Add an extra argument to bootstrap() to allow for a limited overlap between anmiod2015-10-151-3/+3
| | | | | | | | | | | | | | | | existing partition and the boot blocks span, and update all callers to require an overlap limit of zero sectors (thus not changing their behaviour). Then, add proper support for vax: copy the 2nd-stage boot block to /boot and install the 1st-stage boot block at the beginning of the disk, retaining the disklabel; allow for an overlap of up to 16 sectors, which is perfectly fine as long as your `a' partition is FFS. Note that regular installs will not even have such an overlap, because the default OpenBSD span on a disk on vax starts at sector 16, but installation media use sperific layout which require this. ok krw@
* first batch of cleanup to programs based upon the namespace cleanupsderaadt2015-01-161-2/+2
| | | | | | | in net/pfvar.h sys/proc.h sys/ucred.h arpa/nameser.h change to PATH_MAX, reduce use of MIN() and MAX(), HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc etc ok millert guenther, some review by doug
* Apply/fix OpenBSD tag.tobias2014-06-251-0/+2
| | | | ok jsing@
* Use calloc() instead of malloc()/memset().jsing2014-06-091-3/+2
| | | | From Benjamin Baier.
* Round the size of the bootstrap up to a multiple of the disk sector size.jsing2013-12-281-9/+11
| | | | Some bootstraps are already built this way, however others are not.
* Various code clean ups - add a missing header, add a missing prototype,jsing2013-12-281-15/+16
| | | | add some casts, tweak some types and variable names.
* Provide a bootstrap implementation (effectively a `disklabel -B'jsing2013-12-271-0/+125
equivalent) for use with architectures like hppa, landisk and vax.