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
-/* $OpenBSD: conf.c,v 1.40 2023/01/02 22:41:17 kettenis Exp $ */
+/* $OpenBSD: conf.c,v 1.41 2023/04/25 10:11:20 kn Exp $ */
/*
* Copyright (c) 1996 Michael Shalayeff
#include "efidev.h"
#include "efipxe.h"
-const char version[] = "3.63";
+const char version[] = "3.64";
#ifdef EFI_DEBUG
int debug = 0;
-/* $OpenBSD: efidev.c,v 1.40 2022/09/01 13:45:26 krw Exp $ */
+/* $OpenBSD: efidev.c,v 1.41 2023/04/25 10:11:20 kn Exp $ */
/*
* Copyright (c) 1996 Michael Shalayeff
#ifdef SOFTRAID
/* Intercept softraid disks. */
if (strncmp("sr", dev, 2) == 0) {
+ /* We only support read-only softraid. */
+ f->f_flags |= F_NOWRITE;
/* Create a fake diskinfo for this softraid volume. */
SLIST_FOREACH(bv, &sr_volumes, sbv_link)