diff options
author | Yuta Hayashibe | 2022-05-04 18:06:20 +0900 |
---|---|---|
committer | rfjakob | 2022-06-26 10:59:06 +0200 |
commit | e9ecff7f07aeb1efe0edec7b4b050ce3c0ef75f8 (patch) | |
tree | 94d0da7da7c22b65ccfa5cc99cb7e9d5e6322d07 /internal | |
parent | c9e4e4f74150d2734496e90a4c442a17b79f52c1 (diff) |
Fix typos
Diffstat (limited to 'internal')
-rw-r--r-- | internal/cryptocore/randsize_test.go | 2 | ||||
-rw-r--r-- | internal/fusefrontend/file.go | 4 | ||||
-rw-r--r-- | internal/inomap/inomap.go | 4 | ||||
-rw-r--r-- | internal/nametransform/badname.go | 2 | ||||
-rw-r--r-- | internal/stupidgcm/openssl.go | 2 | ||||
-rw-r--r-- | internal/stupidgcm/prefer.go | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/internal/cryptocore/randsize_test.go b/internal/cryptocore/randsize_test.go index 1db4745..ed91d4f 100644 --- a/internal/cryptocore/randsize_test.go +++ b/internal/cryptocore/randsize_test.go @@ -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 diff --git a/internal/fusefrontend/file.go b/internal/fusefrontend/file.go index 3ce1b1e..2f111fd 100644 --- a/internal/fusefrontend/file.go +++ b/internal/fusefrontend/file.go @@ -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 } diff --git a/internal/inomap/inomap.go b/internal/inomap/inomap.go index 997ea9b..070fab4 100644 --- a/internal/inomap/inomap.go +++ b/internal/inomap/inomap.go @@ -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) diff --git a/internal/nametransform/badname.go b/internal/nametransform/badname.go index 6e77561..28bc028 100644 --- a/internal/nametransform/badname.go +++ b/internal/nametransform/badname.go @@ -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++ diff --git a/internal/stupidgcm/openssl.go b/internal/stupidgcm/openssl.go index ae0ee5c..b46fba8 100644 --- a/internal/stupidgcm/openssl.go +++ b/internal/stupidgcm/openssl.go @@ -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() } diff --git a/internal/stupidgcm/prefer.go b/internal/stupidgcm/prefer.go index bb613c3..fe8c613 100644 --- a/internal/stupidgcm/prefer.go +++ b/internal/stupidgcm/prefer.go @@ -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 } |