diff options
| author | Joseph Richey <joerichey@google.com> | 2017-07-18 10:59:40 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-07-18 10:59:40 -0700 |
| commit | 8867856db45abaed8b9e2539ee7c34d99360db56 (patch) | |
| tree | 5895bce36a9dff465057d84819b0d65255e1c702 /cmd | |
| parent | 3d08d9f6891db3ca94337e9b987ef62cba535fe1 (diff) | |
| parent | 17f7dd867d0fd450377c6862c0782483d39ae408 (diff) | |
Merge pull request #22 from google/fix
Fixing fscrypt build system
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/fscrypt/errors.go | 1 | ||||
| -rw-r--r-- | cmd/fscrypt/flags.go | 2 | ||||
| -rw-r--r-- | cmd/fscrypt/keys.go | 2 | ||||
| -rw-r--r-- | cmd/fscrypt/prompt.go | 2 | ||||
| -rw-r--r-- | cmd/fscrypt/strings.go | 2 |
5 files changed, 3 insertions, 6 deletions
diff --git a/cmd/fscrypt/errors.go b/cmd/fscrypt/errors.go index f11ff12..e0875e9 100644 --- a/cmd/fscrypt/errors.go +++ b/cmd/fscrypt/errors.go @@ -42,7 +42,6 @@ const failureExitCode = 1 // Various errors used for the top level user interface var ( - ErrReadingStdin = util.SystemError("read from standard input failed") ErrCanceled = errors.New("operation canceled") ErrNoDesctructiveOps = errors.New("operation would be destructive") ErrMaxPassphrase = util.SystemError("max passphrase length exceeded") diff --git a/cmd/fscrypt/flags.go b/cmd/fscrypt/flags.go index 16412bf..d54a3bd 100644 --- a/cmd/fscrypt/flags.go +++ b/cmd/fscrypt/flags.go @@ -51,7 +51,7 @@ func (b *boolFlag) GetArgName() string { return "" } func (b *boolFlag) GetUsage() string { return b.Usage } func (b *boolFlag) String() string { - if b.Default == false { + if !b.Default { return longDisplay(b) } return longDisplay(b, strconv.FormatBool(b.Default)) diff --git a/cmd/fscrypt/keys.go b/cmd/fscrypt/keys.go index 65360a9..872ca2a 100644 --- a/cmd/fscrypt/keys.go +++ b/cmd/fscrypt/keys.go @@ -87,7 +87,7 @@ func (p passphraseReader) Read(buf []byte) (int, error) { // the passphrase into the key normally. func getPassphraseKey(prompt string) (*crypto.Key, error) { if !quietFlag.Value { - fmt.Printf(prompt) + fmt.Print(prompt) } // Only disable echo if stdin is actually a terminal. diff --git a/cmd/fscrypt/prompt.go b/cmd/fscrypt/prompt.go index 52f8c47..b882c08 100644 --- a/cmd/fscrypt/prompt.go +++ b/cmd/fscrypt/prompt.go @@ -282,7 +282,7 @@ func promptForProtector(options []*actions.ProtectorOption) (int, error) { } if numLoadErrors > 0 { - fmt.Printf(wrapText("NOTE: %d of the %d protectors failed to load. "+loadHelpText, 0)) + fmt.Print(wrapText("NOTE: %d of the %d protectors failed to load. "+loadHelpText, 0)) } for { diff --git a/cmd/fscrypt/strings.go b/cmd/fscrypt/strings.go index b77389f..fb79c38 100644 --- a/cmd/fscrypt/strings.go +++ b/cmd/fscrypt/strings.go @@ -49,8 +49,6 @@ const ( directoryArg = "DIRECTORY" mountpointArg = "MOUNTPOINT" pathArg = "PATH" - archiveArg = "ARCHIVE_FILE" - recoveryCodeArg = "RECOVERY_CODE" mountpointIDArg = mountpointArg + ":ID" ) |