remove support for import command in namespace files
This commit is contained in:
parent
814de7f6b3
commit
a158c4bdb9
2 changed files with 3 additions and 43 deletions
|
@ -45,14 +45,6 @@ Bind
|
|||
on
|
||||
.IR old .
|
||||
.TP
|
||||
.BR import \ [ -abc ]\ \fIhost\fR\ "[\fIremotepath\fR\^\^] \fImountpoint\fR
|
||||
Import
|
||||
.I remotepath
|
||||
from machine
|
||||
.I server
|
||||
and attach it to
|
||||
.IR mountpoint .
|
||||
.TP
|
||||
.BI cd \ dir
|
||||
Change the working directory to
|
||||
.IR dir .
|
||||
|
@ -81,14 +73,11 @@ must be present in the name space being built.
|
|||
.PD
|
||||
.PP
|
||||
The options for
|
||||
.IR bind ,
|
||||
.IR mount ,
|
||||
.I bind
|
||||
and
|
||||
.I import
|
||||
.I mount
|
||||
are interpreted as in
|
||||
.IR bind (1)
|
||||
and
|
||||
.IR import (4).
|
||||
.IR bind (1).
|
||||
.SH "SEE ALSO"
|
||||
.IR bind (1),
|
||||
.IR namespace (4),
|
||||
|
|
|
@ -16,7 +16,6 @@ static char *expandarg(char*, char*);
|
|||
static int splitargs(char*, char*[], char*, int);
|
||||
static int nsfile(char*, Biobuf *, AuthRpc *);
|
||||
static int nsop(char*, int, char*[], AuthRpc*);
|
||||
static int callexport(char*, char*);
|
||||
static int catch(void*, char*);
|
||||
|
||||
int newnsdebug;
|
||||
|
@ -202,13 +201,6 @@ nsop(char *fn, int argc, char *argv[], AuthRpc *rpc)
|
|||
fprint(2, "%s: mount: %s %s %s: %r\n", fn, argv[0], argv[1], argv[2]);
|
||||
}
|
||||
close(fd);
|
||||
}else if(strcmp(argv0, "import") == 0){
|
||||
fd = callexport(argv[0], argv[1]);
|
||||
if(argc == 2)
|
||||
famount(fd, rpc, argv[1], flags, "");
|
||||
else if(argc == 3)
|
||||
famount(fd, rpc, argv[2], flags, "");
|
||||
close(fd);
|
||||
}else if(strcmp(argv0, "cd") == 0 && argc == 1){
|
||||
if(chdir(argv[0]) == 0 && *argv[0] == '/')
|
||||
cdroot = 1;
|
||||
|
@ -225,27 +217,6 @@ catch(void *x, char *m)
|
|||
return strncmp(m, wocp, strlen(wocp)) == 0;
|
||||
}
|
||||
|
||||
static int
|
||||
callexport(char *sys, char *tree)
|
||||
{
|
||||
char *na, buf[3];
|
||||
int fd;
|
||||
AuthInfo *ai;
|
||||
|
||||
na = netmkaddr(sys, 0, "exportfs");
|
||||
if((fd = dial(na, 0, 0, 0)) < 0)
|
||||
return -1;
|
||||
if((ai = auth_proxy(fd, auth_getkey, "proto=p9any role=client")) == nil
|
||||
|| write(fd, tree, strlen(tree)) < 0
|
||||
|| read(fd, buf, 3) != 2 || buf[0]!='O' || buf[1]!= 'K'){
|
||||
close(fd);
|
||||
auth_freeAI(ai);
|
||||
return -1;
|
||||
}
|
||||
auth_freeAI(ai);
|
||||
return fd;
|
||||
}
|
||||
|
||||
static char*
|
||||
unquote(char *s)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue