openbsd.stand: add patch to support 3x longer config lines (#381651)

This commit is contained in:
John Ericson
2025-02-21 16:52:26 -05:00
committed by GitHub
2 changed files with 21 additions and 1 deletions
@@ -0,0 +1,17 @@
OpenBSD's bootloader supports input configuration lines from both the console
and configuration files of only up to 133 characters. This is easy to break
with nix store paths. Triple it to 399.
diff --git a/sys/stand/boot/cmd.h b/sys/stand/boot/cmd.h
index 5045f052b8b..9fc5ce9e50a 100644
--- a/sys/stand/boot/cmd.h
+++ b/sys/stand/boot/cmd.h
@@ -27,7 +27,7 @@
*
*/
-#define CMD_BUFF_SIZE 133
+#define CMD_BUFF_SIZE 399
#define BOOTDEVLEN 1024
struct cmd_table {
@@ -8,7 +8,10 @@ mkDerivation {
path = "sys/arch/amd64/stand";
extraPaths = [ "sys" ];
patches = [ ../sys/initpath.patch ];
patches = [
../sys/initpath.patch
./cmd-buff-size.patch
];
# gcc compat
postPatch = ''