Commit 36fe436c authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys Committed by Brad Fitzpatrick

pkg/syscall: unexport Prlimit.

This syscall was inadvertently exported when fixing
Getrlimit/Setrlimit on 32-bit platforms.

R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/6458051
parent 20d9fd3a
...@@ -839,7 +839,7 @@ func Mount(source string, target string, fstype string, flags uintptr, data stri ...@@ -839,7 +839,7 @@ func Mount(source string, target string, fstype string, flags uintptr, data stri
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error) //sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
//sys Pause() (err error) //sys Pause() (err error)
//sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT //sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT
//sysnb Prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) = SYS_PRLIMIT64 //sysnb prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) = SYS_PRLIMIT64
//sys Read(fd int, p []byte) (n int, err error) //sys Read(fd int, p []byte) (n int, err error)
//sys Readlink(path string, buf []byte) (n int, err error) //sys Readlink(path string, buf []byte) (n int, err error)
//sys Rename(oldpath string, newpath string) (err error) //sys Rename(oldpath string, newpath string) (err error)
......
...@@ -78,7 +78,7 @@ const rlimInf32 = ^uint32(0) ...@@ -78,7 +78,7 @@ const rlimInf32 = ^uint32(0)
const rlimInf64 = ^uint64(0) const rlimInf64 = ^uint64(0)
func Getrlimit(resource int, rlim *Rlimit) (err error) { func Getrlimit(resource int, rlim *Rlimit) (err error) {
err = Prlimit(0, resource, rlim, nil) err = prlimit(0, resource, rlim, nil)
if err != ENOSYS { if err != ENOSYS {
return err return err
} }
...@@ -106,7 +106,7 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) { ...@@ -106,7 +106,7 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT //sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
func Setrlimit(resource int, rlim *Rlimit) (err error) { func Setrlimit(resource int, rlim *Rlimit) (err error) {
err = Prlimit(0, resource, nil, rlim) err = prlimit(0, resource, nil, rlim)
if err != ENOSYS { if err != ENOSYS {
return err return err
} }
......
...@@ -98,7 +98,7 @@ const rlimInf32 = ^uint32(0) ...@@ -98,7 +98,7 @@ const rlimInf32 = ^uint32(0)
const rlimInf64 = ^uint64(0) const rlimInf64 = ^uint64(0)
func Getrlimit(resource int, rlim *Rlimit) (err error) { func Getrlimit(resource int, rlim *Rlimit) (err error) {
err = Prlimit(0, resource, rlim, nil) err = prlimit(0, resource, rlim, nil)
if err != ENOSYS { if err != ENOSYS {
return err return err
} }
...@@ -126,7 +126,7 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) { ...@@ -126,7 +126,7 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT //sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
func Setrlimit(resource int, rlim *Rlimit) (err error) { func Setrlimit(resource int, rlim *Rlimit) (err error) {
err = Prlimit(0, resource, nil, rlim) err = prlimit(0, resource, nil, rlim)
if err != ENOSYS { if err != ENOSYS {
return err return err
} }
......
...@@ -598,7 +598,7 @@ func PivotRoot(newroot string, putold string) (err error) { ...@@ -598,7 +598,7 @@ func PivotRoot(newroot string, putold string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) { func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) {
_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0) _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0)
if e1 != 0 { if e1 != 0 {
err = e1 err = e1
......
...@@ -598,7 +598,7 @@ func PivotRoot(newroot string, putold string) (err error) { ...@@ -598,7 +598,7 @@ func PivotRoot(newroot string, putold string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) { func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) {
_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0) _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0)
if e1 != 0 { if e1 != 0 {
err = e1 err = e1
......
...@@ -598,7 +598,7 @@ func PivotRoot(newroot string, putold string) (err error) { ...@@ -598,7 +598,7 @@ func PivotRoot(newroot string, putold string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) { func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) {
_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0) _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0)
if e1 != 0 { if e1 != 0 {
err = e1 err = e1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment