summaryrefslogtreecommitdiffhomepage
path: root/pkg/fd
diff options
context:
space:
mode:
authorRobert Tonic <btonic@users.noreply.github.com>2019-09-19 17:10:50 -0400
committerRobert Tonic <btonic@users.noreply.github.com>2019-09-19 17:10:50 -0400
commit46beb919121f02d8bd110a54fb8f6de5dfd2891e (patch)
tree876f84d8883fc7cc57f12d43c99581b0537faa42 /pkg/fd
parentac38a7ead0870118d27d570a8a98a90a7a225a12 (diff)
Fix documentation, clean up seccomp filter installation, rename helpers.
Filter installation has been streamlined and functions renamed. Documentation has been fixed to be standards compliant, and missing documentation added. gofmt has also been applied to modified files.
Diffstat (limited to 'pkg/fd')
-rw-r--r--pkg/fd/fd.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/fd/fd.go b/pkg/fd/fd.go
index 7f1f9d984..24e959944 100644
--- a/pkg/fd/fd.go
+++ b/pkg/fd/fd.go
@@ -17,12 +17,12 @@ package fd
import (
"fmt"
+ "gvisor.dev/gvisor/pkg/unet"
"io"
"os"
"runtime"
"sync/atomic"
"syscall"
- "gvisor.dev/gvisor/pkg/unet"
)
// ReadWriter implements io.ReadWriter, io.ReaderAt, and io.WriterAt for fd. It
@@ -186,8 +186,8 @@ func OpenAt(dir *FD, path string, flags int, mode uint32) (*FD, error) {
return New(f), nil
}
-// OpenUnix Open a Unix Domain Socket and return the file descriptor for it.
-func OpenUnix(path string) (*FD, error) {
+// DialUnix connects to a Unix Domain Socket and return the file descriptor.
+func DialUnix(path string) (*FD, error) {
socket, err := unet.Connect(path, false)
return New(socket.FD()), err
}