A few more lint fixes

This commit is contained in:
Jakob Unterwurzacher 2016-10-04 23:30:05 +02:00
parent b764917cd5
commit a4956fa6bf
6 changed files with 10 additions and 7 deletions

View File

@ -11,6 +11,7 @@ import (
) )
const ( const (
// HaveModernGoGCM indicates if Go GCM supports 128-bit nonces
HaveModernGoGCM = false HaveModernGoGCM = false
) )

View File

@ -8,6 +8,7 @@ import (
) )
const ( const (
// HaveModernGoGCM indicates if Go GCM supports 128-bit nonces
HaveModernGoGCM = true HaveModernGoGCM = true
) )

View File

@ -16,7 +16,7 @@ import (
) )
const ( const (
// Has openssl been disabled at compile-time? // BuiltWithoutOpenssl indicates if openssl been disabled at compile-time
BuiltWithoutOpenssl = false BuiltWithoutOpenssl = false
keyLen = 32 keyLen = 32

View File

@ -11,7 +11,7 @@ import (
type stupidGCM struct{} type stupidGCM struct{}
const ( const (
// Has openssl been disabled at compile-time? // BuiltWithoutOpenssl indicates if openssl been disabled at compile-time
BuiltWithoutOpenssl = true BuiltWithoutOpenssl = true
) )

View File

@ -8,7 +8,7 @@ import (
"github.com/rfjakob/gocryptfs/internal/tlog" "github.com/rfjakob/gocryptfs/internal/tlog"
) )
const FALLOC_FL_KEEP_SIZE = 0x01 const _FALLOC_FL_KEEP_SIZE = 0x01
var preallocWarn sync.Once var preallocWarn sync.Once
@ -17,7 +17,7 @@ var preallocWarn sync.Once
// ciphertext block (that would corrupt the block). // ciphertext block (that would corrupt the block).
func EnospcPrealloc(fd int, off int64, len int64) (err error) { func EnospcPrealloc(fd int, off int64, len int64) (err error) {
for { for {
err = syscall.Fallocate(fd, FALLOC_FL_KEEP_SIZE, off, len) err = syscall.Fallocate(fd, _FALLOC_FL_KEEP_SIZE, off, len)
if err == syscall.EINTR { if err == syscall.EINTR {
// fallocate, like many syscalls, can return EINTR. This is not an // fallocate, like many syscalls, can return EINTR. This is not an
// error and just signifies that the operation was interrupted by a // error and just signifies that the operation was interrupted by a

View File

@ -74,15 +74,16 @@ func (l *toggledLogger) Println(v ...interface{}) {
} }
} }
// Debug messages // Debug logs debug messages
// Can be enabled by passing "-d" // Can be enabled by passing "-d"
var Debug *toggledLogger var Debug *toggledLogger
// Informational message // Info logs informational message
// Can be disabled by passing "-q" // Can be disabled by passing "-q"
var Info *toggledLogger var Info *toggledLogger
// A warning, meaning nothing serious by itself but might indicate problems. // Warn logs warnings,
// meaning nothing serious by itself but might indicate problems.
// Passing "-wpanic" will make this function panic after printing the message. // Passing "-wpanic" will make this function panic after printing the message.
var Warn *toggledLogger var Warn *toggledLogger