diff options
| author | Joe Richey joerichey@google.com <joerichey@google.com> | 2017-06-21 09:52:40 -0700 |
|---|---|---|
| committer | Joe Richey joerichey@google.com <joerichey@google.com> | 2017-06-28 14:06:52 -0700 |
| commit | 77b226a90ef70b77ca556830528c013a23b01e57 (patch) | |
| tree | b351dbb427ed62550f2440b8d56249bdcbbca96a /actions/context.go | |
| parent | 07341f3966675e4875f8cad3c8d86ae502de6d4d (diff) | |
Change error handling to new package
This commit changes the error handing for the crypto, filesystem,
metadata, pam, and util packages to use the error handling library
github.com/pkg/errors. This means elimination of the FSError type, an
increased use of wrapping errors (as opposed to logging), switching
on the Cause() of an error (as opposed to its value), and improving our
integration tests involving TEST_FILESYSTEM_ROOT.
This commit also fixes a few bugs with the keyring code to ensure that
our {Find|Remove|Insert}PolicyKey functions are always operating on the
same keyring. The check for filesystem support has been moved from the
filesystem package to the metadata package. Finally, the API for the
filesystem package has been slightly modified:
* filesystem.AllFilesystems() now returns all the filesystems in
sorted order
* certain path methods are now public
O_SYNC is also removed for writing the metadata. We don't get that much
from syncing the metadata, as the actual file data could also be
corrupted by and IO error. The sync operation is also occasionally very
slow (~3 seconds) and can be unfriendly to battery life.
Change-Id: I392c2655141714b16dfdbc84ac09780072be2cf0
Diffstat (limited to 'actions/context.go')
0 files changed, 0 insertions, 0 deletions