aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-10-09 19:38:49 +0200
committerJakob Unterwurzacher2016-10-09 20:05:54 +0200
commit9cf3ced0ce95495cabd8f4e7055d1c98f42363c9 (patch)
treeeec3bede62b9c6d0a72f13cca3609906336b1401 /main.go
parent25a8802403de157bdfc39b7860ea4e3ee2b1d8ee (diff)
main: also accept options at the end via "-o"
For compatability with mount(1), options are also accepted as "-o COMMA-SEPARATED-OPTIONS" at the end of the command line. For example, "-o q,zerokey" is equivalent to "-q -zerokey".
Diffstat (limited to 'main.go')
-rw-r--r--main.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.go b/main.go
index 2033e23..6d03ee2 100644
--- a/main.go
+++ b/main.go
@@ -42,7 +42,7 @@ func usageText() {
printVersion()
fmt.Printf(`
Usage: %s -init|-passwd [OPTIONS] CIPHERDIR
- or %s [OPTIONS] CIPHERDIR MOUNTPOINT
+ or %s [OPTIONS] CIPHERDIR MOUNTPOINT [-o COMMA-SEPARATED-OPTIONS]
Options:
`, tlog.ProgramName, tlog.ProgramName)
@@ -221,7 +221,7 @@ func main() {
prettyArgs = prettyArgs[1 : len(prettyArgs)-1]
tlog.Info.Printf("Wrong number of arguments (have %d, want 2). You passed: %s",
flagSet.NArg(), prettyArgs)
- tlog.Fatal.Printf("Usage: %s [OPTIONS] CIPHERDIR MOUNTPOINT", tlog.ProgramName)
+ tlog.Fatal.Printf("Usage: %s [OPTIONS] CIPHERDIR MOUNTPOINT [-o COMMA-SEPARATED-OPTIONS]", tlog.ProgramName)
os.Exit(ErrExitUsage)
}
os.Exit(doMount(&args))