mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
use nsamount and fsamount
This commit is contained in:
parent
6613ff14c7
commit
0d4243f789
1 changed files with 5 additions and 3 deletions
|
@ -3,6 +3,7 @@
|
||||||
#include <libc.h>
|
#include <libc.h>
|
||||||
#include <fcall.h>
|
#include <fcall.h>
|
||||||
#include <9pclient.h>
|
#include <9pclient.h>
|
||||||
|
#include <auth.h>
|
||||||
#include <thread.h>
|
#include <thread.h>
|
||||||
|
|
||||||
char *addr;
|
char *addr;
|
||||||
|
@ -52,7 +53,8 @@ threadmain(int argc, char **argv)
|
||||||
addr = EARGF(usage());
|
addr = EARGF(usage());
|
||||||
break;
|
break;
|
||||||
case 'D':
|
case 'D':
|
||||||
|
chatty9pclient = 1;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
usage();
|
usage();
|
||||||
}ARGEND
|
}ARGEND
|
||||||
|
@ -86,7 +88,7 @@ xparse(char *name, char **path)
|
||||||
else
|
else
|
||||||
*p++ = 0;
|
*p++ = 0;
|
||||||
*path = p;
|
*path = p;
|
||||||
fs = nsmount(name, "");
|
fs = nsamount(name, "");
|
||||||
if(fs == nil)
|
if(fs == nil)
|
||||||
sysfatal("mount: %r");
|
sysfatal("mount: %r");
|
||||||
}else{
|
}else{
|
||||||
|
@ -94,7 +96,7 @@ xparse(char *name, char **path)
|
||||||
fprint(2, "dial %s...", addr);
|
fprint(2, "dial %s...", addr);
|
||||||
if((fd = dial(addr, nil, nil, nil)) < 0)
|
if((fd = dial(addr, nil, nil, nil)) < 0)
|
||||||
sysfatal("dial: %r");
|
sysfatal("dial: %r");
|
||||||
if((fs = fsmount(fd, "")) == nil)
|
if((fs = fsamount(fd, "")) == nil)
|
||||||
sysfatal("fsmount: %r");
|
sysfatal("fsmount: %r");
|
||||||
}
|
}
|
||||||
return fs;
|
return fs;
|
||||||
|
|
Loading…
Reference in a new issue