aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/upas/nfs/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/upas/nfs/main.c')
-rw-r--r--src/cmd/upas/nfs/main.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/cmd/upas/nfs/main.c b/src/cmd/upas/nfs/main.c
index aa37d8bd..cd644db8 100644
--- a/src/cmd/upas/nfs/main.c
+++ b/src/cmd/upas/nfs/main.c
@@ -22,16 +22,17 @@ Imap *imap;
void
usage(void)
{
- fprint(2, "usage: mailfs [-t] server\n");
+ fprint(2, "usage: mailfs [-DVtx] [-s srvname] server\n");
threadexitsall("usage");
}
void
threadmain(int argc, char **argv)
{
- char *server;
+ char *server, *srvname;
int mode;
+ srvname = "mail";
mode = Unencrypted;
ARGBEGIN{
default:
@@ -42,6 +43,9 @@ threadmain(int argc, char **argv)
case 'V':
chattyimap++;
break;
+ case 's':
+ srvname = EARGF(usage());
+ break;
case 't':
mode = Tls;
break;
@@ -63,6 +67,6 @@ threadmain(int argc, char **argv)
if((imap = imapconnect(server, mode)) == nil)
sysfatal("imapconnect: %r");
- threadpostmountsrv(&fs, "mail", nil, 0);
+ threadpostmountsrv(&fs, srvname, nil, 0);
}