aboutsummaryrefslogtreecommitdiff
path: root/filesystem/filesystem.go
diff options
context:
space:
mode:
authorebiggers <ebiggers@google.com>2019-09-08 19:46:59 -0700
committerJoseph Richey <joerichey@google.com>2019-09-08 19:46:59 -0700
commit6445dad7d66fa6a1867090fcd9602c98863649f6 (patch)
treec0e5209f018a50ee8b0a1277cc7b06266eff18c1 /filesystem/filesystem.go
parent28b29d1c97ffd97671186b5e1fae37b64424f9ee (diff)
Fix various typos and grammatical errors (#141)
These were found by a combination of manual review and a custom script that checks for common errors. Also removed an outdated sentence from the comment for setupBefore().
Diffstat (limited to 'filesystem/filesystem.go')
-rw-r--r--filesystem/filesystem.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go
index 86c168a..f4f9201 100644
--- a/filesystem/filesystem.go
+++ b/filesystem/filesystem.go
@@ -1,5 +1,5 @@
/*
- * filesystem.go - Contains the a functionality for a specific filesystem. This
+ * filesystem.go - Contains the functionality for a specific filesystem. This
* includes the commands to setup the filesystem, apply policies, and locate
* metadata.
*
@@ -207,9 +207,9 @@ func (m *Mount) makeDirectories() error {
return os.Mkdir(m.ProtectorDir(), dirPermissions)
}
-// Setup sets up the filesystem for use with fscrypt, note that this merely
+// Setup sets up the filesystem for use with fscrypt. Note that this merely
// creates the appropriate files on the filesystem. It does not actually modify
-// the filesystem's feature flags. This operation is atomic, it either succeeds
+// the filesystem's feature flags. This operation is atomic; it either succeeds
// or no files in the baseDir are created.
func (m *Mount) Setup() error {
if m.CheckSetup() == nil {
@@ -231,7 +231,7 @@ func (m *Mount) Setup() error {
}
// RemoveAllMetadata removes all the policy and protector metadata from the
-// filesystem. This operation is atomic, it either succeeds or no files in the
+// filesystem. This operation is atomic; it either succeeds or no files in the
// baseDir are removed.
// WARNING: Will cause data loss if the metadata is used to encrypt
// directories (this could include directories on other filesystems).
@@ -274,7 +274,7 @@ func (m *Mount) writeDataAtomic(path string, data []byte) error {
}
// addMetadata writes the metadata structure to the file with the specified
-// path this will overwrite any existing data. The operation is atomic.
+// path. This will overwrite any existing data. The operation is atomic.
func (m *Mount) addMetadata(path string, md metadata.Metadata) error {
if err := md.CheckValidity(); err != nil {
return errors.Wrap(ErrInvalidMetadata, err.Error())
@@ -411,7 +411,7 @@ func (m *Mount) GetProtector(descriptor string) (*Mount, *metadata.ProtectorData
return nil, nil, m.err(errors.Wrapf(ErrLinkExpired, "protector %s", descriptor))
}
-// RemoveProtector deletes the protector metadata (or an link to another
+// RemoveProtector deletes the protector metadata (or a link to another
// filesystem's metadata) from the filesystem storage.
func (m *Mount) RemoveProtector(descriptor string) error {
if err := m.CheckSetup(); err != nil {