9vx.ini understands localroot - vx32 - Local 9vx git repository for patches.
       
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
 (DIR) commit 761ebf2a4f56f03002a8ef7254115b5815ad674b
 (DIR) parent 4da0767d9990fa894dc3d6d94fc5650579a52404
 (HTM) Author: Jesus Galan Lopez (yiyus) <yiyu.jgl@gmail.com>
       Date:   Fri, 25 Jun 2010 01:04:10 +0200
       
       9vx.ini understands localroot
       
       Diffstat:
         doc/9vx.1                           |       9 +++++----
         src/9vx/conf.c                      |      10 +++++++---
         src/9vx/conf.h                      |       1 +
         src/9vx/main.c                      |       2 --
       
       4 files changed, 13 insertions(+), 9 deletions(-)
       ---
 (DIR) diff --git a/doc/9vx.1 b/doc/9vx.1
       @@ -59,7 +59,7 @@ arguments will be passed to boot/boot as explained in boot(8), with the addition
        tthe local method also supports local directories. The
        .I -r
        option sets
       -.I nobootprompt=local!#Z/localroot
       +.I nobootprompt=local!#Z/root
        tto boot from a local directory containing a Plan 9 tree.
        If an
        .I user
       @@ -118,10 +118,11 @@ pairs in a similar fasion to plan9.ini(8). Additional options are
        .I initrc,
        .I usetty,
        .I memsize,
       -.I netdev
       -and
       +.I netdev,
        .I macaddr
       -(that can also be part of a netdev line).
       +(that can also be part of a netdev line)
       +and
       +.I localroot.
        .SH BUGS
        The menu system of plan9.ini(8) is not supported in
        .I 9vx.ini
 (DIR) diff --git a/src/9vx/conf.c b/src/9vx/conf.c
       @@ -118,14 +118,14 @@ iniopt(char *name, char *value)
        
                if(*name == '*')
                        name++;
       -        if(strcmp(name, "initrc") == 0)
       -                initrc = 1;
       -        else if(strcmp(name, "nofork") == 0)
       +        if(strcmp(name, "nofork") == 0)
                        nofork = 1;
                else if(strcmp(name, "nogui") == 0){
                        nogui = 1;
                        usetty = 1;
                }
       +        else if(strcmp(name, "initrc") == 0)
       +                initrc = 1;
                else if(strcmp(name, "usetty") == 0)
                        usetty = 1;
                else if(strcmp(name, "memsize") == 0)
       @@ -151,6 +151,8 @@ iniopt(char *name, char *value)
                }
                else if(strcmp(name, "macaddr") == 0)
                        setmac(value);
       +        else if(strcmp(name, "localroot") == 0 && !localroot)
       +                localroot = value;
                else if(strcmp(name, "user") == 0 && !username)
                        username = value;
        }
       @@ -184,6 +186,8 @@ printconfig(char *argv0){
                        if(ve[i].mac != nil)
                                print(" -a %s", ve[i].mac);
                }
       +        if(localroot)
       +                print(" -r %s", localroot);
                print(" -u %s", username);
                for(i = 0; i < bootargc; i++)
                        print(" %s", bootargv[i]);
 (DIR) diff --git a/src/9vx/conf.h b/src/9vx/conf.h
       @@ -12,6 +12,7 @@ int        memsize;        /* memory size */
        int        bootargc;
        char**        bootargv;
        char*        inifile;
       +char*        localroot;
        char*        username;
        
        int        readini(char *fn);
 (DIR) diff --git a/src/9vx/main.c b/src/9vx/main.c
       @@ -49,7 +49,6 @@ int        doabort = 1;        // for now
        int        abortonfault;
        char*        argv0;
        char*        conffile = "9vx";
       -char*        localroot;
        Conf        conf;
        
        static Mach mach0;
       @@ -82,7 +81,6 @@ int
        main(int argc, char **argv)
        {
                int vetap;
       -        int i, n;
                char *vedev;
                char *inifile;