Skip to content

Commit

Permalink
make get and set work
Browse files Browse the repository at this point in the history
Signed-off-by: Brian Downs <[email protected]>
  • Loading branch information
briandowns committed Sep 9, 2022
1 parent 5fcf74b commit b4c5741
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions jail.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ func Set(params Params, flags uintptr) error {
return err
}

return getSet(sysJailSet, iov, flags)
return getSet(sysJailSet, iov[0], flags)
}

// Get retrieves a matching jail based on the provided params.
Expand All @@ -334,11 +334,11 @@ func Get(params Params, flags uintptr) error {
return err
}

return getSet(sysJailGet, iov, flags)
return getSet(sysJailGet, iov[0], flags)
}

// getSet performas the given syscall with the params and flags provided.
func getSet(call int, iov []syscall.Iovec, flags uintptr) error {
func getSet(call int, iov syscall.Iovec, flags uintptr) error {
_, _, e1 := syscall.Syscall(uintptr(call), uintptr(unsafe.Pointer(&iov)), 0, flags)
if e1 != 0 {
switch call {
Expand Down

0 comments on commit b4c5741

Please sign in to comment.