Fix typos
This commit is contained in:
parent
c9e4e4f741
commit
e9ecff7f07
@ -334,7 +334,7 @@ func countOpFlags(args *argContainer) int {
|
||||
return count
|
||||
}
|
||||
|
||||
// isFlagPassed finds out if the flag was explictely passed on the command line.
|
||||
// isFlagPassed finds out if the flag was explicitly passed on the command line.
|
||||
// https://stackoverflow.com/a/54747682/1380267
|
||||
func isFlagPassed(flagSet *flag.FlagSet, name string) bool {
|
||||
found := false
|
||||
|
@ -26,7 +26,7 @@ func usage() {
|
||||
them in random order over a single "dst" file while reading the "dst"
|
||||
file concurrently in a loop.
|
||||
|
||||
Progress and errors are reported as they occour in addition to a summary
|
||||
Progress and errors are reported as they occur in addition to a summary
|
||||
printed at the end. cifs and fuse filesystems are known to fail, local
|
||||
filesystems and nfs seem ok.
|
||||
|
||||
|
@ -153,7 +153,7 @@ func Verify(fd int, segments []Segment) (err error) {
|
||||
case SegmentEOF:
|
||||
continue
|
||||
default:
|
||||
log.Panicf("BUG: unkown segment type %d", s.Type)
|
||||
log.Panicf("BUG: unknown segment type %d", s.Type)
|
||||
}
|
||||
for off := s.Offset; off < segments[i+1].Offset; off++ {
|
||||
res, err := syscall.Seek(fd, off, whence)
|
||||
|
@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
/*
|
||||
The troughput we get from /dev/urandom / getentropy depends a lot on the used
|
||||
The throughput we get from /dev/urandom / getentropy depends a lot on the used
|
||||
block size. Results on my Pentium G630 running Linux 4.11:
|
||||
|
||||
BenchmarkRandSize/16-2 3000000 571 ns/op 27.98 MB/s
|
||||
|
@ -207,8 +207,8 @@ func (f *File) doRead(dst []byte, off uint64, length uint64) ([]byte, syscall.Er
|
||||
plaintext, err := f.contentEnc.DecryptBlocks(ciphertext, firstBlockNo, fileID)
|
||||
f.rootNode.contentEnc.CReqPool.Put(ciphertext)
|
||||
if err != nil {
|
||||
curruptBlockNo := firstBlockNo + f.contentEnc.PlainOffToBlockNo(uint64(len(plaintext)))
|
||||
tlog.Warn.Printf("doRead %d: corrupt block #%d: %v", f.qIno.Ino, curruptBlockNo, err)
|
||||
corruptBlockNo := firstBlockNo + f.contentEnc.PlainOffToBlockNo(uint64(len(plaintext)))
|
||||
tlog.Warn.Printf("doRead %d: corrupt block #%d: %v", f.qIno.Ino, corruptBlockNo, err)
|
||||
return nil, syscall.EIO
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
// Each (Dev, Tag) tuple gets a namespace id assigned. The original inode
|
||||
// number is then passed through in the lower 48 bits.
|
||||
//
|
||||
// If namespace ids are exhaused, or the original id is larger than 48 bits,
|
||||
// If namespace ids are exhausted, or the original id is larger than 48 bits,
|
||||
// the whole (Dev, Tag, Ino) tuple gets mapped in the spill map, and the
|
||||
// spill bit is set to 1.
|
||||
package inomap
|
||||
@ -114,7 +114,7 @@ func (m *InoMap) Translate(in QIno) (out uint64) {
|
||||
|
||||
// TranslateStat translates (device, ino) pair contained in "st" into a unique
|
||||
// inode number and overwrites the ino in "st" with it.
|
||||
// Convience wrapper around Translate().
|
||||
// Convenience wrapper around Translate().
|
||||
func (m *InoMap) TranslateStat(st *syscall.Stat_t) {
|
||||
in := QInoFromStat(st)
|
||||
st.Ino = m.Translate(in)
|
||||
|
@ -34,7 +34,7 @@ func (be *NameTransform) EncryptAndHashBadName(name string, iv []byte, dirfd int
|
||||
//file found, return result
|
||||
return lastFoundName, nil
|
||||
}
|
||||
//BadName Mode: check if the name was tranformed without change (badname suffix and undecryptable cipher name)
|
||||
//BadName Mode: check if the name was transformed without change (badname suffix and undecryptable cipher name)
|
||||
err = syscallcompat.Fstatat(dirfd, name[:len(name)-len(BadnameSuffix)], &st, unix.AT_SYMLINK_NOFOLLOW)
|
||||
if err == nil {
|
||||
filesFound++
|
||||
|
@ -117,7 +117,7 @@ func slicePointerOrNull(s []byte) (ptr *C.uchar) {
|
||||
}
|
||||
|
||||
// This functions exists to benchmark the C call overhead from Go.
|
||||
// See BenchmarkCCall for resuts.
|
||||
// See BenchmarkCCall for results.
|
||||
func noopCFunction() {
|
||||
C.noop_c_function()
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ func PreferOpenSSLXchacha20poly1305() bool {
|
||||
if runtime.GOARCH == "amd64" {
|
||||
return false
|
||||
}
|
||||
// On arm64 and arm, OpenSSL is faster. Probably everwhere else too.
|
||||
// On arm64 and arm, OpenSSL is faster. Probably everywhere else too.
|
||||
return true
|
||||
}
|
||||
|
||||
|
@ -951,7 +951,7 @@ func TestInitNotEmpty(t *testing.T) {
|
||||
}
|
||||
|
||||
// TestSharedstorage checks that `-sharedstorage` shows stable inode numbers to
|
||||
// userpsace despite having hard link tracking disabled
|
||||
// userspace despite having hard link tracking disabled
|
||||
func TestSharedstorage(t *testing.T) {
|
||||
dir := test_helpers.InitFS(t)
|
||||
mnt := dir + ".mnt"
|
||||
|
@ -333,7 +333,7 @@ func TestExampleFSv13reverse(t *testing.T) {
|
||||
}
|
||||
dirA = tmpFsPath + dirA
|
||||
// Mount using password
|
||||
// We pass "-wpanic=false" because the '..' and '.' tests deliverately trigger warnings
|
||||
// We pass "-wpanic=false" because the '..' and '.' tests deliberately trigger warnings
|
||||
test_helpers.MountOrFatal(t, dirA, dirB, "-reverse", "-extpass", "echo test", "-wpanic=false", opensslOpt)
|
||||
c := dirB + "/gocryptfs.conf"
|
||||
if !test_helpers.VerifyExistence(t, c) {
|
||||
|
Loading…
Reference in New Issue
Block a user