summaryrefslogtreecommitdiffstats
path: root/usr.sbin/installboot (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge identical amd64 and i386 stanzas.krw2016-08-141-7/+2
| | | | Requested & ok jsing@
* Use more compact idiom to select architecture dependent files to compile. Nokrw2016-07-201-55/+7
| | | | | | | | intentional functional change. Diff from Miod. ok millert@ deraadt@
* Rename findmbrlinux() to findmbrfat(). This function was originallyjsg2016-06-021-4/+4
| | | | | | searching for a linux partition type, now it looks for a fat type. ok kettenis@
* Add support for armv7. Fix an error message in the i386 support beforekettenis2016-05-313-4/+270
| | | | | | creating more copies. ok deraadt@, jsing@
* Use PATH_MAX instead of a hardcoded minimal value. Stack space is cheap andkettenis2016-05-231-2/+2
| | | | | | this isn't the kernel. requested by deraadt@
* remove hppa64 port, which we never got going beyond broken single users.deraadt2016-05-112-43/+1
| | | | | | hppa reverse-stack gives us a valuable test case, but most developers don't have a 2nd one to proceed further with this. ok kettenis
* Plug a couple of leaks of input buffers.krw2016-04-282-2/+5
| | | | Pointed out by David Carlier.
* We are done providing support for the vax.deraadt2016-03-092-62/+1
| | | | lots of agreement.
* sync() requires unistd.htobiasu2016-02-181-1/+2
| | | | | | Reported by Sigi Rudzio. Thanks! "go for it" deraadt@
* sync() needs unistd.htobiasu2016-01-151-1/+2
|
* Replace lseek/[read|write] with pread|pwrite.krw2015-12-283-34/+23
| | | | ok millert@ a while ago.
* Make gpt_chk_mbr() instances even more identicaller by alwayskrw2015-12-241-2/+2
| | | | | returning 0 or 1 since only boolean checks of the result are done. No need for EINVAL as a return value.
* Make all instances of gpt_chk_mbr() identical (bar static vskrw2015-12-241-6/+4
| | | | | | non-static) by passing disk size as 2nd parameter instead of the different structures holding the disk size info. The fifth copy of gpt_chk_mbr() in fdisk is a little specialer. No functional change.
* Add prototype for gpt_chk_mbr() to i386_installboot.c. Add 'static' tokrw2015-12-241-2/+3
| | | | | declarations of gpt_chk_mbr() to match prototypes in efidev.c and softraid.c.
* Remove unnecessary options:rpe2015-12-201-3/+3
| | | | | | | - in fsck_msdos, '-f' option is a no-op - newfs_msdos does not need '-t msdos' OK krw@
* Remove NULL-checks before free(). ok tb@mmcc2015-12-101-3/+2
|
* Steal code from kern/subr_disk.c to check for a protective MBR beforekrw2015-12-011-1/+52
| | | | using GPT info. Otherwise GPT remnants might become revenants.
* aviion went awayderaadt2015-12-011-5/+1
|
* Don't need <sys/types.h> and <sys/param.h>. Nuke the former when DEV_BSIZEkrw2015-12-012-4/+2
| | | | is needed.
* Revert the sync -> fsync conversion (at least for the time being) - therejsing2015-11-304-9/+14
| | | | | is a good chance that this is causing the 'No blocks to load' errors that various people have encountered.
* give up on pledge for now.deraadt2015-11-291-4/+1
| | | | this will have to wait until jsing and stsp find time to look at it.
* Apply pledge.deraadt2015-11-265-15/+13
| | | | | The people I asked to review this did not get back to me, so we will test this a different way.
* fix a memory leak in multiple error pathsjsg2015-11-041-6/+8
| | | | ok krw@
* fix a memory leak in an error pathjsg2015-11-031-2/+4
|
* Backout the backout of installboot softraid non-gpt case fix.stsp2015-10-281-1/+7
| | | | krw and I crossed streams
* Revert GPT change. Breaks non-GPT install/upgrade.krw2015-10-281-7/+1
| | | | Found the hard way by reyk@
* In sr_install_bootblk for i386, don't clobber 'part' in non-GPT case.stsp2015-10-281-5/+5
| | | | | | Found the hard way by reyk@. stupid mistake stsp@ ok reyk@
* Fix installboot(8) on i386/amd64 when softraid is on top of GPT.stsp2015-10-253-5/+11
| | | | ok krw deraadt
* Add parenthesis gcc wants and remove defined but unused label gcckrw2015-10-191-4/+3
| | | | | | complains about. ok deraadt@ on parethesis
* 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@
* Nuke unused variable.krw2015-10-191-2/+2
|
* Fix comments.rpe2015-10-181-3/+3
| | | | OK krw@
* Check file sizes only for regular files. The current code breaks savecoretobias2015-10-161-3/+3
| | | | | | due to its kvm handling. ok deraadt
* Merge nlist out of boundary access fix with other nlist implementations.tobias2015-10-161-31/+55
| | | | | | While at it, merge style and typo fixes back into nlist(3), too. ok deraadt, jsing, millert
* Add an extra argument to bootstrap() to allow for a limited overlap between anmiod2015-10-156-14/+31
| | | | | | | | | | | | | | | | 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@
* give up; include stdlib.h from the .h file, sighderaadt2015-10-152-3/+4
|
* worse, need even more includes...deraadt2015-10-141-1/+2
|
* add includes for crc32() and uuid_dec_be() missed in rev 1.11jsg2015-10-142-2/+4
| | | | ok krw@
* Backout last. Breaks sparc64, amoung other dubiousness.krw2015-10-143-35/+7
| | | | requested by deraadt@
* Check that the disk specified on the command line is the disk thatkrw2015-10-123-7/+35
| | | | | | files are copied to. Error out with 'cross-device install' if not. ok millert@, ok deraadt@ & jsing@ for previous version
* needs at least some include love; choosing <stdlib.h>deraadt2015-10-111-1/+3
|
* Refactor fileprefix() and filecopy() to use warn() instead of err()krw2015-10-086-43/+92
| | | | | | | | | to display error message, and to return error indications (NULL and -1 respectively). Use the error indications in write_efisystem() to unwind in the face of more error conditions. In other cases just exit(1) to emulation current behaviour. ok deraadt@
* Add initial support for installing UEFI boot files to a GTP EFI Systemkrw2015-10-073-4/+282
| | | | | | Partition. Further work to be done in-tree. ok deraadt@
* Out, damned whitespace!krw2015-10-051-2/+2
|
* Copy the stage2 file to / in md_installboot().miod2015-10-051-2/+14
|
* Nuke trailing whitespace to avoid cluttering possible upcoming diffs.krw2015-10-035-13/+13
|
* Assign the return value of getopt() to an int, not a char, so that optionsmiod2015-09-101-3/+2
| | | | actually work on unsigned char platforms.
* Adjust <sys/param.h> comments regarding use of use of MAXFRAG, orderaadt2015-01-201-2/+2
| | | | | delete <sys/param.h> if now possible ok guenther
* first batch of cleanup to programs based upon the namespace cleanupsderaadt2015-01-168-18/+22
| | | | | | | 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
* use reallocarray() to detect int overflow; ok dougderaadt2014-10-081-4/+3
|