Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
shirayu authored and rfjakob committed Jun 26, 2022
1 parent c9e4e4f commit e9ecff7
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion cli_args.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion contrib/atomicrename/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion contrib/findholes/holes/holes.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion internal/cryptocore/randsize_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions internal/fusefrontend/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
4 changes: 2 additions & 2 deletions internal/inomap/inomap.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion internal/nametransform/badname.go
Original file line number Diff line number Diff line change
Expand Up @@ -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++
Expand Down
2 changes: 1 addition & 1 deletion internal/stupidgcm/openssl.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
2 changes: 1 addition & 1 deletion internal/stupidgcm/prefer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion tests/cli/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion tests/example_filesystems/example_filesystems_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit e9ecff7

Please sign in to comment.