change Mseal signature to accept a []byte as first argument

This commit is contained in:
Mauri de Souza Meneguzzo
2024-07-27 06:20:00 -03:00
parent 2dba83fe03
commit de3924e954
2 changed files with 9 additions and 3 deletions

View File

@@ -2592,4 +2592,4 @@ func SchedGetAttr(pid int, flags uint) (*SchedAttr, error) {
}
//sys Cachestat(fd uint, crange *CachestatRange, cstat *Cachestat_t, flags uint) (err error)
//sys Mseal(addr uintptr, len int, flags uint) (err error)
//sys Mseal(b []byte, flags uint) (err error)

View File

@@ -2232,8 +2232,14 @@ func Cachestat(fd uint, crange *CachestatRange, cstat *Cachestat_t, flags uint)
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mseal(addr uintptr, len int, flags uint) (err error) {
_, _, e1 := Syscall(SYS_MSEAL, uintptr(addr), uintptr(len), uintptr(flags))
func Mseal(b []byte, flags uint) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MSEAL, uintptr(_p0), uintptr(len(b)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}