vx32

Local 9vx git repository for patches.
git clone git://r-36.net/vx32
Log | Files | Refs

commit 11ec3e20875f3bb4415c43f45c44632f4b837ab1
parent d50c4073bcb81436fccd540ef99ecbeb22125b5d
Author: Jesus Galan Lopez (yiyus) <yiyu.jgl@gmail.com>
Date:   Sat, 11 Sep 2010 20:57:46 +0200

keep localroot when !fsdev for printconfig

Diffstat:
src/9vx/main.c | 14+++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/9vx/main.c b/src/9vx/main.c @@ -193,12 +193,14 @@ main(int argc, char **argv) */ fsdev = strcmp(localroot, "-"); if(strcmp(localroot, "-") == 0){ - int i; - for(i=0; devtab[i] && devtab[i] != &fsdevtab; i++) - ; - devtab[i] = 0; + // remove #Z device from devtab + for(int i=0; devtab[i] && devtab[i] != &fsdevtab; i++) + if(devtab[i] == &fsdevtab) + devtab[i] = 0; } - if(bootargc > 0 || !fsdev) + + // keep localroot for printconfig if !fsdevtab + if(bootargc > 0 && fsdev) localroot = nil; inifields(&iniopt); @@ -234,6 +236,8 @@ main(int argc, char **argv) siginit(); printconfig(argv0); + if(!fsdev) + localroot = nil; if(nve == 0) ipdevtab = pipdevtab;