better parsing of macaddr parameters in 9vx.ini - vx32 - Local 9vx git repository for patches.
Log
Files
Refs
---
commit f1cefbf96ababc1b6a90cf5a0d29e5aab3fc23be
parent f13823178c8e50e56aa5d4631866f5a241185a33
Author: Jesus Galan Lopez (yiyus) 
Date:   Tue, 22 Jun 2010 01:20:04 +0200

better parsing of macaddr parameters in 9vx.ini

Diffstat:
  src/9vx/main.c                      |      15 +++++++++++++--

1 file changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/src/9vx/main.c b/src/9vx/main.c
@@ -394,7 +394,7 @@ inifields(void (*fp)(char*, char*))
 void
 iniopt(char *name, char *value)
 {
-        char *vedev;
+        char *cp, *vedev;
         int vetap;
 
         if(*name == '*')
@@ -421,7 +421,18 @@ iniopt(char *name, char *value)
                         value += 4;
                 }
                 vedev = value;
-                addve(vedev, vetap);
+                cp = vedev;
+                if((value = strchr(vedev, ' ')) != 0){
+                        cp = strchr(value+1, '=');
+                        *value=0;
+                        *cp=0;
+                }
+                addve(*vedev == 0 ? nil : vedev, vetap);
+                if(cp != vedev){
+                        iniopt(value+1, cp+1);
+                        *value=' ';
+                        *cp='=';
+                }
         }
         else if(strcmp(name, "nogui") == 0){
                 nogui = 1;