Do not attempt to write to read-only softraid
authorkn <kn@openbsd.org>
Tue, 25 Apr 2023 10:11:20 +0000 (10:11 +0000)
committerkn <kn@openbsd.org>
Tue, 25 Apr 2023 10:11:20 +0000 (10:11 +0000)
commit4b81c2944f9321aabb43c275946f06c69bd7f723
tree22a6feaec6647c3e226777b0f556ef4860fe3fd5
parent5a8378277327e8433b632bd9bef26d30b93e329c
Do not attempt to write to read-only softraid

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.

amd64 EFI bits, other architectues to come.  Crank minor.

"seems sensible" jsing
sys/arch/amd64/stand/efiboot/conf.c
sys/arch/amd64/stand/efiboot/efidev.c