OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.11 / (download) - annotate - [select for diffs], Mon Sep 5 11:12:20 2022 UTC (20 months, 3 weeks ago) by kn
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, HEAD
Changes since 1.10: +9 -2 lines
Diff to previous 1.10 (colored)

Fix -r on multi-chunk softraid volumes

Running installboot(8) on softraid(4) volumes means installing stages on
every softraid chunk.

The overall idea is the same, but MD implementations differ.

sparc64_softraid.c's sr_install_bootblk() reuses sparc64_installboot.c's
md_installboot() for this.

For sparc64, md_installboot() does the copy of stage 2, usually
/usr/mdec/ofwboot to /ofwboot, so when `-r root' is passed, it prefixes the
file path with "root".

For single-disk installations (plain-disk and single-chunk softraid) this is
fine, but as soon as multiple chunks are used, md_installboot() currently
prefixes the path each time, obviously resulting in invalid paths starting
with the second run.

Other architectures do reuse md_installboot() as well but either don't do
such a copy or implement the prefixing differently -- plus they must support
softraid in the firt place to be able to hit this type of bug.


With this fixed, regress/usr.sbin/installboot finally passes on sparc64 and
installboot no longer fails at the end of a fresh installation onto softraid
with multiple chunks.

"looks correct" miod

Revision 1.10 / (download) - annotate - [select for diffs], Wed Aug 31 19:40:37 2022 UTC (21 months ago) by kn
Branch: MAIN
Changes since 1.9: +4 -1 lines
Diff to previous 1.9 (colored)

Log copy of /ofwboot

Another step towards more consistent behaviour across platforms.

This leaves only hppa and landisk **not** logging such copies,
but I can't test on those.

OK miod

Revision 1.9 / (download) - annotate - [select for diffs], Tue Jul 20 14:51:56 2021 UTC (2 years, 10 months ago) by kettenis
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.8: +6 -1 lines
Diff to previous 1.8 (colored)

Add -p option to "prepare" (newfs) a filesystem that will be used for
the bootloader.  This is a no-op on architectures where such a filesystem
isn't needed.

ok krw@, deraadt@

Revision 1.8 / (download) - annotate - [select for diffs], Fri Jun 28 13:32:48 2019 UTC (4 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: 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.7: +3 -3 lines
Diff to previous 1.7 (colored)

When system calls indicate an error they return -1, not some arbitrary
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.

Revision 1.7 / (download) - annotate - [select for diffs], Mon Dec 28 23:00:29 2015 UTC (8 years, 5 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, 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.6: +3 -5 lines
Diff to previous 1.6 (colored)

Replace lseek/[read|write] with pread|pwrite.

ok millert@ a while ago.

Revision 1.6 / (download) - annotate - [select for diffs], Mon Nov 30 17:34:57 2015 UTC (8 years, 6 months ago) by jsing
Branch: MAIN
Changes since 1.5: +3 -2 lines
Diff to previous 1.5 (colored)

Revert the sync -> fsync conversion (at least for the time being) - there
is a good chance that this is causing the 'No blocks to load' errors that
various people have encountered.

Revision 1.5 / (download) - annotate - [select for diffs], Thu Nov 26 19:03:10 2015 UTC (8 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.4: +2 -3 lines
Diff to previous 1.4 (colored)

Apply pledge.
The people I asked to review this did not get back to me, so
we will test this a different way.

Revision 1.4 / (download) - annotate - [select for diffs], Thu Oct 8 14:50:38 2015 UTC (8 years, 7 months ago) by krw
Branch: MAIN
Changes since 1.3: +5 -2 lines
Diff to previous 1.3 (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.3 / (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.2: +2 -2 lines
Diff to previous 1.2 (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.2 / (download) - annotate - [select for diffs], Mon Jun 9 13:13:48 2014 UTC (9 years, 11 months ago) by jsing
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.1: +3 -4 lines
Diff to previous 1.1 (colored)

Use calloc() instead of malloc()/memset().

From Benjamin Baier.

Revision 1.1 / (download) - annotate - [select for diffs], Sun Jan 19 02:58:50 2014 UTC (10 years, 4 months ago) by jsing
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5

Rework installboot and use a single directory with a single makefile. The
directory per machine model is arguably cleaner, however it does not play
well with distrib/special and instbin.

Discussed with deraadt@

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.