9vx: allow localroot==nil for #Z - vx32 - Local 9vx git repository for patches.
(DIR) Log
(DIR) Files
(DIR) Refs
---
(DIR) commit f8a144ae1a7edadc14f897bd85abab596c577546
(DIR) parent c4c41028787128a63eaf8bfe9330fd7baaacb75e
(HTM) Author: Russ Cox <rsc@swtch.com>
Date: Sun, 20 Jul 2008 03:47:32 -0400
9vx: allow localroot==nil for #Z
Diffstat:
src/9vx/devfs-posix.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
---
(DIR) diff --git a/src/9vx/devfs-posix.c b/src/9vx/devfs-posix.c
@@ -113,11 +113,16 @@ fsattach(char *spec)
}
}
- if(localroot == nil)
- error("no #Zplan9 root without -r");
- if(stat(localroot, &st) < 0)
- oserror();
+ if(plan9){
+ if(localroot == nil)
+ error("no #Zplan9 root without -r");
+ if(stat(localroot, &st) < 0)
+ oserror();
+ }else{
+ if(stat("/", &st) < 0)
+ oserror();
+ }
c = devattach(FsChar, spec);
ufd = mallocz(sizeof(UnixFd), 1);