aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-10-24 19:18:13 +0200
committerJakob Unterwurzacher2016-10-24 19:18:13 +0200
commitaeda9721d0150b9b77d9522bb3b4fcd17f2cbbfa (patch)
tree1cded9f7087c0d6d3d8d29fe9a1c5f0ceb3783bc
parentab4de4cbcd235bf1b3466a2a5bfa4d07f0537756 (diff)
Fix misspellings
Close https://github.com/rfjakob/gocryptfs/issues/54
-rw-r--r--cli_args.go4
-rw-r--r--internal/cryptocore/cryptocore_test.go2
-rw-r--r--internal/fusefrontend/file.go2
-rw-r--r--internal/fusefrontend/file_allocate_truncate.go2
-rw-r--r--internal/fusefrontend_reverse/rpath.go2
-rw-r--r--internal/nametransform/diriv.go2
-rw-r--r--sendusr1.go2
-rw-r--r--tests/plaintextnames/plaintextnames_test.go2
8 files changed, 9 insertions, 9 deletions
diff --git a/cli_args.go b/cli_args.go
index 1c9400c..7cc4090 100644
--- a/cli_args.go
+++ b/cli_args.go
@@ -116,12 +116,12 @@ func parseCliOpts() (args argContainer) {
"Setting this to a lower value speeds up mounting but makes the password susceptible to brute-force attacks")
// Ignored otions
var dummyBool bool
- ignoreText := "(ignored for compatability)"
+ ignoreText := "(ignored for compatibility)"
flagSet.BoolVar(&dummyBool, "rw", false, ignoreText)
flagSet.BoolVar(&dummyBool, "nosuid", false, ignoreText)
flagSet.BoolVar(&dummyBool, "nodev", false, ignoreText)
var dummyString string
- flagSet.StringVar(&dummyString, "o", "", "For compatability, all options can be also passed as a comma-separated list to -o.")
+ flagSet.StringVar(&dummyString, "o", "", "For compatibility, all options can be also passed as a comma-separated list to -o.")
// Actual parsing
err = flagSet.Parse(os.Args[1:])
if err == flag.ErrHelp {
diff --git a/internal/cryptocore/cryptocore_test.go b/internal/cryptocore/cryptocore_test.go
index 9da6059..c54eac9 100644
--- a/internal/cryptocore/cryptocore_test.go
+++ b/internal/cryptocore/cryptocore_test.go
@@ -16,7 +16,7 @@ func TestCryptoCoreNew(t *testing.T) {
if c.IVLen != 12 {
t.Fail()
}
- // "New(key, BackendGoGCM, 128)" is tested for Go 1.4 and 1.5+ seperately
+ // "New(key, BackendGoGCM, 128)" is tested for Go 1.4 and 1.5+ separately
}
// "New" should panic on any key not 32 bytes long
diff --git a/internal/fusefrontend/file.go b/internal/fusefrontend/file.go
index e021962..35c898d 100644
--- a/internal/fusefrontend/file.go
+++ b/internal/fusefrontend/file.go
@@ -212,7 +212,7 @@ func (f *file) Read(buf []byte, off int64) (resultData fuse.ReadResult, code fus
// doWrite - encrypt "data" and write it to plaintext offset "off"
//
// Arguments do not have to be block-aligned, read-modify-write is
-// performed internally as neccessary
+// performed internally as necessary
//
// Called by Write() for normal writing,
// and by Truncate() to rewrite the last file block.
diff --git a/internal/fusefrontend/file_allocate_truncate.go b/internal/fusefrontend/file_allocate_truncate.go
index 650e1db..bedbba3 100644
--- a/internal/fusefrontend/file_allocate_truncate.go
+++ b/internal/fusefrontend/file_allocate_truncate.go
@@ -175,7 +175,7 @@ func (f *file) statPlainSize() (uint64, error) {
}
// truncateGrowFile extends a file using seeking or ftruncate performing RMW on
-// the first and last block as neccessary. New blocks in the middle become
+// the first and last block as necessary. New blocks in the middle become
// file holes unless they have been fallocate()'d beforehand.
func (f *file) truncateGrowFile(oldPlainSz uint64, newPlainSz uint64) fuse.Status {
if newPlainSz <= oldPlainSz {
diff --git a/internal/fusefrontend_reverse/rpath.go b/internal/fusefrontend_reverse/rpath.go
index 5288dcd..c8df8fe 100644
--- a/internal/fusefrontend_reverse/rpath.go
+++ b/internal/fusefrontend_reverse/rpath.go
@@ -30,7 +30,7 @@ const (
// derivePathIV derives an IV from an encrypted path by hashing it with sha256
func derivePathIV(path string, purpose ivPurposeType) []byte {
- // Use null byte as separator as it cannot occour in the path
+ // Use null byte as separator as it cannot occur in the path
extended := []byte(path + "\000" + string(purpose))
hash := sha256.Sum256(extended)
return hash[:nametransform.DirIVLen]
diff --git a/internal/nametransform/diriv.go b/internal/nametransform/diriv.go
index 0cc8dd3..30d4b87 100644
--- a/internal/nametransform/diriv.go
+++ b/internal/nametransform/diriv.go
@@ -49,7 +49,7 @@ func ReadDirIVAt(dirfd *os.File) (iv []byte, err error) {
// fdReadDirIV reads and verifies the DirIV from an opened gocryptfs.diriv file.
func fdReadDirIV(fd *os.File) (iv []byte, err error) {
// We want to detect if the file is bigger than DirIVLen, so
- // make the buffer 1 byte bigger than neccessary.
+ // make the buffer 1 byte bigger than necessary.
iv = make([]byte, DirIVLen+1)
n, err := fd.Read(iv)
if err != nil {
diff --git a/sendusr1.go b/sendusr1.go
index 752a8db..0fdcd0e 100644
--- a/sendusr1.go
+++ b/sendusr1.go
@@ -8,7 +8,7 @@ import (
)
// Send signal USR1 to "pid" (usually our parent process). This notifies it
-// that the mounting has completed sucessfully.
+// that the mounting has completed successfully.
func sendUsr1(pid int) {
p, err := os.FindProcess(pid)
if err != nil {
diff --git a/tests/plaintextnames/plaintextnames_test.go b/tests/plaintextnames/plaintextnames_test.go
index 3523c25..cda5149 100644
--- a/tests/plaintextnames/plaintextnames_test.go
+++ b/tests/plaintextnames/plaintextnames_test.go
@@ -32,7 +32,7 @@ func TestFlags(t *testing.T) {
t.Fatal(err)
}
if !cf.IsFeatureFlagSet(configfile.FlagPlaintextNames) {
- t.Error("PlaintextNames flag should be set but isnt")
+ t.Error("PlaintextNames flag should be set but isn't")
}
if cf.IsFeatureFlagSet(configfile.FlagEMENames) || cf.IsFeatureFlagSet(configfile.FlagDirIV) {
t.Error("FlagEMENames and FlagDirIV should be not set")