kernel: don't tokenize inplace in isaconfig() to make /dev/reboot work

This commit is contained in:
cinap_lenrek 2017-09-27 13:59:55 +02:00
parent dad00a77da
commit 330e7ef39b

View file

@ -1182,7 +1182,7 @@ idlehands(void)
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);
@ -1190,6 +1190,10 @@ isaconfig(char *class, int ctlrno, ISAConf *isa)
if(p == nil)
return 0;
x = nil;
kstrdup(&x, p);
p = x;
isa->type = "";
isa->nopt = tokenize(p, isa->opt, NISAOPT);
for(i = 0; i < isa->nopt; i++){