zsyscall_dragonfly_amd64.go 33 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414
  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. // +build amd64,dragonfly
  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. use(_p0)
  184. if e1 != 0 {
  185. err = errnoErr(e1)
  186. }
  187. return
  188. }
  189. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  190. func utimes(path string, timeval *[2]Timeval) (err error) {
  191. var _p0 *byte
  192. _p0, err = BytePtrFromString(path)
  193. if err != nil {
  194. return
  195. }
  196. _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
  197. use(unsafe.Pointer(_p0))
  198. if e1 != 0 {
  199. err = errnoErr(e1)
  200. }
  201. return
  202. }
  203. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  204. func futimes(fd int, timeval *[2]Timeval) (err error) {
  205. _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
  206. if e1 != 0 {
  207. err = errnoErr(e1)
  208. }
  209. return
  210. }
  211. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  212. func fcntl(fd int, cmd int, arg int) (val int, err error) {
  213. r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
  214. val = int(r0)
  215. if e1 != 0 {
  216. err = errnoErr(e1)
  217. }
  218. return
  219. }
  220. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  221. func pipe() (r int, w int, err error) {
  222. r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
  223. r = int(r0)
  224. w = int(r1)
  225. if e1 != 0 {
  226. err = errnoErr(e1)
  227. }
  228. return
  229. }
  230. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  231. func extpread(fd int, p []byte, flags int, offset int64) (n int, err error) {
  232. var _p0 unsafe.Pointer
  233. if len(p) > 0 {
  234. _p0 = unsafe.Pointer(&p[0])
  235. } else {
  236. _p0 = unsafe.Pointer(&_zero)
  237. }
  238. r0, _, e1 := Syscall6(SYS_EXTPREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(offset), 0)
  239. n = int(r0)
  240. if e1 != 0 {
  241. err = errnoErr(e1)
  242. }
  243. return
  244. }
  245. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  246. func extpwrite(fd int, p []byte, flags int, offset int64) (n int, err error) {
  247. var _p0 unsafe.Pointer
  248. if len(p) > 0 {
  249. _p0 = unsafe.Pointer(&p[0])
  250. } else {
  251. _p0 = unsafe.Pointer(&_zero)
  252. }
  253. r0, _, e1 := Syscall6(SYS_EXTPWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(offset), 0)
  254. n = int(r0)
  255. if e1 != 0 {
  256. err = errnoErr(e1)
  257. }
  258. return
  259. }
  260. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  261. func Access(path string, mode uint32) (err error) {
  262. var _p0 *byte
  263. _p0, err = BytePtrFromString(path)
  264. if err != nil {
  265. return
  266. }
  267. _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  268. use(unsafe.Pointer(_p0))
  269. if e1 != 0 {
  270. err = errnoErr(e1)
  271. }
  272. return
  273. }
  274. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  275. func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
  276. _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
  277. if e1 != 0 {
  278. err = errnoErr(e1)
  279. }
  280. return
  281. }
  282. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  283. func Chdir(path string) (err error) {
  284. var _p0 *byte
  285. _p0, err = BytePtrFromString(path)
  286. if err != nil {
  287. return
  288. }
  289. _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
  290. use(unsafe.Pointer(_p0))
  291. if e1 != 0 {
  292. err = errnoErr(e1)
  293. }
  294. return
  295. }
  296. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  297. func Chflags(path string, flags int) (err error) {
  298. var _p0 *byte
  299. _p0, err = BytePtrFromString(path)
  300. if err != nil {
  301. return
  302. }
  303. _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  304. use(unsafe.Pointer(_p0))
  305. if e1 != 0 {
  306. err = errnoErr(e1)
  307. }
  308. return
  309. }
  310. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  311. func Chmod(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_CHMOD, 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. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  325. func Chown(path string, uid int, gid int) (err error) {
  326. var _p0 *byte
  327. _p0, err = BytePtrFromString(path)
  328. if err != nil {
  329. return
  330. }
  331. _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  332. use(unsafe.Pointer(_p0))
  333. if e1 != 0 {
  334. err = errnoErr(e1)
  335. }
  336. return
  337. }
  338. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  339. func Chroot(path string) (err error) {
  340. var _p0 *byte
  341. _p0, err = BytePtrFromString(path)
  342. if err != nil {
  343. return
  344. }
  345. _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
  346. use(unsafe.Pointer(_p0))
  347. if e1 != 0 {
  348. err = errnoErr(e1)
  349. }
  350. return
  351. }
  352. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  353. func Close(fd int) (err error) {
  354. _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
  355. if e1 != 0 {
  356. err = errnoErr(e1)
  357. }
  358. return
  359. }
  360. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  361. func Dup(fd int) (nfd int, err error) {
  362. r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
  363. nfd = int(r0)
  364. if e1 != 0 {
  365. err = errnoErr(e1)
  366. }
  367. return
  368. }
  369. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  370. func Dup2(from int, to int) (err error) {
  371. _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
  372. if e1 != 0 {
  373. err = errnoErr(e1)
  374. }
  375. return
  376. }
  377. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  378. func Exit(code int) {
  379. Syscall(SYS_EXIT, uintptr(code), 0, 0)
  380. return
  381. }
  382. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  383. func Fchdir(fd int) (err error) {
  384. _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
  385. if e1 != 0 {
  386. err = errnoErr(e1)
  387. }
  388. return
  389. }
  390. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  391. func Fchflags(fd int, flags int) (err error) {
  392. _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
  393. if e1 != 0 {
  394. err = errnoErr(e1)
  395. }
  396. return
  397. }
  398. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  399. func Fchmod(fd int, mode uint32) (err error) {
  400. _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
  401. if e1 != 0 {
  402. err = errnoErr(e1)
  403. }
  404. return
  405. }
  406. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  407. func Fchown(fd int, uid int, gid int) (err error) {
  408. _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
  409. if e1 != 0 {
  410. err = errnoErr(e1)
  411. }
  412. return
  413. }
  414. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  415. func Flock(fd int, how int) (err error) {
  416. _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
  417. if e1 != 0 {
  418. err = errnoErr(e1)
  419. }
  420. return
  421. }
  422. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  423. func Fpathconf(fd int, name int) (val int, err error) {
  424. r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
  425. val = int(r0)
  426. if e1 != 0 {
  427. err = errnoErr(e1)
  428. }
  429. return
  430. }
  431. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  432. func Fstat(fd int, stat *Stat_t) (err error) {
  433. _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  434. if e1 != 0 {
  435. err = errnoErr(e1)
  436. }
  437. return
  438. }
  439. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  440. func Fstatfs(fd int, stat *Statfs_t) (err error) {
  441. _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  442. if e1 != 0 {
  443. err = errnoErr(e1)
  444. }
  445. return
  446. }
  447. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  448. func Fsync(fd int) (err error) {
  449. _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
  450. if e1 != 0 {
  451. err = errnoErr(e1)
  452. }
  453. return
  454. }
  455. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  456. func Ftruncate(fd int, length int64) (err error) {
  457. _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length))
  458. if e1 != 0 {
  459. err = errnoErr(e1)
  460. }
  461. return
  462. }
  463. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  464. func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
  465. var _p0 unsafe.Pointer
  466. if len(buf) > 0 {
  467. _p0 = unsafe.Pointer(&buf[0])
  468. } else {
  469. _p0 = unsafe.Pointer(&_zero)
  470. }
  471. r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
  472. n = int(r0)
  473. if e1 != 0 {
  474. err = errnoErr(e1)
  475. }
  476. return
  477. }
  478. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  479. func Getdtablesize() (size int) {
  480. r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
  481. size = int(r0)
  482. return
  483. }
  484. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  485. func Getegid() (egid int) {
  486. r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
  487. egid = int(r0)
  488. return
  489. }
  490. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  491. func Geteuid() (uid int) {
  492. r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
  493. uid = int(r0)
  494. return
  495. }
  496. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  497. func Getgid() (gid int) {
  498. r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
  499. gid = int(r0)
  500. return
  501. }
  502. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  503. func Getpgid(pid int) (pgid int, err error) {
  504. r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
  505. pgid = int(r0)
  506. if e1 != 0 {
  507. err = errnoErr(e1)
  508. }
  509. return
  510. }
  511. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  512. func Getpgrp() (pgrp int) {
  513. r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
  514. pgrp = int(r0)
  515. return
  516. }
  517. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  518. func Getpid() (pid int) {
  519. r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
  520. pid = int(r0)
  521. return
  522. }
  523. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  524. func Getppid() (ppid int) {
  525. r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
  526. ppid = int(r0)
  527. return
  528. }
  529. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  530. func Getpriority(which int, who int) (prio int, err error) {
  531. r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
  532. prio = int(r0)
  533. if e1 != 0 {
  534. err = errnoErr(e1)
  535. }
  536. return
  537. }
  538. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  539. func Getrlimit(which int, lim *Rlimit) (err error) {
  540. _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
  541. if e1 != 0 {
  542. err = errnoErr(e1)
  543. }
  544. return
  545. }
  546. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  547. func Getrusage(who int, rusage *Rusage) (err error) {
  548. _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
  549. if e1 != 0 {
  550. err = errnoErr(e1)
  551. }
  552. return
  553. }
  554. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  555. func Getsid(pid int) (sid int, err error) {
  556. r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
  557. sid = int(r0)
  558. if e1 != 0 {
  559. err = errnoErr(e1)
  560. }
  561. return
  562. }
  563. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  564. func Gettimeofday(tv *Timeval) (err error) {
  565. _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  566. if e1 != 0 {
  567. err = errnoErr(e1)
  568. }
  569. return
  570. }
  571. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  572. func Getuid() (uid int) {
  573. r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
  574. uid = int(r0)
  575. return
  576. }
  577. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  578. func Issetugid() (tainted bool) {
  579. r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
  580. tainted = bool(r0 != 0)
  581. return
  582. }
  583. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  584. func Kill(pid int, signum syscall.Signal) (err error) {
  585. _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
  586. if e1 != 0 {
  587. err = errnoErr(e1)
  588. }
  589. return
  590. }
  591. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  592. func Kqueue() (fd int, err error) {
  593. r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
  594. fd = int(r0)
  595. if e1 != 0 {
  596. err = errnoErr(e1)
  597. }
  598. return
  599. }
  600. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  601. func Lchown(path string, uid int, gid int) (err error) {
  602. var _p0 *byte
  603. _p0, err = BytePtrFromString(path)
  604. if err != nil {
  605. return
  606. }
  607. _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  608. use(unsafe.Pointer(_p0))
  609. if e1 != 0 {
  610. err = errnoErr(e1)
  611. }
  612. return
  613. }
  614. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  615. func Link(path string, link string) (err error) {
  616. var _p0 *byte
  617. _p0, err = BytePtrFromString(path)
  618. if err != nil {
  619. return
  620. }
  621. var _p1 *byte
  622. _p1, err = BytePtrFromString(link)
  623. if err != nil {
  624. return
  625. }
  626. _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  627. use(unsafe.Pointer(_p0))
  628. use(unsafe.Pointer(_p1))
  629. if e1 != 0 {
  630. err = errnoErr(e1)
  631. }
  632. return
  633. }
  634. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  635. func Listen(s int, backlog int) (err error) {
  636. _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
  637. if e1 != 0 {
  638. err = errnoErr(e1)
  639. }
  640. return
  641. }
  642. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  643. func Lstat(path string, stat *Stat_t) (err error) {
  644. var _p0 *byte
  645. _p0, err = BytePtrFromString(path)
  646. if err != nil {
  647. return
  648. }
  649. _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  650. use(unsafe.Pointer(_p0))
  651. if e1 != 0 {
  652. err = errnoErr(e1)
  653. }
  654. return
  655. }
  656. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  657. func Mkdir(path string, mode uint32) (err error) {
  658. var _p0 *byte
  659. _p0, err = BytePtrFromString(path)
  660. if err != nil {
  661. return
  662. }
  663. _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  664. use(unsafe.Pointer(_p0))
  665. if e1 != 0 {
  666. err = errnoErr(e1)
  667. }
  668. return
  669. }
  670. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  671. func Mkfifo(path string, mode uint32) (err error) {
  672. var _p0 *byte
  673. _p0, err = BytePtrFromString(path)
  674. if err != nil {
  675. return
  676. }
  677. _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  678. use(unsafe.Pointer(_p0))
  679. if e1 != 0 {
  680. err = errnoErr(e1)
  681. }
  682. return
  683. }
  684. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  685. func Mknod(path string, mode uint32, dev int) (err error) {
  686. var _p0 *byte
  687. _p0, err = BytePtrFromString(path)
  688. if err != nil {
  689. return
  690. }
  691. _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
  692. use(unsafe.Pointer(_p0))
  693. if e1 != 0 {
  694. err = errnoErr(e1)
  695. }
  696. return
  697. }
  698. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  699. func Mlock(b []byte) (err error) {
  700. var _p0 unsafe.Pointer
  701. if len(b) > 0 {
  702. _p0 = unsafe.Pointer(&b[0])
  703. } else {
  704. _p0 = unsafe.Pointer(&_zero)
  705. }
  706. _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
  707. if e1 != 0 {
  708. err = errnoErr(e1)
  709. }
  710. return
  711. }
  712. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  713. func Mlockall(flags int) (err error) {
  714. _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
  715. if e1 != 0 {
  716. err = errnoErr(e1)
  717. }
  718. return
  719. }
  720. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  721. func Mprotect(b []byte, prot int) (err error) {
  722. var _p0 unsafe.Pointer
  723. if len(b) > 0 {
  724. _p0 = unsafe.Pointer(&b[0])
  725. } else {
  726. _p0 = unsafe.Pointer(&_zero)
  727. }
  728. _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
  729. if e1 != 0 {
  730. err = errnoErr(e1)
  731. }
  732. return
  733. }
  734. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  735. func Munlock(b []byte) (err error) {
  736. var _p0 unsafe.Pointer
  737. if len(b) > 0 {
  738. _p0 = unsafe.Pointer(&b[0])
  739. } else {
  740. _p0 = unsafe.Pointer(&_zero)
  741. }
  742. _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
  743. if e1 != 0 {
  744. err = errnoErr(e1)
  745. }
  746. return
  747. }
  748. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  749. func Munlockall() (err error) {
  750. _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
  751. if e1 != 0 {
  752. err = errnoErr(e1)
  753. }
  754. return
  755. }
  756. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  757. func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
  758. _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
  759. if e1 != 0 {
  760. err = errnoErr(e1)
  761. }
  762. return
  763. }
  764. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  765. func Open(path string, mode int, perm uint32) (fd int, err error) {
  766. var _p0 *byte
  767. _p0, err = BytePtrFromString(path)
  768. if err != nil {
  769. return
  770. }
  771. r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
  772. use(unsafe.Pointer(_p0))
  773. fd = int(r0)
  774. if e1 != 0 {
  775. err = errnoErr(e1)
  776. }
  777. return
  778. }
  779. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  780. func Pathconf(path string, name int) (val int, err error) {
  781. var _p0 *byte
  782. _p0, err = BytePtrFromString(path)
  783. if err != nil {
  784. return
  785. }
  786. r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
  787. use(unsafe.Pointer(_p0))
  788. val = int(r0)
  789. if e1 != 0 {
  790. err = errnoErr(e1)
  791. }
  792. return
  793. }
  794. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  795. func read(fd int, p []byte) (n int, err error) {
  796. var _p0 unsafe.Pointer
  797. if len(p) > 0 {
  798. _p0 = unsafe.Pointer(&p[0])
  799. } else {
  800. _p0 = unsafe.Pointer(&_zero)
  801. }
  802. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  803. n = int(r0)
  804. if e1 != 0 {
  805. err = errnoErr(e1)
  806. }
  807. return
  808. }
  809. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  810. func Readlink(path string, buf []byte) (n int, err error) {
  811. var _p0 *byte
  812. _p0, err = BytePtrFromString(path)
  813. if err != nil {
  814. return
  815. }
  816. var _p1 unsafe.Pointer
  817. if len(buf) > 0 {
  818. _p1 = unsafe.Pointer(&buf[0])
  819. } else {
  820. _p1 = unsafe.Pointer(&_zero)
  821. }
  822. r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
  823. use(unsafe.Pointer(_p0))
  824. n = int(r0)
  825. if e1 != 0 {
  826. err = errnoErr(e1)
  827. }
  828. return
  829. }
  830. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  831. func Rename(from string, to string) (err error) {
  832. var _p0 *byte
  833. _p0, err = BytePtrFromString(from)
  834. if err != nil {
  835. return
  836. }
  837. var _p1 *byte
  838. _p1, err = BytePtrFromString(to)
  839. if err != nil {
  840. return
  841. }
  842. _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  843. use(unsafe.Pointer(_p0))
  844. use(unsafe.Pointer(_p1))
  845. if e1 != 0 {
  846. err = errnoErr(e1)
  847. }
  848. return
  849. }
  850. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  851. func Revoke(path string) (err error) {
  852. var _p0 *byte
  853. _p0, err = BytePtrFromString(path)
  854. if err != nil {
  855. return
  856. }
  857. _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
  858. use(unsafe.Pointer(_p0))
  859. if e1 != 0 {
  860. err = errnoErr(e1)
  861. }
  862. return
  863. }
  864. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  865. func Rmdir(path string) (err error) {
  866. var _p0 *byte
  867. _p0, err = BytePtrFromString(path)
  868. if err != nil {
  869. return
  870. }
  871. _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
  872. use(unsafe.Pointer(_p0))
  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 Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
  880. r0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0)
  881. newoffset = int64(r0)
  882. if e1 != 0 {
  883. err = errnoErr(e1)
  884. }
  885. return
  886. }
  887. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  888. func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
  889. _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
  890. if e1 != 0 {
  891. err = errnoErr(e1)
  892. }
  893. return
  894. }
  895. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  896. func Setegid(egid int) (err error) {
  897. _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
  898. if e1 != 0 {
  899. err = errnoErr(e1)
  900. }
  901. return
  902. }
  903. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  904. func Seteuid(euid int) (err error) {
  905. _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
  906. if e1 != 0 {
  907. err = errnoErr(e1)
  908. }
  909. return
  910. }
  911. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  912. func Setgid(gid int) (err error) {
  913. _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
  914. if e1 != 0 {
  915. err = errnoErr(e1)
  916. }
  917. return
  918. }
  919. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  920. func Setlogin(name string) (err error) {
  921. var _p0 *byte
  922. _p0, err = BytePtrFromString(name)
  923. if err != nil {
  924. return
  925. }
  926. _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
  927. use(unsafe.Pointer(_p0))
  928. if e1 != 0 {
  929. err = errnoErr(e1)
  930. }
  931. return
  932. }
  933. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  934. func Setpgid(pid int, pgid int) (err error) {
  935. _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
  936. if e1 != 0 {
  937. err = errnoErr(e1)
  938. }
  939. return
  940. }
  941. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  942. func Setpriority(which int, who int, prio int) (err error) {
  943. _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
  944. if e1 != 0 {
  945. err = errnoErr(e1)
  946. }
  947. return
  948. }
  949. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  950. func Setregid(rgid int, egid int) (err error) {
  951. _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
  952. if e1 != 0 {
  953. err = errnoErr(e1)
  954. }
  955. return
  956. }
  957. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  958. func Setreuid(ruid int, euid int) (err error) {
  959. _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
  960. if e1 != 0 {
  961. err = errnoErr(e1)
  962. }
  963. return
  964. }
  965. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  966. func Setresgid(rgid int, egid int, sgid int) (err error) {
  967. _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
  968. if e1 != 0 {
  969. err = errnoErr(e1)
  970. }
  971. return
  972. }
  973. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  974. func Setresuid(ruid int, euid int, suid int) (err error) {
  975. _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
  976. if e1 != 0 {
  977. err = errnoErr(e1)
  978. }
  979. return
  980. }
  981. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  982. func Setrlimit(which int, lim *Rlimit) (err error) {
  983. _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
  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 Setsid() (pid int, err error) {
  991. r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
  992. pid = int(r0)
  993. if e1 != 0 {
  994. err = errnoErr(e1)
  995. }
  996. return
  997. }
  998. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  999. func Settimeofday(tp *Timeval) (err error) {
  1000. _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
  1001. if e1 != 0 {
  1002. err = errnoErr(e1)
  1003. }
  1004. return
  1005. }
  1006. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1007. func Setuid(uid int) (err error) {
  1008. _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
  1009. if e1 != 0 {
  1010. err = errnoErr(e1)
  1011. }
  1012. return
  1013. }
  1014. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1015. func Stat(path string, stat *Stat_t) (err error) {
  1016. var _p0 *byte
  1017. _p0, err = BytePtrFromString(path)
  1018. if err != nil {
  1019. return
  1020. }
  1021. _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1022. use(unsafe.Pointer(_p0))
  1023. if e1 != 0 {
  1024. err = errnoErr(e1)
  1025. }
  1026. return
  1027. }
  1028. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1029. func Statfs(path string, stat *Statfs_t) (err error) {
  1030. var _p0 *byte
  1031. _p0, err = BytePtrFromString(path)
  1032. if err != nil {
  1033. return
  1034. }
  1035. _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1036. use(unsafe.Pointer(_p0))
  1037. if e1 != 0 {
  1038. err = errnoErr(e1)
  1039. }
  1040. return
  1041. }
  1042. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1043. func Symlink(path string, link string) (err error) {
  1044. var _p0 *byte
  1045. _p0, err = BytePtrFromString(path)
  1046. if err != nil {
  1047. return
  1048. }
  1049. var _p1 *byte
  1050. _p1, err = BytePtrFromString(link)
  1051. if err != nil {
  1052. return
  1053. }
  1054. _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1055. use(unsafe.Pointer(_p0))
  1056. use(unsafe.Pointer(_p1))
  1057. if e1 != 0 {
  1058. err = errnoErr(e1)
  1059. }
  1060. return
  1061. }
  1062. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1063. func Sync() (err error) {
  1064. _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
  1065. if e1 != 0 {
  1066. err = errnoErr(e1)
  1067. }
  1068. return
  1069. }
  1070. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1071. func Truncate(path string, length int64) (err error) {
  1072. var _p0 *byte
  1073. _p0, err = BytePtrFromString(path)
  1074. if err != nil {
  1075. return
  1076. }
  1077. _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length))
  1078. use(unsafe.Pointer(_p0))
  1079. if e1 != 0 {
  1080. err = errnoErr(e1)
  1081. }
  1082. return
  1083. }
  1084. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1085. func Umask(newmask int) (oldmask int) {
  1086. r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
  1087. oldmask = int(r0)
  1088. return
  1089. }
  1090. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1091. func Undelete(path string) (err error) {
  1092. var _p0 *byte
  1093. _p0, err = BytePtrFromString(path)
  1094. if err != nil {
  1095. return
  1096. }
  1097. _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1098. use(unsafe.Pointer(_p0))
  1099. if e1 != 0 {
  1100. err = errnoErr(e1)
  1101. }
  1102. return
  1103. }
  1104. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1105. func Unlink(path string) (err error) {
  1106. var _p0 *byte
  1107. _p0, err = BytePtrFromString(path)
  1108. if err != nil {
  1109. return
  1110. }
  1111. _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1112. use(unsafe.Pointer(_p0))
  1113. if e1 != 0 {
  1114. err = errnoErr(e1)
  1115. }
  1116. return
  1117. }
  1118. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1119. func Unmount(path string, flags int) (err error) {
  1120. var _p0 *byte
  1121. _p0, err = BytePtrFromString(path)
  1122. if err != nil {
  1123. return
  1124. }
  1125. _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  1126. use(unsafe.Pointer(_p0))
  1127. if e1 != 0 {
  1128. err = errnoErr(e1)
  1129. }
  1130. return
  1131. }
  1132. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1133. func write(fd int, p []byte) (n int, err error) {
  1134. var _p0 unsafe.Pointer
  1135. if len(p) > 0 {
  1136. _p0 = unsafe.Pointer(&p[0])
  1137. } else {
  1138. _p0 = unsafe.Pointer(&_zero)
  1139. }
  1140. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1141. n = int(r0)
  1142. if e1 != 0 {
  1143. err = errnoErr(e1)
  1144. }
  1145. return
  1146. }
  1147. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1148. func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
  1149. r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0)
  1150. ret = uintptr(r0)
  1151. if e1 != 0 {
  1152. err = errnoErr(e1)
  1153. }
  1154. return
  1155. }
  1156. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1157. func munmap(addr uintptr, length uintptr) (err error) {
  1158. _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
  1159. if e1 != 0 {
  1160. err = errnoErr(e1)
  1161. }
  1162. return
  1163. }
  1164. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1165. func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
  1166. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1167. n = int(r0)
  1168. if e1 != 0 {
  1169. err = errnoErr(e1)
  1170. }
  1171. return
  1172. }
  1173. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1174. func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
  1175. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1176. n = int(r0)
  1177. if e1 != 0 {
  1178. err = errnoErr(e1)
  1179. }
  1180. return
  1181. }