A few more lint fixes

libgocryptfs
Jakob Unterwurzacher 6 years ago
parent b764917cd5
commit a4956fa6bf
  1. 1
      internal/cryptocore/gcm_go1.4.go
  2. 1
      internal/cryptocore/gcm_go1.5.go
  3. 2
      internal/stupidgcm/stupidgcm.go
  4. 2
      internal/stupidgcm/without_openssl.go
  5. 4
      internal/syscallcompat/sys_linux.go
  6. 7
      internal/tlog/log.go

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

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

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

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

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

@ -74,15 +74,16 @@ func (l *toggledLogger) Println(v ...interface{}) {
}
}
// Debug messages
// Debug logs debug messages
// Can be enabled by passing "-d"
var Debug *toggledLogger
// Informational message
// Info logs informational message
// Can be disabled by passing "-q"
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.
var Warn *toggledLogger

Loading…
Cancel
Save