zsyscall_openbsd_amd64.go 32 KB

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