sysfs: requires all methods to return syscall.Errno

This forces all syscall functions, notably filesystem, to return numeric
codes as opposed to mapping in two different areas. The result of this
change is better consolidation in call sites of `sysfs.FS`, while
further refactoring is needed to address consolidation of file errors.

Signed-off-by: Adrian Cole <adrian@tetrate.io>
This commit is contained in:
Adrian Cole
2023-03-21 22:20:28 +08:00
parent b384cd70b2
commit 4ea9d1a7b5
65 changed files with 1349 additions and 1279 deletions

View File

@@ -39,6 +39,11 @@ func TestToErrno(t *testing.T) {
input: syscall.EEXIST,
expected: ErrnoExist,
},
{
name: "syscall.EFAULT",
input: syscall.EFAULT,
expected: ErrnoFault,
},
{
name: "syscall.EINTR",
input: syscall.EINTR,