diff options
| author | Michael Vogt <mvo@ubuntu.com> | 2016-10-02 09:08:12 +0200 |
|---|---|---|
| committer | Michael Vogt <mvo@ubuntu.com> | 2016-10-02 09:08:12 +0200 |
| commit | 55184f3b7c73780e02e3611de20ad5b9cb9b8035 (patch) | |
| tree | 261bf40e2886c363ae8cd29408a02aca559b3e31 | |
| parent | e9c6238aad7d829a19c9336f24e9e54b9a7787e4 (diff) | |
add review feedbackfeature/snap-ack-udev
| -rw-r--r-- | cmd/snap/cmd_auto_import.go | 9 | ||||
| -rw-r--r-- | cmd/snap/cmd_auto_import_test.go | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/cmd/snap/cmd_auto_import.go b/cmd/snap/cmd_auto_import.go index 391bae9378..d441fcc8eb 100644 --- a/cmd/snap/cmd_auto_import.go +++ b/cmd/snap/cmd_auto_import.go @@ -33,7 +33,7 @@ import ( "github.com/snapcore/snapd/osutil" ) -const autoImportsName = "auto-imports.asserts" +const autoImportsName = "auto-imports.assert" var mountInfoPath = "/proc/self/mountinfo" @@ -56,10 +56,11 @@ func autoImportCandidates() ([]string, error) { } mountPoint := l[4] mountSrc := l[9] - // FIXME: premature optimization? + // skip internal mounts if !strings.HasPrefix(mountSrc, "/dev/") { continue } + // skip snaps if strings.HasPrefix(mountSrc, "/dev/loop") { continue } @@ -99,9 +100,9 @@ func autoImportFromAllMounts() error { type cmdAutoImport struct{} -var shortAutoImportHelp = i18n.G("Auto import assertions") +var shortAutoImportHelp = i18n.G("Imports assertions from mounted devices") -var longAutoImportHelp = i18n.G("This command imports all assertions from block devices that are called 'auto-imports.assertions'") +var longAutoImportHelp = i18n.G("The auto-import command imports assertions found in the auto-import.assert file in mounted devices.") func init() { cmd := addCommand("auto-import", diff --git a/cmd/snap/cmd_auto_import_test.go b/cmd/snap/cmd_auto_import_test.go index c98f214246..3979628f61 100644 --- a/cmd/snap/cmd_auto_import_test.go +++ b/cmd/snap/cmd_auto_import_test.go @@ -61,7 +61,7 @@ func (s *SnapSuite) TestAutoImportAssertsHappy(c *C) { }) - fakeAssertsFn := filepath.Join(c.MkDir(), "auto-imports.asserts") + fakeAssertsFn := filepath.Join(c.MkDir(), "auto-imports.assert") err := ioutil.WriteFile(fakeAssertsFn, fakeAssertData, 0644) c.Assert(err, IsNil) |
