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
|
int
|
||||||
isaconfig(char *class, int ctlrno, ISAConf *isa)
|
isaconfig(char *class, int ctlrno, ISAConf *isa)
|
||||||
{
|
{
|
||||||
char cc[32], *p;
|
char cc[32], *p, *x;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
snprint(cc, sizeof cc, "%s%d", class, ctlrno);
|
snprint(cc, sizeof cc, "%s%d", class, ctlrno);
|
||||||
|
@ -1190,6 +1190,10 @@ isaconfig(char *class, int ctlrno, ISAConf *isa)
|
||||||
if(p == nil)
|
if(p == nil)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
x = nil;
|
||||||
|
kstrdup(&x, p);
|
||||||
|
p = x;
|
||||||
|
|
||||||
isa->type = "";
|
isa->type = "";
|
||||||
isa->nopt = tokenize(p, isa->opt, NISAOPT);
|
isa->nopt = tokenize(p, isa->opt, NISAOPT);
|
||||||
for(i = 0; i < isa->nopt; i++){
|
for(i = 0; i < isa->nopt; i++){
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue