diff options
author | Russ Cox <rsc@swtch.com> | 2008-07-10 11:08:53 -0400 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2008-07-10 11:08:53 -0400 |
commit | b2bf14149a909399f69559ed6cc68acb8994a301 (patch) | |
tree | 11dc76f1d8158398fcfc05d5521645a9338cb056 /src/cmd/upas | |
parent | fd652ac3195e155c8c0a4cb8ec104b029f40628e (diff) | |
download | plan9port-b2bf14149a909399f69559ed6cc68acb8994a301.tar.gz plan9port-b2bf14149a909399f69559ed6cc68acb8994a301.tar.bz2 plan9port-b2bf14149a909399f69559ed6cc68acb8994a301.zip |
nedmail: add -S parameter for alternate mail service
Diffstat (limited to 'src/cmd/upas')
-rw-r--r-- | src/cmd/upas/ned/nedmail.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/cmd/upas/ned/nedmail.c b/src/cmd/upas/ned/nedmail.c index 231305ea..ef0f731c 100644 --- a/src/cmd/upas/ned/nedmail.c +++ b/src/cmd/upas/ned/nedmail.c @@ -225,7 +225,7 @@ threadmain(int argc, char **argv) char *err; int n, cflag; String *prompt; - char *file, *singleton; + char *file, *singleton, *service; Binit(&out, 1, OWRITE); @@ -233,7 +233,11 @@ threadmain(int argc, char **argv) singleton = nil; reverse = 1; cflag = 0; + service = "mail"; ARGBEGIN { + case 'S': + service = EARGF(usage()); + break; case 'c': cflag = 1; break; @@ -269,8 +273,8 @@ threadmain(int argc, char **argv) if(argc) usage(); - if((mailfs = nsmount("mail", nil)) == nil) - sysfatal("cannot mount mail: %r"); + if((mailfs = nsmount(service, nil)) == nil) + sysfatal("cannot mount %s: %r", service); switchmb(file, singleton); |