Home | History | Annotate | Download | only in syscall
      1 // mksyscall.pl -dragonfly syscall_bsd.go syscall_dragonfly.go syscall_dragonfly_amd64.go
      2 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
      3 
      4 // +build amd64,dragonfly
      5 
      6 package syscall
      7 
      8 import "unsafe"
      9 
     10 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
     11 
     12 func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
     13 	r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
     14 	n = int(r0)
     15 	if e1 != 0 {
     16 		err = errnoErr(e1)
     17 	}
     18 	return
     19 }
     20 
     21 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
     22 
     23 func setgroups(ngid int, gid *_Gid_t) (err error) {
     24 	_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
     25 	if e1 != 0 {
     26 		err = errnoErr(e1)
     27 	}
     28 	return
     29 }
     30 
     31 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
     32 
     33 func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
     34 	r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
     35 	wpid = int(r0)
     36 	if e1 != 0 {
     37 		err = errnoErr(e1)
     38 	}
     39 	return
     40 }
     41 
     42 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
     43 
     44 func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
     45 	r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
     46 	fd = int(r0)
     47 	if e1 != 0 {
     48 		err = errnoErr(e1)
     49 	}
     50 	return
     51 }
     52 
     53 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
     54 
     55 func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
     56 	_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
     57 	if e1 != 0 {
     58 		err = errnoErr(e1)
     59 	}
     60 	return
     61 }
     62 
     63 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
     64 
     65 func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
     66 	_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
     67 	if e1 != 0 {
     68 		err = errnoErr(e1)
     69 	}
     70 	return
     71 }
     72 
     73 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
     74 
     75 func socket(domain int, typ int, proto int) (fd int, err error) {
     76 	r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
     77 	fd = int(r0)
     78 	if e1 != 0 {
     79 		err = errnoErr(e1)
     80 	}
     81 	return
     82 }
     83 
     84 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
     85 
     86 func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
     87 	_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
     88 	if e1 != 0 {
     89 		err = errnoErr(e1)
     90 	}
     91 	return
     92 }
     93 
     94 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
     95 
     96 func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
     97 	_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
     98 	if e1 != 0 {
     99 		err = errnoErr(e1)
    100 	}
    101 	return
    102 }
    103 
    104 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    105 
    106 func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
    107 	_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
    108 	if e1 != 0 {
    109 		err = errnoErr(e1)
    110 	}
    111 	return
    112 }
    113 
    114 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    115 
    116 func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
    117 	_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
    118 	if e1 != 0 {
    119 		err = errnoErr(e1)
    120 	}
    121 	return
    122 }
    123 
    124 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    125 
    126 func Shutdown(s int, how int) (err error) {
    127 	_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
    128 	if e1 != 0 {
    129 		err = errnoErr(e1)
    130 	}
    131 	return
    132 }
    133 
    134 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    135 
    136 func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
    137 	_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
    138 	if e1 != 0 {
    139 		err = errnoErr(e1)
    140 	}
    141 	return
    142 }
    143 
    144 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    145 
    146 func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
    147 	var _p0 unsafe.Pointer
    148 	if len(p) > 0 {
    149 		_p0 = unsafe.Pointer(&p[0])
    150 	} else {
    151 		_p0 = unsafe.Pointer(&_zero)
    152 	}
    153 	r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
    154 	n = int(r0)
    155 	if e1 != 0 {
    156 		err = errnoErr(e1)
    157 	}
    158 	return
    159 }
    160 
    161 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    162 
    163 func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
    164 	var _p0 unsafe.Pointer
    165 	if len(buf) > 0 {
    166 		_p0 = unsafe.Pointer(&buf[0])
    167 	} else {
    168 		_p0 = unsafe.Pointer(&_zero)
    169 	}
    170 	_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
    171 	if e1 != 0 {
    172 		err = errnoErr(e1)
    173 	}
    174 	return
    175 }
    176 
    177 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    178 
    179 func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
    180 	r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
    181 	n = int(r0)
    182 	if e1 != 0 {
    183 		err = errnoErr(e1)
    184 	}
    185 	return
    186 }
    187 
    188 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    189 
    190 func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
    191 	r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
    192 	n = int(r0)
    193 	if e1 != 0 {
    194 		err = errnoErr(e1)
    195 	}
    196 	return
    197 }
    198 
    199 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    200 
    201 func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
    202 	r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
    203 	n = int(r0)
    204 	if e1 != 0 {
    205 		err = errnoErr(e1)
    206 	}
    207 	return
    208 }
    209 
    210 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    211 
    212 func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
    213 	var _p0 unsafe.Pointer
    214 	if len(mib) > 0 {
    215 		_p0 = unsafe.Pointer(&mib[0])
    216 	} else {
    217 		_p0 = unsafe.Pointer(&_zero)
    218 	}
    219 	_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
    220 	if e1 != 0 {
    221 		err = errnoErr(e1)
    222 	}
    223 	return
    224 }
    225 
    226 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    227 
    228 func utimes(path string, timeval *[2]Timeval) (err error) {
    229 	var _p0 *byte
    230 	_p0, err = BytePtrFromString(path)
    231 	if err != nil {
    232 		return
    233 	}
    234 	_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
    235 	use(unsafe.Pointer(_p0))
    236 	if e1 != 0 {
    237 		err = errnoErr(e1)
    238 	}
    239 	return
    240 }
    241 
    242 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    243 
    244 func futimes(fd int, timeval *[2]Timeval) (err error) {
    245 	_, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
    246 	if e1 != 0 {
    247 		err = errnoErr(e1)
    248 	}
    249 	return
    250 }
    251 
    252 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    253 
    254 func fcntl(fd int, cmd int, arg int) (val int, err error) {
    255 	r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
    256 	val = int(r0)
    257 	if e1 != 0 {
    258 		err = errnoErr(e1)
    259 	}
    260 	return
    261 }
    262 
    263 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    264 
    265 func pipe() (r int, w int, err error) {
    266 	r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
    267 	r = int(r0)
    268 	w = int(r1)
    269 	if e1 != 0 {
    270 		err = errnoErr(e1)
    271 	}
    272 	return
    273 }
    274 
    275 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    276 
    277 func extpread(fd int, p []byte, flags int, offset int64) (n int, err error) {
    278 	var _p0 unsafe.Pointer
    279 	if len(p) > 0 {
    280 		_p0 = unsafe.Pointer(&p[0])
    281 	} else {
    282 		_p0 = unsafe.Pointer(&_zero)
    283 	}
    284 	r0, _, e1 := Syscall6(SYS_EXTPREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(offset), 0)
    285 	n = int(r0)
    286 	if e1 != 0 {
    287 		err = errnoErr(e1)
    288 	}
    289 	return
    290 }
    291 
    292 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    293 
    294 func extpwrite(fd int, p []byte, flags int, offset int64) (n int, err error) {
    295 	var _p0 unsafe.Pointer
    296 	if len(p) > 0 {
    297 		_p0 = unsafe.Pointer(&p[0])
    298 	} else {
    299 		_p0 = unsafe.Pointer(&_zero)
    300 	}
    301 	r0, _, e1 := Syscall6(SYS_EXTPWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(offset), 0)
    302 	n = int(r0)
    303 	if e1 != 0 {
    304 		err = errnoErr(e1)
    305 	}
    306 	return
    307 }
    308 
    309 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    310 
    311 func Access(path string, mode uint32) (err error) {
    312 	var _p0 *byte
    313 	_p0, err = BytePtrFromString(path)
    314 	if err != nil {
    315 		return
    316 	}
    317 	_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
    318 	use(unsafe.Pointer(_p0))
    319 	if e1 != 0 {
    320 		err = errnoErr(e1)
    321 	}
    322 	return
    323 }
    324 
    325 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    326 
    327 func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
    328 	_, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
    329 	if e1 != 0 {
    330 		err = errnoErr(e1)
    331 	}
    332 	return
    333 }
    334 
    335 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    336 
    337 func Chdir(path string) (err error) {
    338 	var _p0 *byte
    339 	_p0, err = BytePtrFromString(path)
    340 	if err != nil {
    341 		return
    342 	}
    343 	_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
    344 	use(unsafe.Pointer(_p0))
    345 	if e1 != 0 {
    346 		err = errnoErr(e1)
    347 	}
    348 	return
    349 }
    350 
    351 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    352 
    353 func Chflags(path string, flags int) (err error) {
    354 	var _p0 *byte
    355 	_p0, err = BytePtrFromString(path)
    356 	if err != nil {
    357 		return
    358 	}
    359 	_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
    360 	use(unsafe.Pointer(_p0))
    361 	if e1 != 0 {
    362 		err = errnoErr(e1)
    363 	}
    364 	return
    365 }
    366 
    367 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    368 
    369 func Chmod(path string, mode uint32) (err error) {
    370 	var _p0 *byte
    371 	_p0, err = BytePtrFromString(path)
    372 	if err != nil {
    373 		return
    374 	}
    375 	_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
    376 	use(unsafe.Pointer(_p0))
    377 	if e1 != 0 {
    378 		err = errnoErr(e1)
    379 	}
    380 	return
    381 }
    382 
    383 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    384 
    385 func Chown(path string, uid int, gid int) (err error) {
    386 	var _p0 *byte
    387 	_p0, err = BytePtrFromString(path)
    388 	if err != nil {
    389 		return
    390 	}
    391 	_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
    392 	use(unsafe.Pointer(_p0))
    393 	if e1 != 0 {
    394 		err = errnoErr(e1)
    395 	}
    396 	return
    397 }
    398 
    399 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    400 
    401 func Chroot(path string) (err error) {
    402 	var _p0 *byte
    403 	_p0, err = BytePtrFromString(path)
    404 	if err != nil {
    405 		return
    406 	}
    407 	_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
    408 	use(unsafe.Pointer(_p0))
    409 	if e1 != 0 {
    410 		err = errnoErr(e1)
    411 	}
    412 	return
    413 }
    414 
    415 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    416 
    417 func Close(fd int) (err error) {
    418 	_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
    419 	if e1 != 0 {
    420 		err = errnoErr(e1)
    421 	}
    422 	return
    423 }
    424 
    425 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    426 
    427 func Dup(fd int) (nfd int, err error) {
    428 	r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
    429 	nfd = int(r0)
    430 	if e1 != 0 {
    431 		err = errnoErr(e1)
    432 	}
    433 	return
    434 }
    435 
    436 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    437 
    438 func Dup2(from int, to int) (err error) {
    439 	_, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
    440 	if e1 != 0 {
    441 		err = errnoErr(e1)
    442 	}
    443 	return
    444 }
    445 
    446 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    447 
    448 func Exit(code int) {
    449 	Syscall(SYS_EXIT, uintptr(code), 0, 0)
    450 	return
    451 }
    452 
    453 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    454 
    455 func Fchdir(fd int) (err error) {
    456 	_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
    457 	if e1 != 0 {
    458 		err = errnoErr(e1)
    459 	}
    460 	return
    461 }
    462 
    463 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    464 
    465 func Fchflags(fd int, flags int) (err error) {
    466 	_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
    467 	if e1 != 0 {
    468 		err = errnoErr(e1)
    469 	}
    470 	return
    471 }
    472 
    473 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    474 
    475 func Fchmod(fd int, mode uint32) (err error) {
    476 	_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
    477 	if e1 != 0 {
    478 		err = errnoErr(e1)
    479 	}
    480 	return
    481 }
    482 
    483 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    484 
    485 func Fchown(fd int, uid int, gid int) (err error) {
    486 	_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
    487 	if e1 != 0 {
    488 		err = errnoErr(e1)
    489 	}
    490 	return
    491 }
    492 
    493 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    494 
    495 func Flock(fd int, how int) (err error) {
    496 	_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
    497 	if e1 != 0 {
    498 		err = errnoErr(e1)
    499 	}
    500 	return
    501 }
    502 
    503 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    504 
    505 func Fpathconf(fd int, name int) (val int, err error) {
    506 	r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
    507 	val = int(r0)
    508 	if e1 != 0 {
    509 		err = errnoErr(e1)
    510 	}
    511 	return
    512 }
    513 
    514 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    515 
    516 func Fstat(fd int, stat *Stat_t) (err error) {
    517 	_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
    518 	if e1 != 0 {
    519 		err = errnoErr(e1)
    520 	}
    521 	return
    522 }
    523 
    524 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    525 
    526 func Fstatfs(fd int, stat *Statfs_t) (err error) {
    527 	_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
    528 	if e1 != 0 {
    529 		err = errnoErr(e1)
    530 	}
    531 	return
    532 }
    533 
    534 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    535 
    536 func Fsync(fd int) (err error) {
    537 	_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
    538 	if e1 != 0 {
    539 		err = errnoErr(e1)
    540 	}
    541 	return
    542 }
    543 
    544 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    545 
    546 func Ftruncate(fd int, length int64) (err error) {
    547 	_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length))
    548 	if e1 != 0 {
    549 		err = errnoErr(e1)
    550 	}
    551 	return
    552 }
    553 
    554 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    555 
    556 func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
    557 	var _p0 unsafe.Pointer
    558 	if len(buf) > 0 {
    559 		_p0 = unsafe.Pointer(&buf[0])
    560 	} else {
    561 		_p0 = unsafe.Pointer(&_zero)
    562 	}
    563 	r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
    564 	n = int(r0)
    565 	if e1 != 0 {
    566 		err = errnoErr(e1)
    567 	}
    568 	return
    569 }
    570 
    571 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    572 
    573 func Getdtablesize() (size int) {
    574 	r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
    575 	size = int(r0)
    576 	return
    577 }
    578 
    579 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    580 
    581 func Getegid() (egid int) {
    582 	r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
    583 	egid = int(r0)
    584 	return
    585 }
    586 
    587 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    588 
    589 func Geteuid() (uid int) {
    590 	r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
    591 	uid = int(r0)
    592 	return
    593 }
    594 
    595 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    596 
    597 func Getgid() (gid int) {
    598 	r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
    599 	gid = int(r0)
    600 	return
    601 }
    602 
    603 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    604 
    605 func Getpgid(pid int) (pgid int, err error) {
    606 	r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
    607 	pgid = int(r0)
    608 	if e1 != 0 {
    609 		err = errnoErr(e1)
    610 	}
    611 	return
    612 }
    613 
    614 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    615 
    616 func Getpgrp() (pgrp int) {
    617 	r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
    618 	pgrp = int(r0)
    619 	return
    620 }
    621 
    622 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    623 
    624 func Getpid() (pid int) {
    625 	r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
    626 	pid = int(r0)
    627 	return
    628 }
    629 
    630 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    631 
    632 func Getppid() (ppid int) {
    633 	r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
    634 	ppid = int(r0)
    635 	return
    636 }
    637 
    638 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    639 
    640 func Getpriority(which int, who int) (prio int, err error) {
    641 	r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
    642 	prio = int(r0)
    643 	if e1 != 0 {
    644 		err = errnoErr(e1)
    645 	}
    646 	return
    647 }
    648 
    649 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    650 
    651 func Getrlimit(which int, lim *Rlimit) (err error) {
    652 	_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
    653 	if e1 != 0 {
    654 		err = errnoErr(e1)
    655 	}
    656 	return
    657 }
    658 
    659 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    660 
    661 func Getrusage(who int, rusage *Rusage) (err error) {
    662 	_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
    663 	if e1 != 0 {
    664 		err = errnoErr(e1)
    665 	}
    666 	return
    667 }
    668 
    669 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    670 
    671 func Getsid(pid int) (sid int, err error) {
    672 	r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
    673 	sid = int(r0)
    674 	if e1 != 0 {
    675 		err = errnoErr(e1)
    676 	}
    677 	return
    678 }
    679 
    680 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    681 
    682 func Gettimeofday(tv *Timeval) (err error) {
    683 	_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
    684 	if e1 != 0 {
    685 		err = errnoErr(e1)
    686 	}
    687 	return
    688 }
    689 
    690 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    691 
    692 func Getuid() (uid int) {
    693 	r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
    694 	uid = int(r0)
    695 	return
    696 }
    697 
    698 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    699 
    700 func Issetugid() (tainted bool) {
    701 	r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
    702 	tainted = bool(r0 != 0)
    703 	return
    704 }
    705 
    706 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    707 
    708 func Kill(pid int, signum Signal) (err error) {
    709 	_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
    710 	if e1 != 0 {
    711 		err = errnoErr(e1)
    712 	}
    713 	return
    714 }
    715 
    716 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    717 
    718 func Kqueue() (fd int, err error) {
    719 	r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
    720 	fd = int(r0)
    721 	if e1 != 0 {
    722 		err = errnoErr(e1)
    723 	}
    724 	return
    725 }
    726 
    727 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    728 
    729 func Lchown(path string, uid int, gid int) (err error) {
    730 	var _p0 *byte
    731 	_p0, err = BytePtrFromString(path)
    732 	if err != nil {
    733 		return
    734 	}
    735 	_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
    736 	use(unsafe.Pointer(_p0))
    737 	if e1 != 0 {
    738 		err = errnoErr(e1)
    739 	}
    740 	return
    741 }
    742 
    743 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    744 
    745 func Link(path string, link string) (err error) {
    746 	var _p0 *byte
    747 	_p0, err = BytePtrFromString(path)
    748 	if err != nil {
    749 		return
    750 	}
    751 	var _p1 *byte
    752 	_p1, err = BytePtrFromString(link)
    753 	if err != nil {
    754 		return
    755 	}
    756 	_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
    757 	use(unsafe.Pointer(_p0))
    758 	use(unsafe.Pointer(_p1))
    759 	if e1 != 0 {
    760 		err = errnoErr(e1)
    761 	}
    762 	return
    763 }
    764 
    765 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    766 
    767 func Listen(s int, backlog int) (err error) {
    768 	_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
    769 	if e1 != 0 {
    770 		err = errnoErr(e1)
    771 	}
    772 	return
    773 }
    774 
    775 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    776 
    777 func Lstat(path string, stat *Stat_t) (err error) {
    778 	var _p0 *byte
    779 	_p0, err = BytePtrFromString(path)
    780 	if err != nil {
    781 		return
    782 	}
    783 	_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
    784 	use(unsafe.Pointer(_p0))
    785 	if e1 != 0 {
    786 		err = errnoErr(e1)
    787 	}
    788 	return
    789 }
    790 
    791 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    792 
    793 func Mkdir(path string, mode uint32) (err error) {
    794 	var _p0 *byte
    795 	_p0, err = BytePtrFromString(path)
    796 	if err != nil {
    797 		return
    798 	}
    799 	_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
    800 	use(unsafe.Pointer(_p0))
    801 	if e1 != 0 {
    802 		err = errnoErr(e1)
    803 	}
    804 	return
    805 }
    806 
    807 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    808 
    809 func Mkfifo(path string, mode uint32) (err error) {
    810 	var _p0 *byte
    811 	_p0, err = BytePtrFromString(path)
    812 	if err != nil {
    813 		return
    814 	}
    815 	_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
    816 	use(unsafe.Pointer(_p0))
    817 	if e1 != 0 {
    818 		err = errnoErr(e1)
    819 	}
    820 	return
    821 }
    822 
    823 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    824 
    825 func Mknod(path string, mode uint32, dev int) (err error) {
    826 	var _p0 *byte
    827 	_p0, err = BytePtrFromString(path)
    828 	if err != nil {
    829 		return
    830 	}
    831 	_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
    832 	use(unsafe.Pointer(_p0))
    833 	if e1 != 0 {
    834 		err = errnoErr(e1)
    835 	}
    836 	return
    837 }
    838 
    839 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    840 
    841 func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
    842 	_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
    843 	if e1 != 0 {
    844 		err = errnoErr(e1)
    845 	}
    846 	return
    847 }
    848 
    849 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    850 
    851 func Open(path string, mode int, perm uint32) (fd int, err error) {
    852 	var _p0 *byte
    853 	_p0, err = BytePtrFromString(path)
    854 	if err != nil {
    855 		return
    856 	}
    857 	r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
    858 	use(unsafe.Pointer(_p0))
    859 	fd = int(r0)
    860 	if e1 != 0 {
    861 		err = errnoErr(e1)
    862 	}
    863 	return
    864 }
    865 
    866 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    867 
    868 func Pathconf(path string, name int) (val int, err error) {
    869 	var _p0 *byte
    870 	_p0, err = BytePtrFromString(path)
    871 	if err != nil {
    872 		return
    873 	}
    874 	r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
    875 	use(unsafe.Pointer(_p0))
    876 	val = int(r0)
    877 	if e1 != 0 {
    878 		err = errnoErr(e1)
    879 	}
    880 	return
    881 }
    882 
    883 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    884 
    885 func read(fd int, p []byte) (n int, err error) {
    886 	var _p0 unsafe.Pointer
    887 	if len(p) > 0 {
    888 		_p0 = unsafe.Pointer(&p[0])
    889 	} else {
    890 		_p0 = unsafe.Pointer(&_zero)
    891 	}
    892 	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
    893 	n = int(r0)
    894 	if e1 != 0 {
    895 		err = errnoErr(e1)
    896 	}
    897 	return
    898 }
    899 
    900 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    901 
    902 func Readlink(path string, buf []byte) (n int, err error) {
    903 	var _p0 *byte
    904 	_p0, err = BytePtrFromString(path)
    905 	if err != nil {
    906 		return
    907 	}
    908 	var _p1 unsafe.Pointer
    909 	if len(buf) > 0 {
    910 		_p1 = unsafe.Pointer(&buf[0])
    911 	} else {
    912 		_p1 = unsafe.Pointer(&_zero)
    913 	}
    914 	r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
    915 	use(unsafe.Pointer(_p0))
    916 	n = int(r0)
    917 	if e1 != 0 {
    918 		err = errnoErr(e1)
    919 	}
    920 	return
    921 }
    922 
    923 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    924 
    925 func Rename(from string, to string) (err error) {
    926 	var _p0 *byte
    927 	_p0, err = BytePtrFromString(from)
    928 	if err != nil {
    929 		return
    930 	}
    931 	var _p1 *byte
    932 	_p1, err = BytePtrFromString(to)
    933 	if err != nil {
    934 		return
    935 	}
    936 	_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
    937 	use(unsafe.Pointer(_p0))
    938 	use(unsafe.Pointer(_p1))
    939 	if e1 != 0 {
    940 		err = errnoErr(e1)
    941 	}
    942 	return
    943 }
    944 
    945 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    946 
    947 func Revoke(path string) (err error) {
    948 	var _p0 *byte
    949 	_p0, err = BytePtrFromString(path)
    950 	if err != nil {
    951 		return
    952 	}
    953 	_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
    954 	use(unsafe.Pointer(_p0))
    955 	if e1 != 0 {
    956 		err = errnoErr(e1)
    957 	}
    958 	return
    959 }
    960 
    961 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    962 
    963 func Rmdir(path string) (err error) {
    964 	var _p0 *byte
    965 	_p0, err = BytePtrFromString(path)
    966 	if err != nil {
    967 		return
    968 	}
    969 	_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
    970 	use(unsafe.Pointer(_p0))
    971 	if e1 != 0 {
    972 		err = errnoErr(e1)
    973 	}
    974 	return
    975 }
    976 
    977 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    978 
    979 func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
    980 	r0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0)
    981 	newoffset = int64(r0)
    982 	if e1 != 0 {
    983 		err = errnoErr(e1)
    984 	}
    985 	return
    986 }
    987 
    988 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    989 
    990 func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
    991 	_, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
    992 	if e1 != 0 {
    993 		err = errnoErr(e1)
    994 	}
    995 	return
    996 }
    997 
    998 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    999 
   1000 func Setegid(egid int) (err error) {
   1001 	_, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
   1002 	if e1 != 0 {
   1003 		err = errnoErr(e1)
   1004 	}
   1005 	return
   1006 }
   1007 
   1008 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1009 
   1010 func Seteuid(euid int) (err error) {
   1011 	_, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
   1012 	if e1 != 0 {
   1013 		err = errnoErr(e1)
   1014 	}
   1015 	return
   1016 }
   1017 
   1018 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1019 
   1020 func Setgid(gid int) (err error) {
   1021 	_, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
   1022 	if e1 != 0 {
   1023 		err = errnoErr(e1)
   1024 	}
   1025 	return
   1026 }
   1027 
   1028 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1029 
   1030 func Setlogin(name string) (err error) {
   1031 	var _p0 *byte
   1032 	_p0, err = BytePtrFromString(name)
   1033 	if err != nil {
   1034 		return
   1035 	}
   1036 	_, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
   1037 	use(unsafe.Pointer(_p0))
   1038 	if e1 != 0 {
   1039 		err = errnoErr(e1)
   1040 	}
   1041 	return
   1042 }
   1043 
   1044 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1045 
   1046 func Setpgid(pid int, pgid int) (err error) {
   1047 	_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
   1048 	if e1 != 0 {
   1049 		err = errnoErr(e1)
   1050 	}
   1051 	return
   1052 }
   1053 
   1054 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1055 
   1056 func Setpriority(which int, who int, prio int) (err error) {
   1057 	_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
   1058 	if e1 != 0 {
   1059 		err = errnoErr(e1)
   1060 	}
   1061 	return
   1062 }
   1063 
   1064 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1065 
   1066 func Setregid(rgid int, egid int) (err error) {
   1067 	_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
   1068 	if e1 != 0 {
   1069 		err = errnoErr(e1)
   1070 	}
   1071 	return
   1072 }
   1073 
   1074 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1075 
   1076 func Setreuid(ruid int, euid int) (err error) {
   1077 	_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
   1078 	if e1 != 0 {
   1079 		err = errnoErr(e1)
   1080 	}
   1081 	return
   1082 }
   1083 
   1084 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1085 
   1086 func Setrlimit(which int, lim *Rlimit) (err error) {
   1087 	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
   1088 	if e1 != 0 {
   1089 		err = errnoErr(e1)
   1090 	}
   1091 	return
   1092 }
   1093 
   1094 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1095 
   1096 func Setsid() (pid int, err error) {
   1097 	r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
   1098 	pid = int(r0)
   1099 	if e1 != 0 {
   1100 		err = errnoErr(e1)
   1101 	}
   1102 	return
   1103 }
   1104 
   1105 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1106 
   1107 func Settimeofday(tp *Timeval) (err error) {
   1108 	_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
   1109 	if e1 != 0 {
   1110 		err = errnoErr(e1)
   1111 	}
   1112 	return
   1113 }
   1114 
   1115 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1116 
   1117 func Setuid(uid int) (err error) {
   1118 	_, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
   1119 	if e1 != 0 {
   1120 		err = errnoErr(e1)
   1121 	}
   1122 	return
   1123 }
   1124 
   1125 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1126 
   1127 func Stat(path string, stat *Stat_t) (err error) {
   1128 	var _p0 *byte
   1129 	_p0, err = BytePtrFromString(path)
   1130 	if err != nil {
   1131 		return
   1132 	}
   1133 	_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
   1134 	use(unsafe.Pointer(_p0))
   1135 	if e1 != 0 {
   1136 		err = errnoErr(e1)
   1137 	}
   1138 	return
   1139 }
   1140 
   1141 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1142 
   1143 func Statfs(path string, stat *Statfs_t) (err error) {
   1144 	var _p0 *byte
   1145 	_p0, err = BytePtrFromString(path)
   1146 	if err != nil {
   1147 		return
   1148 	}
   1149 	_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
   1150 	use(unsafe.Pointer(_p0))
   1151 	if e1 != 0 {
   1152 		err = errnoErr(e1)
   1153 	}
   1154 	return
   1155 }
   1156 
   1157 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1158 
   1159 func Symlink(path string, link string) (err error) {
   1160 	var _p0 *byte
   1161 	_p0, err = BytePtrFromString(path)
   1162 	if err != nil {
   1163 		return
   1164 	}
   1165 	var _p1 *byte
   1166 	_p1, err = BytePtrFromString(link)
   1167 	if err != nil {
   1168 		return
   1169 	}
   1170 	_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
   1171 	use(unsafe.Pointer(_p0))
   1172 	use(unsafe.Pointer(_p1))
   1173 	if e1 != 0 {
   1174 		err = errnoErr(e1)
   1175 	}
   1176 	return
   1177 }
   1178 
   1179 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1180 
   1181 func Sync() (err error) {
   1182 	_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
   1183 	if e1 != 0 {
   1184 		err = errnoErr(e1)
   1185 	}
   1186 	return
   1187 }
   1188 
   1189 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1190 
   1191 func Truncate(path string, length int64) (err error) {
   1192 	var _p0 *byte
   1193 	_p0, err = BytePtrFromString(path)
   1194 	if err != nil {
   1195 		return
   1196 	}
   1197 	_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length))
   1198 	use(unsafe.Pointer(_p0))
   1199 	if e1 != 0 {
   1200 		err = errnoErr(e1)
   1201 	}
   1202 	return
   1203 }
   1204 
   1205 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1206 
   1207 func Umask(newmask int) (oldmask int) {
   1208 	r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
   1209 	oldmask = int(r0)
   1210 	return
   1211 }
   1212 
   1213 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1214 
   1215 func Undelete(path string) (err error) {
   1216 	var _p0 *byte
   1217 	_p0, err = BytePtrFromString(path)
   1218 	if err != nil {
   1219 		return
   1220 	}
   1221 	_, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
   1222 	use(unsafe.Pointer(_p0))
   1223 	if e1 != 0 {
   1224 		err = errnoErr(e1)
   1225 	}
   1226 	return
   1227 }
   1228 
   1229 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1230 
   1231 func Unlink(path string) (err error) {
   1232 	var _p0 *byte
   1233 	_p0, err = BytePtrFromString(path)
   1234 	if err != nil {
   1235 		return
   1236 	}
   1237 	_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
   1238 	use(unsafe.Pointer(_p0))
   1239 	if e1 != 0 {
   1240 		err = errnoErr(e1)
   1241 	}
   1242 	return
   1243 }
   1244 
   1245 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1246 
   1247 func Unmount(path string, flags int) (err error) {
   1248 	var _p0 *byte
   1249 	_p0, err = BytePtrFromString(path)
   1250 	if err != nil {
   1251 		return
   1252 	}
   1253 	_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
   1254 	use(unsafe.Pointer(_p0))
   1255 	if e1 != 0 {
   1256 		err = errnoErr(e1)
   1257 	}
   1258 	return
   1259 }
   1260 
   1261 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1262 
   1263 func write(fd int, p []byte) (n int, err error) {
   1264 	var _p0 unsafe.Pointer
   1265 	if len(p) > 0 {
   1266 		_p0 = unsafe.Pointer(&p[0])
   1267 	} else {
   1268 		_p0 = unsafe.Pointer(&_zero)
   1269 	}
   1270 	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
   1271 	n = int(r0)
   1272 	if e1 != 0 {
   1273 		err = errnoErr(e1)
   1274 	}
   1275 	return
   1276 }
   1277 
   1278 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1279 
   1280 func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
   1281 	r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0)
   1282 	ret = uintptr(r0)
   1283 	if e1 != 0 {
   1284 		err = errnoErr(e1)
   1285 	}
   1286 	return
   1287 }
   1288 
   1289 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1290 
   1291 func munmap(addr uintptr, length uintptr) (err error) {
   1292 	_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
   1293 	if e1 != 0 {
   1294 		err = errnoErr(e1)
   1295 	}
   1296 	return
   1297 }
   1298 
   1299 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1300 
   1301 func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
   1302 	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
   1303 	n = int(r0)
   1304 	if e1 != 0 {
   1305 		err = errnoErr(e1)
   1306 	}
   1307 	return
   1308 }
   1309 
   1310 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
   1311 
   1312 func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
   1313 	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
   1314 	n = int(r0)
   1315 	if e1 != 0 {
   1316 		err = errnoErr(e1)
   1317 	}
   1318 	return
   1319 }
   1320