diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2017-11-19 17:17:04 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2017-11-19 17:17:04 +0100 |
commit | e3736b888701c79c9abb3de3fd28fe6ed5d3b168 (patch) | |
tree | ea96b62c726dedc34d173cd164ecd5b106c8c336 /sys/src/9/omap | |
parent | 89653dcc749a119ef2ee51b5e9812b7820951ec3 (diff) |
kernel: make isaconfig() consistent, not inplace tokenizing the conf string
Diffstat (limited to 'sys/src/9/omap')
-rw-r--r-- | sys/src/9/omap/main.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/src/9/omap/main.c b/sys/src/9/omap/main.c index 598a3ac50..f39105f36 100644 --- a/sys/src/9/omap/main.c +++ b/sys/src/9/omap/main.c @@ -314,7 +314,7 @@ exit(int) 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); @@ -322,6 +322,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++){ |