diff options
author | Jakob Unterwurzacher | 2017-06-05 22:45:11 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2017-06-07 22:09:06 +0200 |
commit | 71978ec88a2aa8ec92df080a4a6becf623957c81 (patch) | |
tree | dee06235a540e7188a6defc6f2bc6057cd000af5 /cli_args.go | |
parent | 22820bcd76a781d09ce82f6e734013d55afc1e5c (diff) |
Add "-trace" flag (record execution trace)
Uses the runtime/trace functionality.
TODO: add to man page.
Diffstat (limited to 'cli_args.go')
-rw-r--r-- | cli_args.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cli_args.go b/cli_args.go index bdce4ec..7f67fe3 100644 --- a/cli_args.go +++ b/cli_args.go @@ -8,12 +8,12 @@ import ( "strconv" "strings" + "github.com/hanwen/go-fuse/fuse" "github.com/rfjakob/gocryptfs/internal/configfile" "github.com/rfjakob/gocryptfs/internal/exitcodes" "github.com/rfjakob/gocryptfs/internal/prefer_openssl" "github.com/rfjakob/gocryptfs/internal/stupidgcm" "github.com/rfjakob/gocryptfs/internal/tlog" - "github.com/hanwen/go-fuse/fuse" ) // argContainer stores the parsed CLI options and arguments @@ -23,7 +23,7 @@ type argContainer struct { longnames, allow_other, ro, reverse, aessiv, nonempty, raw64, noprealloc, speed, hkdf, serialize_reads, forcedecode, hh, info bool masterkey, mountpoint, cipherdir, cpuprofile, extpass, - memprofile, ko, passfile, ctlsock, fsname, force_owner string + memprofile, ko, passfile, ctlsock, fsname, force_owner, trace string // Configuration file name override config string notifypid, scryptn int @@ -33,7 +33,7 @@ type argContainer struct { // _ctlsockFd stores the control socket file descriptor (ctlsock stores the path) _ctlsockFd net.Listener // _forceOwner is, if non-nil, a parsed, validated Owner (as opposed to the string above) - _forceOwner *fuse.Owner + _forceOwner *fuse.Owner } var flagSet *flag.FlagSet @@ -140,6 +140,7 @@ func parseCliOpts() (args argContainer) { flagSet.StringVar(&args.ctlsock, "ctlsock", "", "Create control socket at specified path") flagSet.StringVar(&args.fsname, "fsname", "", "Override the filesystem name") flagSet.StringVar(&args.force_owner, "force_owner", "", "uid:gid pair to coerce ownership") + flagSet.StringVar(&args.trace, "trace", "", "Write execution trace to file") flagSet.IntVar(&args.notifypid, "notifypid", 0, "Send USR1 to the specified process after "+ "successful mount - used internally for daemonization") flagSet.IntVar(&args.scryptn, "scryptn", configfile.ScryptDefaultLogN, "scrypt cost parameter logN. Possible values: 10-28. "+ |