aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2020-05-09 14:52:07 -0700
committerEric Biggers <ebiggers@google.com>2020-05-09 15:21:31 -0700
commit9383d4be92981a4c956c775479bb48b7eec9db79 (patch)
tree2a075cdaf2ae2dbda1d74e92ea1d97ac6515feed /cmd
parent209a2d1419ea575fd316bd9975fb63e40cce7a77 (diff)
crypto: improve errors
ErrKeyLock: Rename to ErrMlockUlimit for clarity. ErrGetrandomFail: ErrKeyAlloc: ErrKeyFree: ErrNegativeLength: Replace these with one-off unnamed errors because these were all returned in only one place and were never checked for. Also these were all either wrapped backwards or discarded an underlying error, so fix that too.
Diffstat (limited to 'cmd')
-rw-r--r--cmd/fscrypt/errors.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/fscrypt/errors.go b/cmd/fscrypt/errors.go
index 3e5beed..f4f3ddb 100644
--- a/cmd/fscrypt/errors.go
+++ b/cmd/fscrypt/errors.go
@@ -92,7 +92,7 @@ func getErrorSuggestions(err error) string {
switch errors.Cause(err) {
case filesystem.ErrNotSetup:
return fmt.Sprintf(`Run "fscrypt setup %s" to use fscrypt on this filesystem.`, mountpointArg)
- case crypto.ErrKeyLock:
+ case crypto.ErrMlockUlimit:
return `Too much memory was requested to be locked in RAM. The
current limit for this user can be checked with "ulimit
-l". The limit can be modified by either changing the