diff options
author | Jakob Unterwurzacher | 2017-05-14 13:51:13 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2017-05-14 13:51:26 +0200 |
commit | 8aabc542761046efdfe2c6b07662e446d223367b (patch) | |
tree | c3ea9facb640958b402c83f2f70077fb4dc74583 /internal/exitcodes | |
parent | 18f354d84b4ae58c620474a544b9929662b108d8 (diff) |
exitcodes: get rid of generic "Mount" exit code
Instead, create three new specific exit codes:
* FuseNewServer = 19
* CtlSock = 20
* PanicLogCreate = 21
Diffstat (limited to 'internal/exitcodes')
-rw-r--r-- | internal/exitcodes/exitcodes.go | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/internal/exitcodes/exitcodes.go b/internal/exitcodes/exitcodes.go index 7a2efdb..cba74b6 100644 --- a/internal/exitcodes/exitcodes.go +++ b/internal/exitcodes/exitcodes.go @@ -8,12 +8,12 @@ import ( ) const ( - // Usage error: cli syntax etc + // Usage - usage error like wrong cli syntax, wrong number of parameters. Usage = 1 // 2 is reserved because it is used by Go panic + // 3 is reserved because it was used by earlier gocryptfs version as a generic + // "mount" error. - // Mount is an error on mount - Mount = 3 // CipherDir means that the CIPHERDIR does not exist CipherDir = 6 // Init is an error on filesystem init @@ -26,7 +26,8 @@ const ( MountPoint = 10 // Other error - please inspect the message Other = 11 - // PasswordIncorrect - the password was incorrect + // PasswordIncorrect - the password was incorrect when mounting or when + // changing the password. PasswordIncorrect = 12 // ScryptParams means that scrypt was called with invalid parameters ScryptParams = 13 @@ -35,12 +36,20 @@ const ( MasterKey = 14 // SigInt means we got SIGINT SigInt = 15 - // PanicLog means the panic log was not empty when we were unmounted - PanicLog = 16 + // PanicLogNotEmpty means the panic log was not empty when we were unmounted + PanicLogNotEmpty = 16 // ForkChild means forking the worker child failed ForkChild = 17 // OpenSSL means you tried to enable OpenSSL, but we were compiled without it. OpenSSL = 18 + // FuseNewServer - this exit code means that the call to fuse.NewServer failed. + // This usually means that there was a problem executing fusermount, or + // fusermount could not attach the mountpoint to the kernel. + FuseNewServer = 19 + // CtlSock - the control socket file could not be created. + CtlSock = 20 + // PanicLogCreate - there was a problem creating the /tmp/gocryptfs_paniclog.XYZ file. + PanicLogCreate = 21 ) // Err wraps an error with an associated numeric exit code |