From cf721a08ecfe02f03ad2bddb806e506e6dda63d7 Mon Sep 17 00:00:00 2001 From: Junfeng Li Date: Sat, 9 Jan 2021 15:13:55 -0800 Subject: [PATCH] Add mount point support in import --- src/cmd/import.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/cmd/import.c b/src/cmd/import.c index 7da70966..cc9aa789 100644 --- a/src/cmd/import.c +++ b/src/cmd/import.c @@ -14,6 +14,7 @@ char *srv; char *addr; char *ns; int export; +char *mtpt; void shuffle(void *arg); int post(char *srv); @@ -33,7 +34,7 @@ enum void usage(void) { - fprint(2, "usage: %s [-df] [-s service] [-n remote-ns] [-p remote-prog] remote-system\n", argv0); + fprint(2, "usage: %s [-df] [-s service] [-n remote-ns] [-p remote-prog] [-m mtpt] remote-system\n", argv0); threadexitsall("usage"); } @@ -85,6 +86,9 @@ threadmain(int argc, char *argv[]) case 's': /* name of service */ srv = EARGF(usage()); break; + case 'm': + mtpt = EARGF(usage()); + break; case 'R': rem = 1; break; @@ -156,7 +160,7 @@ post(char *srv) fatal("can't create pipe: %r"); /* 0 will be server end, 1 will be client end */ - if(post9pservice(p[1], srv, nil) < 0) + if(post9pservice(p[1], srv, mtpt) < 0) fatal("post9pservice plumb: %r"); close(p[1]);