OpenBSD CVS

CVS log for src/usr.sbin/installboot/util.c


[BACK] Up to [local] / src / usr.sbin / installboot

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.16 / (download) - annotate - [select for diffs], Thu Feb 3 10:25:14 2022 UTC (2 years, 4 months ago) by visa
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, HEAD
Changes since 1.15: +42 -1 lines
Diff to previous 1.15 (colored)

installboot(8): Adjustments for EFI platforms

Reduce #ifdef'ing within the control logic to make it clearer that there
are no essential differences in behaviour between the platforms.

Make installboot(8) write startup.nsh to enable simpler and more consistent
code in install.md.

Input and OK kettenis@ deraadt@

Revision 1.15 / (download) - annotate - [select for diffs], Wed Feb 2 13:22:10 2022 UTC (2 years, 4 months ago) by visa
Branch: MAIN
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)

Add missing mode argument to open(2) with O_CREAT.

Revision 1.14 / (download) - annotate - [select for diffs], Wed Jul 3 03:24:03 2019 UTC (4 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.13: +3 -3 lines
Diff to previous 1.13 (colored)

snprintf/vsnprintf return < 0 on error, rather than -1.

Revision 1.13 / (download) - annotate - [select for diffs], Wed Nov 7 04:51:56 2018 UTC (5 years, 7 months ago) by miko
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored)

avoid freeing r twice in error case; OK otto@

Revision 1.12 / (download) - annotate - [select for diffs], Tue Jul 3 20:14:41 2018 UTC (5 years, 11 months ago) by jcs
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.11: +25 -9 lines
Diff to previous 1.11 (colored)

installboot: adapt fileprefix() to future realpath(3) behavior

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

Revision 1.11 / (download) - annotate - [select for diffs], Wed Nov 4 02:12:49 2015 UTC (8 years, 7 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.10: +8 -6 lines
Diff to previous 1.10 (colored)

fix a memory leak in multiple error paths
ok krw@

Revision 1.10 / (download) - annotate - [select for diffs], Mon Oct 19 19:05:24 2015 UTC (8 years, 7 months ago) by krw
Branch: MAIN
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored)

Nuke unused variable.

Revision 1.9 / (download) - annotate - [select for diffs], Wed Oct 14 00:19:05 2015 UTC (8 years, 7 months ago) by krw
Branch: MAIN
Changes since 1.8: +4 -15 lines
Diff to previous 1.8 (colored)

Backout last. Breaks sparc64, amoung other dubiousness.

requested by deraadt@

Revision 1.8 / (download) - annotate - [select for diffs], Mon Oct 12 20:52:20 2015 UTC (8 years, 7 months ago) by krw
Branch: MAIN
Changes since 1.7: +15 -4 lines
Diff to previous 1.7 (colored)

Check that the disk specified on the command line is the disk that
files are copied to. Error out with 'cross-device install' if not.

ok millert@, ok deraadt@ & jsing@ for previous version

Revision 1.7 / (download) - annotate - [select for diffs], Thu Oct 8 14:50:38 2015 UTC (8 years, 8 months ago) by krw
Branch: MAIN
Changes since 1.6: +52 -26 lines
Diff to previous 1.6 (colored)

Refactor fileprefix() and filecopy() to use warn() instead of err()
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@

Revision 1.6 / (download) - annotate - [select for diffs], Wed Oct 7 03:06:46 2015 UTC (8 years, 8 months ago) by krw
Branch: MAIN
Changes since 1.5: +35 -2 lines
Diff to previous 1.5 (colored)

Add initial support for installing UEFI boot files to a GTP EFI System
Partition. Further work to be done in-tree.

ok deraadt@

Revision 1.5 / (download) - annotate - [select for diffs], Fri Jan 16 00:05:12 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.4: +5 -3 lines
Diff to previous 1.4 (colored)

first batch of cleanup to programs based upon the namespace cleanups
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

Revision 1.4 / (download) - annotate - [select for diffs], Mon Jun 9 15:50:08 2014 UTC (10 years ago) by jsing
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.3: +9 -18 lines
Diff to previous 1.3 (colored)

Change the installboot file copying process so that it carefully
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.

Revision 1.3 / (download) - annotate - [select for diffs], Sun Jan 19 03:48:07 2014 UTC (10 years, 4 months ago) by jsing
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored)

When copying files do it in 512 byte blocks so that we're less likely to
hit file system allocation issues on install media.

Requested by deraadt@

Revision 1.2 / (download) - annotate - [select for diffs], Sat Jan 18 03:07:05 2014 UTC (10 years, 4 months ago) by jsing
Branch: MAIN
Changes since 1.1: +57 -1 lines
Diff to previous 1.1 (colored)

Make installboot(8) easier to use - copy the second stage boot loader to
the default location used by the given architecture. This eliminates the
need to copy it over manually prior to running installboot.

Revision 1.1 / (download) - annotate - [select for diffs], Sat Jan 18 02:47:27 2014 UTC (10 years, 4 months ago) by jsing
Branch: MAIN

Add a -r flag that allows for the mount point of the root filesystem to be
specified. This is primarily for use by the installer and defaults to /.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.