diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-10-09 05:10:47 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-10-09 05:10:47 +0200 |
commit | 4040ea7a5eda976098131794e8df3b162cafa8f4 (patch) | |
tree | 99416d4a3ba5ed78a5a402a6bde4599448a2051f /sys/src/9/pc/etherrt2860.c | |
parent | b29e414bc64537c9af8d5ebd8f73775bceaa5fa2 (diff) |
wifi: quote value of parsed ether options
introduce wificfg() function to convert ether->opt[] strings
to wifictl messages, which needs quoting for the value. so
etherX=type=iwl essid='something with spaces' works.
Diffstat (limited to 'sys/src/9/pc/etherrt2860.c')
-rw-r--r-- | sys/src/9/pc/etherrt2860.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/sys/src/9/pc/etherrt2860.c b/sys/src/9/pc/etherrt2860.c index 79e4ef68b..6544a80a7 100644 --- a/sys/src/9/pc/etherrt2860.c +++ b/sys/src/9/pc/etherrt2860.c @@ -1306,19 +1306,11 @@ static void setoptions(Ether *edev) { Ctlr *ctlr; - char buf[64]; int i; ctlr = edev->ctlr; - for(i = 0; i < edev->nopt; i++){ - if(strncmp(edev->opt[i], "essid=", 6) == 0){ - snprint(buf, sizeof(buf), "essid %s", edev->opt[i]+6); - if(!waserror()){ - wifictl(ctlr->wifi, buf, strlen(buf)); - poperror(); - } - } - } + for(i = 0; i < edev->nopt; i++) + wificfg(ctlr->wifi, edev->opt[i]); } static void |