summaryrefslogtreecommitdiff
path: root/pkg/spec/spec_linux.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-07-17 18:18:09 +0200
committerGitHub <noreply@github.com>2019-07-17 18:18:09 +0200
commit1c02905ec7af9f63a35ee05e9e9ce594c45c4c58 (patch)
tree9b170922e521f2c10cc3fff262fe6a55afa71a25 /pkg/spec/spec_linux.go
parent04a9cb01fec7a31a6ab4156f369a45399930e418 (diff)
parent2f0ed531c7f90e1d2d51871c68de7c813c4931c4 (diff)
downloadpodman-1c02905ec7af9f63a35ee05e9e9ce594c45c4c58.tar.gz
podman-1c02905ec7af9f63a35ee05e9e9ce594c45c4c58.tar.bz2
podman-1c02905ec7af9f63a35ee05e9e9ce594c45c4c58.zip
Merge pull request #3583 from giuseppe/ulimit-host-not-set
spec: simplify handling of --ulimit host
Diffstat (limited to 'pkg/spec/spec_linux.go')
-rw-r--r--pkg/spec/spec_linux.go42
1 files changed, 0 insertions, 42 deletions
diff --git a/pkg/spec/spec_linux.go b/pkg/spec/spec_linux.go
deleted file mode 100644
index fcdfc5c4e..000000000
--- a/pkg/spec/spec_linux.go
+++ /dev/null
@@ -1,42 +0,0 @@
-//+build linux
-
-package createconfig
-
-import (
- "syscall"
-
- "github.com/pkg/errors"
-)
-
-type systemRlimit struct {
- name string
- value int
-}
-
-var systemLimits = []systemRlimit{
- {"RLIMIT_AS", syscall.RLIMIT_AS},
- {"RLIMIT_CORE", syscall.RLIMIT_CORE},
- {"RLIMIT_CPU", syscall.RLIMIT_CPU},
- {"RLIMIT_DATA", syscall.RLIMIT_DATA},
- {"RLIMIT_FSIZE", syscall.RLIMIT_FSIZE},
- {"RLIMIT_NOFILE", syscall.RLIMIT_NOFILE},
- {"RLIMIT_STACK", syscall.RLIMIT_STACK},
-}
-
-func getHostRlimits() ([]systemUlimit, error) {
- ret := []systemUlimit{}
- for _, i := range systemLimits {
- var l syscall.Rlimit
- if err := syscall.Getrlimit(i.value, &l); err != nil {
- return nil, errors.Wrapf(err, "cannot read limits for %s", i.name)
- }
- s := systemUlimit{
- name: i.name,
- max: l.Max,
- cur: l.Cur,
- }
- ret = append(ret, s)
- }
- return ret, nil
-
-}