summaryrefslogtreecommitdiffstats
path: root/usr.sbin/installboot/util.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* snprintf/vsnprintf return < 0 on error, rather than -1.deraadt2019-07-031-3/+3
|
* avoid freeing r twice in error case; OK otto@miko2018-11-071-2/+2
|
* installboot: adapt fileprefix() to future realpath(3) behaviorjcs2018-07-031-9/+25
| | | | | | | | | | | | This was relying on realpath(3) working for paths that don't exist yet, which will be changing soon. Use a combination of dirname(3), realpath(3), and basename(3) to construct a sane path while still ensuring that the target directory exists. with martijn ok martijn, deraadt
* fix a memory leak in multiple error pathsjsg2015-11-041-6/+8
| | | | ok krw@
* Nuke unused variable.krw2015-10-191-2/+2
|
* Backout last. Breaks sparc64, amoung other dubiousness.krw2015-10-141-15/+4
| | | | requested by deraadt@
* Check that the disk specified on the command line is the disk thatkrw2015-10-121-4/+15
| | | | | | files are copied to. Error out with 'cross-device install' if not. ok millert@, ok deraadt@ & jsing@ for previous version
* Refactor fileprefix() and filecopy() to use warn() instead of err()krw2015-10-081-26/+52
| | | | | | | | | 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-071-2/+35
| | | | | | Partition. Further work to be done in-tree. ok deraadt@
* first batch of cleanup to programs based upon the namespace cleanupsderaadt2015-01-161-3/+5
| | | | | | | 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
* Change the installboot file copying process so that it carefullyjsing2014-06-091-18/+9
| | | | | | | | | | | overwrites the existing file, before truncating it to the final length. This means that we will keep the same inode and potentially retain the same disk data block allocation between runs. This will aid users who multiboot since it makes it less likely that the PBR will change, although as before, there is no guarantee. Obviously if the second stage boot loader grows or shrinks then the PBR will change regardless.
* When copying files do it in 512 byte blocks so that we're less likely tojsing2014-01-191-2/+2
| | | | | | hit file system allocation issues on install media. Requested by deraadt@
* Make installboot(8) easier to use - copy the second stage boot loader tojsing2014-01-181-1/+57
| | | | | the default location used by the given architecture. This eliminates the need to copy it over manually prior to running installboot.
* Add a -r flag that allows for the mount point of the root filesystem to bejsing2014-01-181-0/+43
specified. This is primarily for use by the installer and defaults to /.