mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
`//pkg/tcpip/link/rawfile` is a package to deal with raw socket and file FDs. It is not only used for Netstack, but rather just generally useful raw file manipulation stuff. This change removes the Unix-error-to-`//pkg/tcpip`-error translation step from its functions; this is now the responsibility of its callers. Callers within Netstack now do the translation by themselves; the translation function is moved to `//pkg/tcpip`. This allows the `//pkg/tcpip/link/rawfile` package to not depend on `//pkg/tcpip`, which in turn means the `//pkg/eventfd` package (which depends on `rawfile`) no longer transitively depends on `//pkg/tcpip`, which in turns means the `//pkg/unet` package (which depends on `//pkg/eventfd`) no longer transitively depends on `//pkg/tcpip`, which in turns means that the `//pkg/eventchannel` package (which depends on `//pkg/unet`) no longer transitively depends on `//pkg/tcpip`, which in turns means that the `//pkg/metric` package (which depends on `//pkg/eventchannel`) no longer transitively depends on `//pkg/tcpip`, which finally means that the `//pkg/metric` package can be used within `//pkg/tcpip`. \o/ This changes does not make it use it, it just moves `rawfile`. PiperOrigin-RevId: 647943618
20 lines
461 B
Python
20 lines
461 B
Python
load("//tools:defs.bzl", "go_library")
|
|
|
|
package(
|
|
default_applicable_licenses = ["//:license"],
|
|
licenses = ["notice"],
|
|
)
|
|
|
|
go_library(
|
|
name = "rawfile",
|
|
srcs = [
|
|
"blockingpoll_amd64.s",
|
|
"blockingpoll_arm64.s",
|
|
"blockingpoll_noyield_unsafe.go",
|
|
"blockingpoll_yield_unsafe.go",
|
|
"rawfile_unsafe.go",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
deps = ["@org_golang_x_sys//unix:go_default_library"],
|
|
)
|