summaryrefslogtreecommitdiff
path: root/vendor/github.com/cilium/ebpf/pinning.go
diff options
context:
space:
mode:
authorLibravatar dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2023-04-03 11:16:17 +0200
committerLibravatar GitHub <noreply@github.com>2023-04-03 11:16:17 +0200
commit57dc742c76d7876a2457594715a7b5bc2c9a92bd (patch)
tree76be1ec744face5bf4f617d4c9fca084707e4268 /vendor/github.com/cilium/ebpf/pinning.go
parent[bugfix/frontend] Preload css styles (#1638) (diff)
downloadgotosocial-57dc742c76d7876a2457594715a7b5bc2c9a92bd.tar.xz
[chore]: Bump github.com/KimMachineGun/automemlimit from 0.2.4 to 0.2.5 (#1666)
Bumps [github.com/KimMachineGun/automemlimit](https://github.com/KimMachineGun/automemlimit) from 0.2.4 to 0.2.5. - [Release notes](https://github.com/KimMachineGun/automemlimit/releases) - [Commits](https://github.com/KimMachineGun/automemlimit/compare/v0.2.4...v0.2.5) --- updated-dependencies: - dependency-name: github.com/KimMachineGun/automemlimit dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'vendor/github.com/cilium/ebpf/pinning.go')
-rw-r--r--vendor/github.com/cilium/ebpf/pinning.go42
1 files changed, 0 insertions, 42 deletions
diff --git a/vendor/github.com/cilium/ebpf/pinning.go b/vendor/github.com/cilium/ebpf/pinning.go
deleted file mode 100644
index 78812364a..000000000
--- a/vendor/github.com/cilium/ebpf/pinning.go
+++ /dev/null
@@ -1,42 +0,0 @@
-package ebpf
-
-import (
- "errors"
- "fmt"
- "os"
-
- "github.com/cilium/ebpf/internal"
-)
-
-func pin(currentPath, newPath string, fd *internal.FD) error {
- if newPath == "" {
- return errors.New("given pinning path cannot be empty")
- }
- if currentPath == "" {
- return internal.BPFObjPin(newPath, fd)
- }
- if currentPath == newPath {
- return nil
- }
- var err error
- // Object is now moved to the new pinning path.
- if err = os.Rename(currentPath, newPath); err == nil {
- return nil
- }
- if !os.IsNotExist(err) {
- return fmt.Errorf("unable to move pinned object to new path %v: %w", newPath, err)
- }
- // Internal state not in sync with the file system so let's fix it.
- return internal.BPFObjPin(newPath, fd)
-}
-
-func unpin(pinnedPath string) error {
- if pinnedPath == "" {
- return nil
- }
- err := os.Remove(pinnedPath)
- if err == nil || os.IsNotExist(err) {
- return nil
- }
- return err
-}