Fix misspellings

Close https://github.com/rfjakob/gocryptfs/issues/54
This commit is contained in:
Jakob Unterwurzacher 2016-10-24 19:18:13 +02:00
parent ab4de4cbcd
commit aeda9721d0
8 changed files with 9 additions and 9 deletions

View File

@ -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 {

View File

@ -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

View File

@ -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.

View File

@ -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 {

View File

@ -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]

View File

@ -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 {

View File

@ -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 {

View File

@ -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")