zsyscall_openbsd_mips64.go 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693
  1. // go run mksyscall.go -openbsd -tags openbsd,mips64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_mips64.go
  2. // Code generated by the command above; see README.md. DO NOT EDIT.
  3. //go:build openbsd && mips64
  4. // +build openbsd,mips64
  5. package unix
  6. import (
  7. "syscall"
  8. "unsafe"
  9. )
  10. var _ syscall.Errno
  11. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  12. func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
  13. r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
  14. n = int(r0)
  15. if e1 != 0 {
  16. err = errnoErr(e1)
  17. }
  18. return
  19. }
  20. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  21. func setgroups(ngid int, gid *_Gid_t) (err error) {
  22. _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
  23. if e1 != 0 {
  24. err = errnoErr(e1)
  25. }
  26. return
  27. }
  28. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  29. func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
  30. r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
  31. wpid = int(r0)
  32. if e1 != 0 {
  33. err = errnoErr(e1)
  34. }
  35. return
  36. }
  37. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  38. func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
  39. r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  40. fd = int(r0)
  41. if e1 != 0 {
  42. err = errnoErr(e1)
  43. }
  44. return
  45. }
  46. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  47. func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  48. _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
  49. if e1 != 0 {
  50. err = errnoErr(e1)
  51. }
  52. return
  53. }
  54. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  55. func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  56. _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
  57. if e1 != 0 {
  58. err = errnoErr(e1)
  59. }
  60. return
  61. }
  62. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  63. func socket(domain int, typ int, proto int) (fd int, err error) {
  64. r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
  65. fd = int(r0)
  66. if e1 != 0 {
  67. err = errnoErr(e1)
  68. }
  69. return
  70. }
  71. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  72. func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
  73. _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
  74. if e1 != 0 {
  75. err = errnoErr(e1)
  76. }
  77. return
  78. }
  79. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  80. func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
  81. _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
  82. if e1 != 0 {
  83. err = errnoErr(e1)
  84. }
  85. return
  86. }
  87. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  88. func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  89. _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  90. if e1 != 0 {
  91. err = errnoErr(e1)
  92. }
  93. return
  94. }
  95. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  96. func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  97. _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  98. if e1 != 0 {
  99. err = errnoErr(e1)
  100. }
  101. return
  102. }
  103. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  104. func Shutdown(s int, how int) (err error) {
  105. _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
  106. if e1 != 0 {
  107. err = errnoErr(e1)
  108. }
  109. return
  110. }
  111. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  112. func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
  113. _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
  114. if e1 != 0 {
  115. err = errnoErr(e1)
  116. }
  117. return
  118. }
  119. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  120. func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
  121. var _p0 unsafe.Pointer
  122. if len(p) > 0 {
  123. _p0 = unsafe.Pointer(&p[0])
  124. } else {
  125. _p0 = unsafe.Pointer(&_zero)
  126. }
  127. r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
  128. n = int(r0)
  129. if e1 != 0 {
  130. err = errnoErr(e1)
  131. }
  132. return
  133. }
  134. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  135. func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
  136. var _p0 unsafe.Pointer
  137. if len(buf) > 0 {
  138. _p0 = unsafe.Pointer(&buf[0])
  139. } else {
  140. _p0 = unsafe.Pointer(&_zero)
  141. }
  142. _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
  143. if e1 != 0 {
  144. err = errnoErr(e1)
  145. }
  146. return
  147. }
  148. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  149. func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  150. r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  151. n = int(r0)
  152. if e1 != 0 {
  153. err = errnoErr(e1)
  154. }
  155. return
  156. }
  157. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  158. func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  159. r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  160. n = int(r0)
  161. if e1 != 0 {
  162. err = errnoErr(e1)
  163. }
  164. return
  165. }
  166. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  167. func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
  168. r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
  169. n = int(r0)
  170. if e1 != 0 {
  171. err = errnoErr(e1)
  172. }
  173. return
  174. }
  175. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  176. func utimes(path string, timeval *[2]Timeval) (err error) {
  177. var _p0 *byte
  178. _p0, err = BytePtrFromString(path)
  179. if err != nil {
  180. return
  181. }
  182. _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
  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 futimes(fd int, timeval *[2]Timeval) (err error) {
  190. _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
  191. if e1 != 0 {
  192. err = errnoErr(e1)
  193. }
  194. return
  195. }
  196. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  197. func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
  198. r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
  199. n = int(r0)
  200. if e1 != 0 {
  201. err = errnoErr(e1)
  202. }
  203. return
  204. }
  205. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  206. func Madvise(b []byte, behav int) (err error) {
  207. var _p0 unsafe.Pointer
  208. if len(b) > 0 {
  209. _p0 = unsafe.Pointer(&b[0])
  210. } else {
  211. _p0 = unsafe.Pointer(&_zero)
  212. }
  213. _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
  214. if e1 != 0 {
  215. err = errnoErr(e1)
  216. }
  217. return
  218. }
  219. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  220. func Mlock(b []byte) (err error) {
  221. var _p0 unsafe.Pointer
  222. if len(b) > 0 {
  223. _p0 = unsafe.Pointer(&b[0])
  224. } else {
  225. _p0 = unsafe.Pointer(&_zero)
  226. }
  227. _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
  228. if e1 != 0 {
  229. err = errnoErr(e1)
  230. }
  231. return
  232. }
  233. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  234. func Mlockall(flags int) (err error) {
  235. _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
  236. if e1 != 0 {
  237. err = errnoErr(e1)
  238. }
  239. return
  240. }
  241. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  242. func Mprotect(b []byte, prot int) (err error) {
  243. var _p0 unsafe.Pointer
  244. if len(b) > 0 {
  245. _p0 = unsafe.Pointer(&b[0])
  246. } else {
  247. _p0 = unsafe.Pointer(&_zero)
  248. }
  249. _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
  250. if e1 != 0 {
  251. err = errnoErr(e1)
  252. }
  253. return
  254. }
  255. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  256. func Msync(b []byte, flags int) (err error) {
  257. var _p0 unsafe.Pointer
  258. if len(b) > 0 {
  259. _p0 = unsafe.Pointer(&b[0])
  260. } else {
  261. _p0 = unsafe.Pointer(&_zero)
  262. }
  263. _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
  264. if e1 != 0 {
  265. err = errnoErr(e1)
  266. }
  267. return
  268. }
  269. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  270. func Munlock(b []byte) (err error) {
  271. var _p0 unsafe.Pointer
  272. if len(b) > 0 {
  273. _p0 = unsafe.Pointer(&b[0])
  274. } else {
  275. _p0 = unsafe.Pointer(&_zero)
  276. }
  277. _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
  278. if e1 != 0 {
  279. err = errnoErr(e1)
  280. }
  281. return
  282. }
  283. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  284. func Munlockall() (err error) {
  285. _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
  286. if e1 != 0 {
  287. err = errnoErr(e1)
  288. }
  289. return
  290. }
  291. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  292. func pipe2(p *[2]_C_int, flags int) (err error) {
  293. _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
  294. if e1 != 0 {
  295. err = errnoErr(e1)
  296. }
  297. return
  298. }
  299. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  300. func Getdents(fd int, buf []byte) (n int, err error) {
  301. var _p0 unsafe.Pointer
  302. if len(buf) > 0 {
  303. _p0 = unsafe.Pointer(&buf[0])
  304. } else {
  305. _p0 = unsafe.Pointer(&_zero)
  306. }
  307. r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
  308. n = int(r0)
  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 Getcwd(buf []byte) (n int, err error) {
  316. var _p0 unsafe.Pointer
  317. if len(buf) > 0 {
  318. _p0 = unsafe.Pointer(&buf[0])
  319. } else {
  320. _p0 = unsafe.Pointer(&_zero)
  321. }
  322. r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 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 ioctl(fd int, req uint, arg uintptr) (err error) {
  331. _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
  332. if e1 != 0 {
  333. err = errnoErr(e1)
  334. }
  335. return
  336. }
  337. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  338. func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
  339. var _p0 unsafe.Pointer
  340. if len(mib) > 0 {
  341. _p0 = unsafe.Pointer(&mib[0])
  342. } else {
  343. _p0 = unsafe.Pointer(&_zero)
  344. }
  345. _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
  346. if e1 != 0 {
  347. err = errnoErr(e1)
  348. }
  349. return
  350. }
  351. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  352. func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
  353. r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
  354. n = int(r0)
  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 Access(path string, mode uint32) (err error) {
  362. var _p0 *byte
  363. _p0, err = BytePtrFromString(path)
  364. if err != nil {
  365. return
  366. }
  367. _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  368. if e1 != 0 {
  369. err = errnoErr(e1)
  370. }
  371. return
  372. }
  373. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  374. func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
  375. _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
  376. if e1 != 0 {
  377. err = errnoErr(e1)
  378. }
  379. return
  380. }
  381. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  382. func Chdir(path string) (err error) {
  383. var _p0 *byte
  384. _p0, err = BytePtrFromString(path)
  385. if err != nil {
  386. return
  387. }
  388. _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
  389. if e1 != 0 {
  390. err = errnoErr(e1)
  391. }
  392. return
  393. }
  394. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  395. func Chflags(path string, flags int) (err error) {
  396. var _p0 *byte
  397. _p0, err = BytePtrFromString(path)
  398. if err != nil {
  399. return
  400. }
  401. _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  402. if e1 != 0 {
  403. err = errnoErr(e1)
  404. }
  405. return
  406. }
  407. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  408. func Chmod(path string, mode uint32) (err error) {
  409. var _p0 *byte
  410. _p0, err = BytePtrFromString(path)
  411. if err != nil {
  412. return
  413. }
  414. _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  415. if e1 != 0 {
  416. err = errnoErr(e1)
  417. }
  418. return
  419. }
  420. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  421. func Chown(path string, uid int, gid int) (err error) {
  422. var _p0 *byte
  423. _p0, err = BytePtrFromString(path)
  424. if err != nil {
  425. return
  426. }
  427. _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  428. if e1 != 0 {
  429. err = errnoErr(e1)
  430. }
  431. return
  432. }
  433. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  434. func Chroot(path string) (err error) {
  435. var _p0 *byte
  436. _p0, err = BytePtrFromString(path)
  437. if err != nil {
  438. return
  439. }
  440. _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
  441. if e1 != 0 {
  442. err = errnoErr(e1)
  443. }
  444. return
  445. }
  446. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  447. func Close(fd int) (err error) {
  448. _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
  449. if e1 != 0 {
  450. err = errnoErr(e1)
  451. }
  452. return
  453. }
  454. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  455. func Dup(fd int) (nfd int, err error) {
  456. r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
  457. nfd = int(r0)
  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 Dup2(from int, to int) (err error) {
  465. _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
  466. if e1 != 0 {
  467. err = errnoErr(e1)
  468. }
  469. return
  470. }
  471. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  472. func Dup3(from int, to int, flags int) (err error) {
  473. _, _, e1 := Syscall(SYS_DUP3, uintptr(from), uintptr(to), uintptr(flags))
  474. if e1 != 0 {
  475. err = errnoErr(e1)
  476. }
  477. return
  478. }
  479. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  480. func Exit(code int) {
  481. Syscall(SYS_EXIT, uintptr(code), 0, 0)
  482. return
  483. }
  484. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  485. func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
  486. var _p0 *byte
  487. _p0, err = BytePtrFromString(path)
  488. if err != nil {
  489. return
  490. }
  491. _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
  492. if e1 != 0 {
  493. err = errnoErr(e1)
  494. }
  495. return
  496. }
  497. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  498. func Fchdir(fd int) (err error) {
  499. _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
  500. if e1 != 0 {
  501. err = errnoErr(e1)
  502. }
  503. return
  504. }
  505. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  506. func Fchflags(fd int, flags int) (err error) {
  507. _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
  508. if e1 != 0 {
  509. err = errnoErr(e1)
  510. }
  511. return
  512. }
  513. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  514. func Fchmod(fd int, mode uint32) (err error) {
  515. _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
  516. if e1 != 0 {
  517. err = errnoErr(e1)
  518. }
  519. return
  520. }
  521. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  522. func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
  523. var _p0 *byte
  524. _p0, err = BytePtrFromString(path)
  525. if err != nil {
  526. return
  527. }
  528. _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
  529. if e1 != 0 {
  530. err = errnoErr(e1)
  531. }
  532. return
  533. }
  534. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  535. func Fchown(fd int, uid int, gid int) (err error) {
  536. _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
  537. if e1 != 0 {
  538. err = errnoErr(e1)
  539. }
  540. return
  541. }
  542. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  543. func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
  544. var _p0 *byte
  545. _p0, err = BytePtrFromString(path)
  546. if err != nil {
  547. return
  548. }
  549. _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
  550. if e1 != 0 {
  551. err = errnoErr(e1)
  552. }
  553. return
  554. }
  555. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  556. func Flock(fd int, how int) (err error) {
  557. _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
  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 Fpathconf(fd int, name int) (val int, err error) {
  565. r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
  566. val = int(r0)
  567. if e1 != 0 {
  568. err = errnoErr(e1)
  569. }
  570. return
  571. }
  572. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  573. func Fstat(fd int, stat *Stat_t) (err error) {
  574. _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  575. if e1 != 0 {
  576. err = errnoErr(e1)
  577. }
  578. return
  579. }
  580. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  581. func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
  582. var _p0 *byte
  583. _p0, err = BytePtrFromString(path)
  584. if err != nil {
  585. return
  586. }
  587. _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
  588. if e1 != 0 {
  589. err = errnoErr(e1)
  590. }
  591. return
  592. }
  593. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  594. func Fstatfs(fd int, stat *Statfs_t) (err error) {
  595. _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  596. if e1 != 0 {
  597. err = errnoErr(e1)
  598. }
  599. return
  600. }
  601. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  602. func Fsync(fd int) (err error) {
  603. _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
  604. if e1 != 0 {
  605. err = errnoErr(e1)
  606. }
  607. return
  608. }
  609. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  610. func Ftruncate(fd int, length int64) (err error) {
  611. _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length))
  612. if e1 != 0 {
  613. err = errnoErr(e1)
  614. }
  615. return
  616. }
  617. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  618. func Getegid() (egid int) {
  619. r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
  620. egid = int(r0)
  621. return
  622. }
  623. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  624. func Geteuid() (uid int) {
  625. r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
  626. uid = int(r0)
  627. return
  628. }
  629. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  630. func Getgid() (gid int) {
  631. r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
  632. gid = int(r0)
  633. return
  634. }
  635. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  636. func Getpgid(pid int) (pgid int, err error) {
  637. r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
  638. pgid = int(r0)
  639. if e1 != 0 {
  640. err = errnoErr(e1)
  641. }
  642. return
  643. }
  644. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  645. func Getpgrp() (pgrp int) {
  646. r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
  647. pgrp = int(r0)
  648. return
  649. }
  650. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  651. func Getpid() (pid int) {
  652. r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
  653. pid = int(r0)
  654. return
  655. }
  656. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  657. func Getppid() (ppid int) {
  658. r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
  659. ppid = int(r0)
  660. return
  661. }
  662. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  663. func Getpriority(which int, who int) (prio int, err error) {
  664. r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
  665. prio = int(r0)
  666. if e1 != 0 {
  667. err = errnoErr(e1)
  668. }
  669. return
  670. }
  671. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  672. func Getrlimit(which int, lim *Rlimit) (err error) {
  673. _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
  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 Getrtable() (rtable int, err error) {
  681. r0, _, e1 := RawSyscall(SYS_GETRTABLE, 0, 0, 0)
  682. rtable = int(r0)
  683. if e1 != 0 {
  684. err = errnoErr(e1)
  685. }
  686. return
  687. }
  688. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  689. func Getrusage(who int, rusage *Rusage) (err error) {
  690. _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
  691. if e1 != 0 {
  692. err = errnoErr(e1)
  693. }
  694. return
  695. }
  696. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  697. func Getsid(pid int) (sid int, err error) {
  698. r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
  699. sid = int(r0)
  700. if e1 != 0 {
  701. err = errnoErr(e1)
  702. }
  703. return
  704. }
  705. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  706. func Gettimeofday(tv *Timeval) (err error) {
  707. _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  708. if e1 != 0 {
  709. err = errnoErr(e1)
  710. }
  711. return
  712. }
  713. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  714. func Getuid() (uid int) {
  715. r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
  716. uid = int(r0)
  717. return
  718. }
  719. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  720. func Issetugid() (tainted bool) {
  721. r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
  722. tainted = bool(r0 != 0)
  723. return
  724. }
  725. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  726. func Kill(pid int, signum syscall.Signal) (err error) {
  727. _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
  728. if e1 != 0 {
  729. err = errnoErr(e1)
  730. }
  731. return
  732. }
  733. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  734. func Kqueue() (fd int, err error) {
  735. r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
  736. fd = int(r0)
  737. if e1 != 0 {
  738. err = errnoErr(e1)
  739. }
  740. return
  741. }
  742. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  743. func Lchown(path string, uid int, gid int) (err error) {
  744. var _p0 *byte
  745. _p0, err = BytePtrFromString(path)
  746. if err != nil {
  747. return
  748. }
  749. _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  750. if e1 != 0 {
  751. err = errnoErr(e1)
  752. }
  753. return
  754. }
  755. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  756. func Link(path string, link string) (err error) {
  757. var _p0 *byte
  758. _p0, err = BytePtrFromString(path)
  759. if err != nil {
  760. return
  761. }
  762. var _p1 *byte
  763. _p1, err = BytePtrFromString(link)
  764. if err != nil {
  765. return
  766. }
  767. _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  768. if e1 != 0 {
  769. err = errnoErr(e1)
  770. }
  771. return
  772. }
  773. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  774. func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
  775. var _p0 *byte
  776. _p0, err = BytePtrFromString(path)
  777. if err != nil {
  778. return
  779. }
  780. var _p1 *byte
  781. _p1, err = BytePtrFromString(link)
  782. if err != nil {
  783. return
  784. }
  785. _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
  786. if e1 != 0 {
  787. err = errnoErr(e1)
  788. }
  789. return
  790. }
  791. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  792. func Listen(s int, backlog int) (err error) {
  793. _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 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 Lstat(path string, stat *Stat_t) (err error) {
  801. var _p0 *byte
  802. _p0, err = BytePtrFromString(path)
  803. if err != nil {
  804. return
  805. }
  806. _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  807. if e1 != 0 {
  808. err = errnoErr(e1)
  809. }
  810. return
  811. }
  812. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  813. func Mkdir(path string, mode uint32) (err error) {
  814. var _p0 *byte
  815. _p0, err = BytePtrFromString(path)
  816. if err != nil {
  817. return
  818. }
  819. _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 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 Mkdirat(dirfd int, path string, mode uint32) (err error) {
  827. var _p0 *byte
  828. _p0, err = BytePtrFromString(path)
  829. if err != nil {
  830. return
  831. }
  832. _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  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 Mkfifo(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_MKFIFO, 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 Mkfifoat(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_MKFIFOAT, 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 Mknod(path string, mode uint32, dev int) (err error) {
  866. var _p0 *byte
  867. _p0, err = BytePtrFromString(path)
  868. if err != nil {
  869. return
  870. }
  871. _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
  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 Mknodat(dirfd int, 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 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
  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 Nanosleep(time *Timespec, leftover *Timespec) (err error) {
  892. _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
  893. if e1 != 0 {
  894. err = errnoErr(e1)
  895. }
  896. return
  897. }
  898. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  899. func Open(path string, mode int, perm uint32) (fd int, err error) {
  900. var _p0 *byte
  901. _p0, err = BytePtrFromString(path)
  902. if err != nil {
  903. return
  904. }
  905. r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
  906. fd = int(r0)
  907. if e1 != 0 {
  908. err = errnoErr(e1)
  909. }
  910. return
  911. }
  912. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  913. func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
  914. var _p0 *byte
  915. _p0, err = BytePtrFromString(path)
  916. if err != nil {
  917. return
  918. }
  919. r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
  920. fd = int(r0)
  921. if e1 != 0 {
  922. err = errnoErr(e1)
  923. }
  924. return
  925. }
  926. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  927. func Pathconf(path string, name int) (val int, err error) {
  928. var _p0 *byte
  929. _p0, err = BytePtrFromString(path)
  930. if err != nil {
  931. return
  932. }
  933. r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
  934. val = int(r0)
  935. if e1 != 0 {
  936. err = errnoErr(e1)
  937. }
  938. return
  939. }
  940. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  941. func Pread(fd int, p []byte, offset int64) (n int, err error) {
  942. var _p0 unsafe.Pointer
  943. if len(p) > 0 {
  944. _p0 = unsafe.Pointer(&p[0])
  945. } else {
  946. _p0 = unsafe.Pointer(&_zero)
  947. }
  948. r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0)
  949. n = int(r0)
  950. if e1 != 0 {
  951. err = errnoErr(e1)
  952. }
  953. return
  954. }
  955. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  956. func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  957. var _p0 unsafe.Pointer
  958. if len(p) > 0 {
  959. _p0 = unsafe.Pointer(&p[0])
  960. } else {
  961. _p0 = unsafe.Pointer(&_zero)
  962. }
  963. r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0)
  964. n = int(r0)
  965. if e1 != 0 {
  966. err = errnoErr(e1)
  967. }
  968. return
  969. }
  970. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  971. func read(fd int, p []byte) (n int, err error) {
  972. var _p0 unsafe.Pointer
  973. if len(p) > 0 {
  974. _p0 = unsafe.Pointer(&p[0])
  975. } else {
  976. _p0 = unsafe.Pointer(&_zero)
  977. }
  978. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  979. n = int(r0)
  980. if e1 != 0 {
  981. err = errnoErr(e1)
  982. }
  983. return
  984. }
  985. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  986. func Readlink(path string, buf []byte) (n int, err error) {
  987. var _p0 *byte
  988. _p0, err = BytePtrFromString(path)
  989. if err != nil {
  990. return
  991. }
  992. var _p1 unsafe.Pointer
  993. if len(buf) > 0 {
  994. _p1 = unsafe.Pointer(&buf[0])
  995. } else {
  996. _p1 = unsafe.Pointer(&_zero)
  997. }
  998. r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
  999. n = int(r0)
  1000. if e1 != 0 {
  1001. err = errnoErr(e1)
  1002. }
  1003. return
  1004. }
  1005. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1006. func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
  1007. var _p0 *byte
  1008. _p0, err = BytePtrFromString(path)
  1009. if err != nil {
  1010. return
  1011. }
  1012. var _p1 unsafe.Pointer
  1013. if len(buf) > 0 {
  1014. _p1 = unsafe.Pointer(&buf[0])
  1015. } else {
  1016. _p1 = unsafe.Pointer(&_zero)
  1017. }
  1018. r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
  1019. n = int(r0)
  1020. if e1 != 0 {
  1021. err = errnoErr(e1)
  1022. }
  1023. return
  1024. }
  1025. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1026. func Rename(from string, to string) (err error) {
  1027. var _p0 *byte
  1028. _p0, err = BytePtrFromString(from)
  1029. if err != nil {
  1030. return
  1031. }
  1032. var _p1 *byte
  1033. _p1, err = BytePtrFromString(to)
  1034. if err != nil {
  1035. return
  1036. }
  1037. _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1038. if e1 != 0 {
  1039. err = errnoErr(e1)
  1040. }
  1041. return
  1042. }
  1043. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1044. func Renameat(fromfd int, from string, tofd int, to string) (err error) {
  1045. var _p0 *byte
  1046. _p0, err = BytePtrFromString(from)
  1047. if err != nil {
  1048. return
  1049. }
  1050. var _p1 *byte
  1051. _p1, err = BytePtrFromString(to)
  1052. if err != nil {
  1053. return
  1054. }
  1055. _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
  1056. if e1 != 0 {
  1057. err = errnoErr(e1)
  1058. }
  1059. return
  1060. }
  1061. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1062. func Revoke(path string) (err error) {
  1063. var _p0 *byte
  1064. _p0, err = BytePtrFromString(path)
  1065. if err != nil {
  1066. return
  1067. }
  1068. _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1069. if e1 != 0 {
  1070. err = errnoErr(e1)
  1071. }
  1072. return
  1073. }
  1074. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1075. func Rmdir(path string) (err error) {
  1076. var _p0 *byte
  1077. _p0, err = BytePtrFromString(path)
  1078. if err != nil {
  1079. return
  1080. }
  1081. _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1082. if e1 != 0 {
  1083. err = errnoErr(e1)
  1084. }
  1085. return
  1086. }
  1087. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1088. func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
  1089. r0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0)
  1090. newoffset = int64(r0)
  1091. if e1 != 0 {
  1092. err = errnoErr(e1)
  1093. }
  1094. return
  1095. }
  1096. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1097. func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
  1098. r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
  1099. n = int(r0)
  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 Setegid(egid int) (err error) {
  1107. _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 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 Seteuid(euid int) (err error) {
  1115. _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
  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 Setgid(gid int) (err error) {
  1123. _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 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 Setlogin(name string) (err error) {
  1131. var _p0 *byte
  1132. _p0, err = BytePtrFromString(name)
  1133. if err != nil {
  1134. return
  1135. }
  1136. _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1137. if e1 != 0 {
  1138. err = errnoErr(e1)
  1139. }
  1140. return
  1141. }
  1142. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1143. func Setpgid(pid int, pgid int) (err error) {
  1144. _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
  1145. if e1 != 0 {
  1146. err = errnoErr(e1)
  1147. }
  1148. return
  1149. }
  1150. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1151. func Setpriority(which int, who int, prio int) (err error) {
  1152. _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
  1153. if e1 != 0 {
  1154. err = errnoErr(e1)
  1155. }
  1156. return
  1157. }
  1158. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1159. func Setregid(rgid int, egid int) (err error) {
  1160. _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
  1161. if e1 != 0 {
  1162. err = errnoErr(e1)
  1163. }
  1164. return
  1165. }
  1166. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1167. func Setreuid(ruid int, euid int) (err error) {
  1168. _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
  1169. if e1 != 0 {
  1170. err = errnoErr(e1)
  1171. }
  1172. return
  1173. }
  1174. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1175. func Setresgid(rgid int, egid int, sgid int) (err error) {
  1176. _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
  1177. if e1 != 0 {
  1178. err = errnoErr(e1)
  1179. }
  1180. return
  1181. }
  1182. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1183. func Setresuid(ruid int, euid int, suid int) (err error) {
  1184. _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
  1185. if e1 != 0 {
  1186. err = errnoErr(e1)
  1187. }
  1188. return
  1189. }
  1190. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1191. func Setrlimit(which int, lim *Rlimit) (err error) {
  1192. _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
  1193. if e1 != 0 {
  1194. err = errnoErr(e1)
  1195. }
  1196. return
  1197. }
  1198. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1199. func Setrtable(rtable int) (err error) {
  1200. _, _, e1 := RawSyscall(SYS_SETRTABLE, uintptr(rtable), 0, 0)
  1201. if e1 != 0 {
  1202. err = errnoErr(e1)
  1203. }
  1204. return
  1205. }
  1206. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1207. func Setsid() (pid int, err error) {
  1208. r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
  1209. pid = int(r0)
  1210. if e1 != 0 {
  1211. err = errnoErr(e1)
  1212. }
  1213. return
  1214. }
  1215. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1216. func Settimeofday(tp *Timeval) (err error) {
  1217. _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
  1218. if e1 != 0 {
  1219. err = errnoErr(e1)
  1220. }
  1221. return
  1222. }
  1223. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1224. func Setuid(uid int) (err error) {
  1225. _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
  1226. if e1 != 0 {
  1227. err = errnoErr(e1)
  1228. }
  1229. return
  1230. }
  1231. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1232. func Stat(path string, stat *Stat_t) (err error) {
  1233. var _p0 *byte
  1234. _p0, err = BytePtrFromString(path)
  1235. if err != nil {
  1236. return
  1237. }
  1238. _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1239. if e1 != 0 {
  1240. err = errnoErr(e1)
  1241. }
  1242. return
  1243. }
  1244. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1245. func Statfs(path string, stat *Statfs_t) (err error) {
  1246. var _p0 *byte
  1247. _p0, err = BytePtrFromString(path)
  1248. if err != nil {
  1249. return
  1250. }
  1251. _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1252. if e1 != 0 {
  1253. err = errnoErr(e1)
  1254. }
  1255. return
  1256. }
  1257. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1258. func Symlink(path string, link string) (err error) {
  1259. var _p0 *byte
  1260. _p0, err = BytePtrFromString(path)
  1261. if err != nil {
  1262. return
  1263. }
  1264. var _p1 *byte
  1265. _p1, err = BytePtrFromString(link)
  1266. if err != nil {
  1267. return
  1268. }
  1269. _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1270. if e1 != 0 {
  1271. err = errnoErr(e1)
  1272. }
  1273. return
  1274. }
  1275. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1276. func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
  1277. var _p0 *byte
  1278. _p0, err = BytePtrFromString(oldpath)
  1279. if err != nil {
  1280. return
  1281. }
  1282. var _p1 *byte
  1283. _p1, err = BytePtrFromString(newpath)
  1284. if err != nil {
  1285. return
  1286. }
  1287. _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
  1288. if e1 != 0 {
  1289. err = errnoErr(e1)
  1290. }
  1291. return
  1292. }
  1293. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1294. func Sync() (err error) {
  1295. _, _, e1 := Syscall(SYS_SYNC, 0, 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 Truncate(path string, length int64) (err error) {
  1303. var _p0 *byte
  1304. _p0, err = BytePtrFromString(path)
  1305. if err != nil {
  1306. return
  1307. }
  1308. _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length))
  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 Umask(newmask int) (oldmask int) {
  1316. r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
  1317. oldmask = int(r0)
  1318. return
  1319. }
  1320. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1321. func Unlink(path string) (err error) {
  1322. var _p0 *byte
  1323. _p0, err = BytePtrFromString(path)
  1324. if err != nil {
  1325. return
  1326. }
  1327. _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1328. if e1 != 0 {
  1329. err = errnoErr(e1)
  1330. }
  1331. return
  1332. }
  1333. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1334. func Unlinkat(dirfd int, path string, flags int) (err error) {
  1335. var _p0 *byte
  1336. _p0, err = BytePtrFromString(path)
  1337. if err != nil {
  1338. return
  1339. }
  1340. _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
  1341. if e1 != 0 {
  1342. err = errnoErr(e1)
  1343. }
  1344. return
  1345. }
  1346. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1347. func Unmount(path string, flags int) (err error) {
  1348. var _p0 *byte
  1349. _p0, err = BytePtrFromString(path)
  1350. if err != nil {
  1351. return
  1352. }
  1353. _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 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 write(fd int, p []byte) (n int, err error) {
  1361. var _p0 unsafe.Pointer
  1362. if len(p) > 0 {
  1363. _p0 = unsafe.Pointer(&p[0])
  1364. } else {
  1365. _p0 = unsafe.Pointer(&_zero)
  1366. }
  1367. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1368. n = int(r0)
  1369. if e1 != 0 {
  1370. err = errnoErr(e1)
  1371. }
  1372. return
  1373. }
  1374. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1375. func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
  1376. r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0)
  1377. ret = uintptr(r0)
  1378. if e1 != 0 {
  1379. err = errnoErr(e1)
  1380. }
  1381. return
  1382. }
  1383. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1384. func munmap(addr uintptr, length uintptr) (err error) {
  1385. _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
  1386. if e1 != 0 {
  1387. err = errnoErr(e1)
  1388. }
  1389. return
  1390. }
  1391. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1392. func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
  1393. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1394. n = int(r0)
  1395. if e1 != 0 {
  1396. err = errnoErr(e1)
  1397. }
  1398. return
  1399. }
  1400. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1401. func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
  1402. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1403. n = int(r0)
  1404. if e1 != 0 {
  1405. err = errnoErr(e1)
  1406. }
  1407. return
  1408. }
  1409. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1410. func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
  1411. var _p0 *byte
  1412. _p0, err = BytePtrFromString(path)
  1413. if err != nil {
  1414. return
  1415. }
  1416. _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
  1417. if e1 != 0 {
  1418. err = errnoErr(e1)
  1419. }
  1420. return
  1421. }