ref: 8f3b47e092eb07e20238089a047f2993242d3302
parent: 74aef0eac9330a485ec332ee49575d990a7bd41a
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Mon Aug 4 10:18:49 EDT 2025
devenv: don't mangle lists in '#ec' for /dev/reboot When passing boot parameters, we used to truncate any list values to the first element. Instead, replace nul's with space to flatten the value. This way bootargs is properly preserved.
--- a/sys/src/9/port/devenv.c
+++ b/sys/src/9/port/devenv.c
@@ -529,8 +529,11 @@
q += n;
memmove(q, e->value, e->len);
q[e->len] = 0;
- /* move up to the first null */
- q += strlen(q) + 1;
+ for(n=0; n<e->len; n++){
+ if(q[n] == '\0')
+ q[n] = ' ';
+ }
+ q += n+1;
}
*q = '\0';
runlock(eg);
--
⑨