zsyscall_dragonfly_amd64.go 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666
  1. // go run mksyscall.go -dragonfly -tags dragonfly,amd64 syscall_bsd.go syscall_dragonfly.go syscall_dragonfly_amd64.go
  2. // Code generated by the command above; see README.md. DO NOT EDIT.
  3. // +build dragonfly,amd64
  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. if e1 != 0 {
  197. err = errnoErr(e1)
  198. }
  199. return
  200. }
  201. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  202. func futimes(fd int, timeval *[2]Timeval) (err error) {
  203. _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
  204. if e1 != 0 {
  205. err = errnoErr(e1)
  206. }
  207. return
  208. }
  209. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  210. func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
  211. r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
  212. n = int(r0)
  213. if e1 != 0 {
  214. err = errnoErr(e1)
  215. }
  216. return
  217. }
  218. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  219. func Madvise(b []byte, behav int) (err error) {
  220. var _p0 unsafe.Pointer
  221. if len(b) > 0 {
  222. _p0 = unsafe.Pointer(&b[0])
  223. } else {
  224. _p0 = unsafe.Pointer(&_zero)
  225. }
  226. _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
  227. if e1 != 0 {
  228. err = errnoErr(e1)
  229. }
  230. return
  231. }
  232. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  233. func Mlock(b []byte) (err error) {
  234. var _p0 unsafe.Pointer
  235. if len(b) > 0 {
  236. _p0 = unsafe.Pointer(&b[0])
  237. } else {
  238. _p0 = unsafe.Pointer(&_zero)
  239. }
  240. _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
  241. if e1 != 0 {
  242. err = errnoErr(e1)
  243. }
  244. return
  245. }
  246. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  247. func Mlockall(flags int) (err error) {
  248. _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
  249. if e1 != 0 {
  250. err = errnoErr(e1)
  251. }
  252. return
  253. }
  254. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  255. func Mprotect(b []byte, prot int) (err error) {
  256. var _p0 unsafe.Pointer
  257. if len(b) > 0 {
  258. _p0 = unsafe.Pointer(&b[0])
  259. } else {
  260. _p0 = unsafe.Pointer(&_zero)
  261. }
  262. _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
  263. if e1 != 0 {
  264. err = errnoErr(e1)
  265. }
  266. return
  267. }
  268. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  269. func Msync(b []byte, flags int) (err error) {
  270. var _p0 unsafe.Pointer
  271. if len(b) > 0 {
  272. _p0 = unsafe.Pointer(&b[0])
  273. } else {
  274. _p0 = unsafe.Pointer(&_zero)
  275. }
  276. _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
  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 Munlock(b []byte) (err error) {
  284. var _p0 unsafe.Pointer
  285. if len(b) > 0 {
  286. _p0 = unsafe.Pointer(&b[0])
  287. } else {
  288. _p0 = unsafe.Pointer(&_zero)
  289. }
  290. _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
  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 Munlockall() (err error) {
  298. _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
  299. if e1 != 0 {
  300. err = errnoErr(e1)
  301. }
  302. return
  303. }
  304. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  305. func pipe() (r int, w int, err error) {
  306. r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
  307. r = int(r0)
  308. w = int(r1)
  309. if e1 != 0 {
  310. err = errnoErr(e1)
  311. }
  312. return
  313. }
  314. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  315. func extpread(fd int, p []byte, flags int, offset int64) (n int, err error) {
  316. var _p0 unsafe.Pointer
  317. if len(p) > 0 {
  318. _p0 = unsafe.Pointer(&p[0])
  319. } else {
  320. _p0 = unsafe.Pointer(&_zero)
  321. }
  322. r0, _, e1 := Syscall6(SYS_EXTPREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(offset), 0)
  323. n = int(r0)
  324. if e1 != 0 {
  325. err = errnoErr(e1)
  326. }
  327. return
  328. }
  329. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  330. func extpwrite(fd int, p []byte, flags int, offset int64) (n int, err error) {
  331. var _p0 unsafe.Pointer
  332. if len(p) > 0 {
  333. _p0 = unsafe.Pointer(&p[0])
  334. } else {
  335. _p0 = unsafe.Pointer(&_zero)
  336. }
  337. r0, _, e1 := Syscall6(SYS_EXTPWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(offset), 0)
  338. n = int(r0)
  339. if e1 != 0 {
  340. err = errnoErr(e1)
  341. }
  342. return
  343. }
  344. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  345. func Getcwd(buf []byte) (n int, err error) {
  346. var _p0 unsafe.Pointer
  347. if len(buf) > 0 {
  348. _p0 = unsafe.Pointer(&buf[0])
  349. } else {
  350. _p0 = unsafe.Pointer(&_zero)
  351. }
  352. r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
  353. n = int(r0)
  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 ioctl(fd int, req uint, arg uintptr) (err error) {
  361. _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
  362. if e1 != 0 {
  363. err = errnoErr(e1)
  364. }
  365. return
  366. }
  367. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  368. func Access(path string, mode uint32) (err error) {
  369. var _p0 *byte
  370. _p0, err = BytePtrFromString(path)
  371. if err != nil {
  372. return
  373. }
  374. _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 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 Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
  382. _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 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 Chdir(path string) (err error) {
  390. var _p0 *byte
  391. _p0, err = BytePtrFromString(path)
  392. if err != nil {
  393. return
  394. }
  395. _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
  396. if e1 != 0 {
  397. err = errnoErr(e1)
  398. }
  399. return
  400. }
  401. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  402. func Chflags(path string, flags int) (err error) {
  403. var _p0 *byte
  404. _p0, err = BytePtrFromString(path)
  405. if err != nil {
  406. return
  407. }
  408. _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  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 Chmod(path string, mode uint32) (err error) {
  416. var _p0 *byte
  417. _p0, err = BytePtrFromString(path)
  418. if err != nil {
  419. return
  420. }
  421. _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  422. if e1 != 0 {
  423. err = errnoErr(e1)
  424. }
  425. return
  426. }
  427. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  428. func Chown(path string, uid int, gid int) (err error) {
  429. var _p0 *byte
  430. _p0, err = BytePtrFromString(path)
  431. if err != nil {
  432. return
  433. }
  434. _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  435. if e1 != 0 {
  436. err = errnoErr(e1)
  437. }
  438. return
  439. }
  440. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  441. func Chroot(path string) (err error) {
  442. var _p0 *byte
  443. _p0, err = BytePtrFromString(path)
  444. if err != nil {
  445. return
  446. }
  447. _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
  448. if e1 != 0 {
  449. err = errnoErr(e1)
  450. }
  451. return
  452. }
  453. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  454. func Close(fd int) (err error) {
  455. _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
  456. if e1 != 0 {
  457. err = errnoErr(e1)
  458. }
  459. return
  460. }
  461. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  462. func Dup(fd int) (nfd int, err error) {
  463. r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
  464. nfd = int(r0)
  465. if e1 != 0 {
  466. err = errnoErr(e1)
  467. }
  468. return
  469. }
  470. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  471. func Dup2(from int, to int) (err error) {
  472. _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
  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 Exit(code int) {
  480. Syscall(SYS_EXIT, uintptr(code), 0, 0)
  481. return
  482. }
  483. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  484. func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
  485. var _p0 *byte
  486. _p0, err = BytePtrFromString(path)
  487. if err != nil {
  488. return
  489. }
  490. _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
  491. if e1 != 0 {
  492. err = errnoErr(e1)
  493. }
  494. return
  495. }
  496. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  497. func Fchdir(fd int) (err error) {
  498. _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
  499. if e1 != 0 {
  500. err = errnoErr(e1)
  501. }
  502. return
  503. }
  504. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  505. func Fchflags(fd int, flags int) (err error) {
  506. _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
  507. if e1 != 0 {
  508. err = errnoErr(e1)
  509. }
  510. return
  511. }
  512. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  513. func Fchmod(fd int, mode uint32) (err error) {
  514. _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
  515. if e1 != 0 {
  516. err = errnoErr(e1)
  517. }
  518. return
  519. }
  520. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  521. func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
  522. var _p0 *byte
  523. _p0, err = BytePtrFromString(path)
  524. if err != nil {
  525. return
  526. }
  527. _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
  528. if e1 != 0 {
  529. err = errnoErr(e1)
  530. }
  531. return
  532. }
  533. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  534. func Fchown(fd int, uid int, gid int) (err error) {
  535. _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
  536. if e1 != 0 {
  537. err = errnoErr(e1)
  538. }
  539. return
  540. }
  541. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  542. func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
  543. var _p0 *byte
  544. _p0, err = BytePtrFromString(path)
  545. if err != nil {
  546. return
  547. }
  548. _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 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 Flock(fd int, how int) (err error) {
  556. _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
  557. if e1 != 0 {
  558. err = errnoErr(e1)
  559. }
  560. return
  561. }
  562. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  563. func Fpathconf(fd int, name int) (val int, err error) {
  564. r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
  565. val = int(r0)
  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 Fstat(fd int, stat *Stat_t) (err error) {
  573. _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  574. if e1 != 0 {
  575. err = errnoErr(e1)
  576. }
  577. return
  578. }
  579. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  580. func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
  581. var _p0 *byte
  582. _p0, err = BytePtrFromString(path)
  583. if err != nil {
  584. return
  585. }
  586. _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
  587. if e1 != 0 {
  588. err = errnoErr(e1)
  589. }
  590. return
  591. }
  592. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  593. func Fstatfs(fd int, stat *Statfs_t) (err error) {
  594. _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  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 Fsync(fd int) (err error) {
  602. _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
  603. if e1 != 0 {
  604. err = errnoErr(e1)
  605. }
  606. return
  607. }
  608. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  609. func Ftruncate(fd int, length int64) (err error) {
  610. _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length))
  611. if e1 != 0 {
  612. err = errnoErr(e1)
  613. }
  614. return
  615. }
  616. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  617. func Getdents(fd int, buf []byte) (n int, err error) {
  618. var _p0 unsafe.Pointer
  619. if len(buf) > 0 {
  620. _p0 = unsafe.Pointer(&buf[0])
  621. } else {
  622. _p0 = unsafe.Pointer(&_zero)
  623. }
  624. r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
  625. n = int(r0)
  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 Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
  633. var _p0 unsafe.Pointer
  634. if len(buf) > 0 {
  635. _p0 = unsafe.Pointer(&buf[0])
  636. } else {
  637. _p0 = unsafe.Pointer(&_zero)
  638. }
  639. r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
  640. n = int(r0)
  641. if e1 != 0 {
  642. err = errnoErr(e1)
  643. }
  644. return
  645. }
  646. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  647. func Getdtablesize() (size int) {
  648. r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
  649. size = int(r0)
  650. return
  651. }
  652. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  653. func Getegid() (egid int) {
  654. r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
  655. egid = int(r0)
  656. return
  657. }
  658. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  659. func Geteuid() (uid int) {
  660. r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
  661. uid = int(r0)
  662. return
  663. }
  664. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  665. func Getgid() (gid int) {
  666. r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
  667. gid = int(r0)
  668. return
  669. }
  670. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  671. func Getpgid(pid int) (pgid int, err error) {
  672. r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
  673. pgid = int(r0)
  674. if e1 != 0 {
  675. err = errnoErr(e1)
  676. }
  677. return
  678. }
  679. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  680. func Getpgrp() (pgrp int) {
  681. r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
  682. pgrp = int(r0)
  683. return
  684. }
  685. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  686. func Getpid() (pid int) {
  687. r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
  688. pid = int(r0)
  689. return
  690. }
  691. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  692. func Getppid() (ppid int) {
  693. r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
  694. ppid = int(r0)
  695. return
  696. }
  697. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  698. func Getpriority(which int, who int) (prio int, err error) {
  699. r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
  700. prio = int(r0)
  701. if e1 != 0 {
  702. err = errnoErr(e1)
  703. }
  704. return
  705. }
  706. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  707. func Getrlimit(which int, lim *Rlimit) (err error) {
  708. _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
  709. if e1 != 0 {
  710. err = errnoErr(e1)
  711. }
  712. return
  713. }
  714. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  715. func Getrusage(who int, rusage *Rusage) (err error) {
  716. _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
  717. if e1 != 0 {
  718. err = errnoErr(e1)
  719. }
  720. return
  721. }
  722. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  723. func Getsid(pid int) (sid int, err error) {
  724. r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
  725. sid = int(r0)
  726. if e1 != 0 {
  727. err = errnoErr(e1)
  728. }
  729. return
  730. }
  731. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  732. func Gettimeofday(tv *Timeval) (err error) {
  733. _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  734. if e1 != 0 {
  735. err = errnoErr(e1)
  736. }
  737. return
  738. }
  739. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  740. func Getuid() (uid int) {
  741. r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
  742. uid = int(r0)
  743. return
  744. }
  745. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  746. func Issetugid() (tainted bool) {
  747. r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
  748. tainted = bool(r0 != 0)
  749. return
  750. }
  751. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  752. func Kill(pid int, signum syscall.Signal) (err error) {
  753. _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
  754. if e1 != 0 {
  755. err = errnoErr(e1)
  756. }
  757. return
  758. }
  759. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  760. func Kqueue() (fd int, err error) {
  761. r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
  762. fd = int(r0)
  763. if e1 != 0 {
  764. err = errnoErr(e1)
  765. }
  766. return
  767. }
  768. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  769. func Lchown(path string, uid int, gid int) (err error) {
  770. var _p0 *byte
  771. _p0, err = BytePtrFromString(path)
  772. if err != nil {
  773. return
  774. }
  775. _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  776. if e1 != 0 {
  777. err = errnoErr(e1)
  778. }
  779. return
  780. }
  781. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  782. func Link(path string, link string) (err error) {
  783. var _p0 *byte
  784. _p0, err = BytePtrFromString(path)
  785. if err != nil {
  786. return
  787. }
  788. var _p1 *byte
  789. _p1, err = BytePtrFromString(link)
  790. if err != nil {
  791. return
  792. }
  793. _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  794. if e1 != 0 {
  795. err = errnoErr(e1)
  796. }
  797. return
  798. }
  799. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  800. func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
  801. var _p0 *byte
  802. _p0, err = BytePtrFromString(path)
  803. if err != nil {
  804. return
  805. }
  806. var _p1 *byte
  807. _p1, err = BytePtrFromString(link)
  808. if err != nil {
  809. return
  810. }
  811. _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
  812. if e1 != 0 {
  813. err = errnoErr(e1)
  814. }
  815. return
  816. }
  817. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  818. func Listen(s int, backlog int) (err error) {
  819. _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
  820. if e1 != 0 {
  821. err = errnoErr(e1)
  822. }
  823. return
  824. }
  825. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  826. func Lstat(path string, stat *Stat_t) (err error) {
  827. var _p0 *byte
  828. _p0, err = BytePtrFromString(path)
  829. if err != nil {
  830. return
  831. }
  832. _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  833. if e1 != 0 {
  834. err = errnoErr(e1)
  835. }
  836. return
  837. }
  838. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  839. func Mkdir(path string, mode uint32) (err error) {
  840. var _p0 *byte
  841. _p0, err = BytePtrFromString(path)
  842. if err != nil {
  843. return
  844. }
  845. _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  846. if e1 != 0 {
  847. err = errnoErr(e1)
  848. }
  849. return
  850. }
  851. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  852. func Mkdirat(dirfd int, path string, mode uint32) (err error) {
  853. var _p0 *byte
  854. _p0, err = BytePtrFromString(path)
  855. if err != nil {
  856. return
  857. }
  858. _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  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 Mkfifo(path string, mode uint32) (err error) {
  866. var _p0 *byte
  867. _p0, err = BytePtrFromString(path)
  868. if err != nil {
  869. return
  870. }
  871. _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  872. if e1 != 0 {
  873. err = errnoErr(e1)
  874. }
  875. return
  876. }
  877. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  878. func Mknod(path string, mode uint32, dev int) (err error) {
  879. var _p0 *byte
  880. _p0, err = BytePtrFromString(path)
  881. if err != nil {
  882. return
  883. }
  884. _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
  885. if e1 != 0 {
  886. err = errnoErr(e1)
  887. }
  888. return
  889. }
  890. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  891. func Mknodat(fd int, path string, mode uint32, dev int) (err error) {
  892. var _p0 *byte
  893. _p0, err = BytePtrFromString(path)
  894. if err != nil {
  895. return
  896. }
  897. _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 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 Nanosleep(time *Timespec, leftover *Timespec) (err error) {
  905. _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 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 Open(path string, mode int, perm uint32) (fd int, err error) {
  913. var _p0 *byte
  914. _p0, err = BytePtrFromString(path)
  915. if err != nil {
  916. return
  917. }
  918. r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
  919. fd = int(r0)
  920. if e1 != 0 {
  921. err = errnoErr(e1)
  922. }
  923. return
  924. }
  925. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  926. func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
  927. var _p0 *byte
  928. _p0, err = BytePtrFromString(path)
  929. if err != nil {
  930. return
  931. }
  932. r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
  933. fd = int(r0)
  934. if e1 != 0 {
  935. err = errnoErr(e1)
  936. }
  937. return
  938. }
  939. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  940. func Pathconf(path string, name int) (val int, err error) {
  941. var _p0 *byte
  942. _p0, err = BytePtrFromString(path)
  943. if err != nil {
  944. return
  945. }
  946. r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
  947. val = int(r0)
  948. if e1 != 0 {
  949. err = errnoErr(e1)
  950. }
  951. return
  952. }
  953. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  954. func read(fd int, p []byte) (n int, err error) {
  955. var _p0 unsafe.Pointer
  956. if len(p) > 0 {
  957. _p0 = unsafe.Pointer(&p[0])
  958. } else {
  959. _p0 = unsafe.Pointer(&_zero)
  960. }
  961. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  962. n = int(r0)
  963. if e1 != 0 {
  964. err = errnoErr(e1)
  965. }
  966. return
  967. }
  968. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  969. func Readlink(path string, buf []byte) (n int, err error) {
  970. var _p0 *byte
  971. _p0, err = BytePtrFromString(path)
  972. if err != nil {
  973. return
  974. }
  975. var _p1 unsafe.Pointer
  976. if len(buf) > 0 {
  977. _p1 = unsafe.Pointer(&buf[0])
  978. } else {
  979. _p1 = unsafe.Pointer(&_zero)
  980. }
  981. r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
  982. n = int(r0)
  983. if e1 != 0 {
  984. err = errnoErr(e1)
  985. }
  986. return
  987. }
  988. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  989. func Rename(from string, to string) (err error) {
  990. var _p0 *byte
  991. _p0, err = BytePtrFromString(from)
  992. if err != nil {
  993. return
  994. }
  995. var _p1 *byte
  996. _p1, err = BytePtrFromString(to)
  997. if err != nil {
  998. return
  999. }
  1000. _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 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 Renameat(fromfd int, from string, tofd int, to string) (err error) {
  1008. var _p0 *byte
  1009. _p0, err = BytePtrFromString(from)
  1010. if err != nil {
  1011. return
  1012. }
  1013. var _p1 *byte
  1014. _p1, err = BytePtrFromString(to)
  1015. if err != nil {
  1016. return
  1017. }
  1018. _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
  1019. if e1 != 0 {
  1020. err = errnoErr(e1)
  1021. }
  1022. return
  1023. }
  1024. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1025. func Revoke(path string) (err error) {
  1026. var _p0 *byte
  1027. _p0, err = BytePtrFromString(path)
  1028. if err != nil {
  1029. return
  1030. }
  1031. _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1032. if e1 != 0 {
  1033. err = errnoErr(e1)
  1034. }
  1035. return
  1036. }
  1037. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1038. func Rmdir(path string) (err error) {
  1039. var _p0 *byte
  1040. _p0, err = BytePtrFromString(path)
  1041. if err != nil {
  1042. return
  1043. }
  1044. _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1045. if e1 != 0 {
  1046. err = errnoErr(e1)
  1047. }
  1048. return
  1049. }
  1050. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1051. func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
  1052. r0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0)
  1053. newoffset = int64(r0)
  1054. if e1 != 0 {
  1055. err = errnoErr(e1)
  1056. }
  1057. return
  1058. }
  1059. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1060. func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
  1061. r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
  1062. n = int(r0)
  1063. if e1 != 0 {
  1064. err = errnoErr(e1)
  1065. }
  1066. return
  1067. }
  1068. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1069. func Setegid(egid int) (err error) {
  1070. _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
  1071. if e1 != 0 {
  1072. err = errnoErr(e1)
  1073. }
  1074. return
  1075. }
  1076. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1077. func Seteuid(euid int) (err error) {
  1078. _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
  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 Setgid(gid int) (err error) {
  1086. _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
  1087. if e1 != 0 {
  1088. err = errnoErr(e1)
  1089. }
  1090. return
  1091. }
  1092. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1093. func Setlogin(name string) (err error) {
  1094. var _p0 *byte
  1095. _p0, err = BytePtrFromString(name)
  1096. if err != nil {
  1097. return
  1098. }
  1099. _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1100. if e1 != 0 {
  1101. err = errnoErr(e1)
  1102. }
  1103. return
  1104. }
  1105. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1106. func Setpgid(pid int, pgid int) (err error) {
  1107. _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
  1108. if e1 != 0 {
  1109. err = errnoErr(e1)
  1110. }
  1111. return
  1112. }
  1113. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1114. func Setpriority(which int, who int, prio int) (err error) {
  1115. _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
  1116. if e1 != 0 {
  1117. err = errnoErr(e1)
  1118. }
  1119. return
  1120. }
  1121. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1122. func Setregid(rgid int, egid int) (err error) {
  1123. _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
  1124. if e1 != 0 {
  1125. err = errnoErr(e1)
  1126. }
  1127. return
  1128. }
  1129. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1130. func Setreuid(ruid int, euid int) (err error) {
  1131. _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
  1132. if e1 != 0 {
  1133. err = errnoErr(e1)
  1134. }
  1135. return
  1136. }
  1137. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1138. func Setresgid(rgid int, egid int, sgid int) (err error) {
  1139. _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
  1140. if e1 != 0 {
  1141. err = errnoErr(e1)
  1142. }
  1143. return
  1144. }
  1145. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1146. func Setresuid(ruid int, euid int, suid int) (err error) {
  1147. _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
  1148. if e1 != 0 {
  1149. err = errnoErr(e1)
  1150. }
  1151. return
  1152. }
  1153. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1154. func Setrlimit(which int, lim *Rlimit) (err error) {
  1155. _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
  1156. if e1 != 0 {
  1157. err = errnoErr(e1)
  1158. }
  1159. return
  1160. }
  1161. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1162. func Setsid() (pid int, err error) {
  1163. r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
  1164. pid = int(r0)
  1165. if e1 != 0 {
  1166. err = errnoErr(e1)
  1167. }
  1168. return
  1169. }
  1170. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1171. func Settimeofday(tp *Timeval) (err error) {
  1172. _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
  1173. if e1 != 0 {
  1174. err = errnoErr(e1)
  1175. }
  1176. return
  1177. }
  1178. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1179. func Setuid(uid int) (err error) {
  1180. _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
  1181. if e1 != 0 {
  1182. err = errnoErr(e1)
  1183. }
  1184. return
  1185. }
  1186. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1187. func Stat(path string, stat *Stat_t) (err error) {
  1188. var _p0 *byte
  1189. _p0, err = BytePtrFromString(path)
  1190. if err != nil {
  1191. return
  1192. }
  1193. _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1194. if e1 != 0 {
  1195. err = errnoErr(e1)
  1196. }
  1197. return
  1198. }
  1199. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1200. func Statfs(path string, stat *Statfs_t) (err error) {
  1201. var _p0 *byte
  1202. _p0, err = BytePtrFromString(path)
  1203. if err != nil {
  1204. return
  1205. }
  1206. _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1207. if e1 != 0 {
  1208. err = errnoErr(e1)
  1209. }
  1210. return
  1211. }
  1212. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1213. func Symlink(path string, link string) (err error) {
  1214. var _p0 *byte
  1215. _p0, err = BytePtrFromString(path)
  1216. if err != nil {
  1217. return
  1218. }
  1219. var _p1 *byte
  1220. _p1, err = BytePtrFromString(link)
  1221. if err != nil {
  1222. return
  1223. }
  1224. _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1225. if e1 != 0 {
  1226. err = errnoErr(e1)
  1227. }
  1228. return
  1229. }
  1230. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1231. func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
  1232. var _p0 *byte
  1233. _p0, err = BytePtrFromString(oldpath)
  1234. if err != nil {
  1235. return
  1236. }
  1237. var _p1 *byte
  1238. _p1, err = BytePtrFromString(newpath)
  1239. if err != nil {
  1240. return
  1241. }
  1242. _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
  1243. if e1 != 0 {
  1244. err = errnoErr(e1)
  1245. }
  1246. return
  1247. }
  1248. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1249. func Sync() (err error) {
  1250. _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
  1251. if e1 != 0 {
  1252. err = errnoErr(e1)
  1253. }
  1254. return
  1255. }
  1256. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1257. func Truncate(path string, length int64) (err error) {
  1258. var _p0 *byte
  1259. _p0, err = BytePtrFromString(path)
  1260. if err != nil {
  1261. return
  1262. }
  1263. _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length))
  1264. if e1 != 0 {
  1265. err = errnoErr(e1)
  1266. }
  1267. return
  1268. }
  1269. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1270. func Umask(newmask int) (oldmask int) {
  1271. r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
  1272. oldmask = int(r0)
  1273. return
  1274. }
  1275. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1276. func Undelete(path string) (err error) {
  1277. var _p0 *byte
  1278. _p0, err = BytePtrFromString(path)
  1279. if err != nil {
  1280. return
  1281. }
  1282. _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1283. if e1 != 0 {
  1284. err = errnoErr(e1)
  1285. }
  1286. return
  1287. }
  1288. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1289. func Unlink(path string) (err error) {
  1290. var _p0 *byte
  1291. _p0, err = BytePtrFromString(path)
  1292. if err != nil {
  1293. return
  1294. }
  1295. _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1296. if e1 != 0 {
  1297. err = errnoErr(e1)
  1298. }
  1299. return
  1300. }
  1301. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1302. func Unlinkat(dirfd int, path string, flags int) (err error) {
  1303. var _p0 *byte
  1304. _p0, err = BytePtrFromString(path)
  1305. if err != nil {
  1306. return
  1307. }
  1308. _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
  1309. if e1 != 0 {
  1310. err = errnoErr(e1)
  1311. }
  1312. return
  1313. }
  1314. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1315. func Unmount(path string, flags int) (err error) {
  1316. var _p0 *byte
  1317. _p0, err = BytePtrFromString(path)
  1318. if err != nil {
  1319. return
  1320. }
  1321. _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  1322. if e1 != 0 {
  1323. err = errnoErr(e1)
  1324. }
  1325. return
  1326. }
  1327. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1328. func write(fd int, p []byte) (n int, err error) {
  1329. var _p0 unsafe.Pointer
  1330. if len(p) > 0 {
  1331. _p0 = unsafe.Pointer(&p[0])
  1332. } else {
  1333. _p0 = unsafe.Pointer(&_zero)
  1334. }
  1335. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1336. n = int(r0)
  1337. if e1 != 0 {
  1338. err = errnoErr(e1)
  1339. }
  1340. return
  1341. }
  1342. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1343. func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
  1344. r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0)
  1345. ret = uintptr(r0)
  1346. if e1 != 0 {
  1347. err = errnoErr(e1)
  1348. }
  1349. return
  1350. }
  1351. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1352. func munmap(addr uintptr, length uintptr) (err error) {
  1353. _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
  1354. if e1 != 0 {
  1355. err = errnoErr(e1)
  1356. }
  1357. return
  1358. }
  1359. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1360. func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
  1361. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1362. n = int(r0)
  1363. if e1 != 0 {
  1364. err = errnoErr(e1)
  1365. }
  1366. return
  1367. }
  1368. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1369. func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
  1370. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1371. n = int(r0)
  1372. if e1 != 0 {
  1373. err = errnoErr(e1)
  1374. }
  1375. return
  1376. }
  1377. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1378. func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) {
  1379. r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
  1380. nfd = int(r0)
  1381. if e1 != 0 {
  1382. err = errnoErr(e1)
  1383. }
  1384. return
  1385. }
  1386. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1387. func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
  1388. var _p0 *byte
  1389. _p0, err = BytePtrFromString(path)
  1390. if err != nil {
  1391. return
  1392. }
  1393. _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
  1394. if e1 != 0 {
  1395. err = errnoErr(e1)
  1396. }
  1397. return
  1398. }