kernel: don't tokenize inplace in isaconfig() to make /dev/reboot work
This commit is contained in:
parent
dad00a77da
commit
330e7ef39b
1 changed files with 5 additions and 1 deletions
|
@ -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++){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue