ref: 2d4a2c5c2065a32b6b5bd6a0e887af1574a8dfec
parent: eee49495d01c7e6eb78382d411a6d46c5ada84c8
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Wed Sep 27 09:59:55 EDT 2017
kernel: don't tokenize inplace in isaconfig() to make /dev/reboot work
--- a/sys/src/9/pc/devarch.c
+++ b/sys/src/9/pc/devarch.c
@@ -1182,7 +1182,7 @@
int
isaconfig(char *class, int ctlrno, ISAConf *isa)
{- char cc[32], *p;
+ char cc[32], *p, *x;
int i;
snprint(cc, sizeof cc, "%s%d", class, ctlrno);
@@ -1189,6 +1189,10 @@
p = getconf(cc);
if(p == nil)
return 0;
+
+ x = nil;
+ kstrdup(&x, p);
+ p = x;
isa->type = "";
isa->nopt = tokenize(p, isa->opt, NISAOPT);
--
⑨