Bootloaders have no write support for softraid volumes, which manifests in,
e.g. /bsd.upgrade not being stripped of its 'x' permission bit to prevent
sysupgrade loops in case of upgrade failure.
Set a no-write flag handled by libsa to bail out early in write calls.
There should be no real behaviour change, writes just fail earlier now.
sparc64 ofwboot. Crank minor.
Tested on T4-2 guest domain with root on softraid.
-/* $OpenBSD: ofdev.c,v 1.34 2022/09/01 13:45:26 krw Exp $ */
+/* $OpenBSD: ofdev.c,v 1.35 2023/04/25 14:00:35 kn Exp $ */
/* $NetBSD: ofdev.c,v 1.1 2000/08/20 14:58:41 mrg Exp $ */
/*
if (bootdev_dip) {
if (fname[0] == 's' && fname[1] == 'r' &&
'0' <= fname[2] && fname[2] <= '9') {
+ /* We only support read-only softraid. */
+ of->f_flags |= F_NOWRITE;
+
volno = fname[2];
if ('a' <= fname[3] &&
fname[3] <= 'a' + MAXPARTITIONS) {
-const char version[] = "1.24";
+const char version[] = "1.25";