zsyscall_darwin_arm.1_11.go 42 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768
  1. // go run mksyscall.go -l32 -tags darwin,arm,!go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_arm.1_11.go syscall_darwin_arm.go
  2. // Code generated by the command above; see README.md. DO NOT EDIT.
  3. // +build darwin,arm,!go1.12
  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 utimes(path string, timeval *[2]Timeval) (err error) {
  176. var _p0 *byte
  177. _p0, err = BytePtrFromString(path)
  178. if err != nil {
  179. return
  180. }
  181. _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
  182. if e1 != 0 {
  183. err = errnoErr(e1)
  184. }
  185. return
  186. }
  187. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  188. func futimes(fd int, timeval *[2]Timeval) (err error) {
  189. _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
  190. if e1 != 0 {
  191. err = errnoErr(e1)
  192. }
  193. return
  194. }
  195. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  196. func fcntl(fd int, cmd int, arg int) (val int, err error) {
  197. r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
  198. val = int(r0)
  199. if e1 != 0 {
  200. err = errnoErr(e1)
  201. }
  202. return
  203. }
  204. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  205. func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
  206. r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
  207. n = int(r0)
  208. if e1 != 0 {
  209. err = errnoErr(e1)
  210. }
  211. return
  212. }
  213. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  214. func Madvise(b []byte, behav int) (err error) {
  215. var _p0 unsafe.Pointer
  216. if len(b) > 0 {
  217. _p0 = unsafe.Pointer(&b[0])
  218. } else {
  219. _p0 = unsafe.Pointer(&_zero)
  220. }
  221. _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
  222. if e1 != 0 {
  223. err = errnoErr(e1)
  224. }
  225. return
  226. }
  227. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  228. func Mlock(b []byte) (err error) {
  229. var _p0 unsafe.Pointer
  230. if len(b) > 0 {
  231. _p0 = unsafe.Pointer(&b[0])
  232. } else {
  233. _p0 = unsafe.Pointer(&_zero)
  234. }
  235. _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 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 Mlockall(flags int) (err error) {
  243. _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
  244. if e1 != 0 {
  245. err = errnoErr(e1)
  246. }
  247. return
  248. }
  249. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  250. func Mprotect(b []byte, prot int) (err error) {
  251. var _p0 unsafe.Pointer
  252. if len(b) > 0 {
  253. _p0 = unsafe.Pointer(&b[0])
  254. } else {
  255. _p0 = unsafe.Pointer(&_zero)
  256. }
  257. _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
  258. if e1 != 0 {
  259. err = errnoErr(e1)
  260. }
  261. return
  262. }
  263. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  264. func Msync(b []byte, flags int) (err error) {
  265. var _p0 unsafe.Pointer
  266. if len(b) > 0 {
  267. _p0 = unsafe.Pointer(&b[0])
  268. } else {
  269. _p0 = unsafe.Pointer(&_zero)
  270. }
  271. _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
  272. if e1 != 0 {
  273. err = errnoErr(e1)
  274. }
  275. return
  276. }
  277. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  278. func Munlock(b []byte) (err error) {
  279. var _p0 unsafe.Pointer
  280. if len(b) > 0 {
  281. _p0 = unsafe.Pointer(&b[0])
  282. } else {
  283. _p0 = unsafe.Pointer(&_zero)
  284. }
  285. _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 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 Munlockall() (err error) {
  293. _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 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 getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
  301. _, _, e1 := Syscall6(SYS_GETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
  302. if e1 != 0 {
  303. err = errnoErr(e1)
  304. }
  305. return
  306. }
  307. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  308. func pipe() (r int, w int, err error) {
  309. r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
  310. r = int(r0)
  311. w = int(r1)
  312. if e1 != 0 {
  313. err = errnoErr(e1)
  314. }
  315. return
  316. }
  317. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  318. func getxattr(path string, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
  319. var _p0 *byte
  320. _p0, err = BytePtrFromString(path)
  321. if err != nil {
  322. return
  323. }
  324. var _p1 *byte
  325. _p1, err = BytePtrFromString(attr)
  326. if err != nil {
  327. return
  328. }
  329. r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
  330. sz = int(r0)
  331. if e1 != 0 {
  332. err = errnoErr(e1)
  333. }
  334. return
  335. }
  336. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  337. func fgetxattr(fd int, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
  338. var _p0 *byte
  339. _p0, err = BytePtrFromString(attr)
  340. if err != nil {
  341. return
  342. }
  343. r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
  344. sz = int(r0)
  345. if e1 != 0 {
  346. err = errnoErr(e1)
  347. }
  348. return
  349. }
  350. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  351. func setxattr(path string, attr string, data *byte, size int, position uint32, options int) (err error) {
  352. var _p0 *byte
  353. _p0, err = BytePtrFromString(path)
  354. if err != nil {
  355. return
  356. }
  357. var _p1 *byte
  358. _p1, err = BytePtrFromString(attr)
  359. if err != nil {
  360. return
  361. }
  362. _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
  363. if e1 != 0 {
  364. err = errnoErr(e1)
  365. }
  366. return
  367. }
  368. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  369. func fsetxattr(fd int, attr string, data *byte, size int, position uint32, options int) (err error) {
  370. var _p0 *byte
  371. _p0, err = BytePtrFromString(attr)
  372. if err != nil {
  373. return
  374. }
  375. _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
  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 removexattr(path string, attr string, options int) (err error) {
  383. var _p0 *byte
  384. _p0, err = BytePtrFromString(path)
  385. if err != nil {
  386. return
  387. }
  388. var _p1 *byte
  389. _p1, err = BytePtrFromString(attr)
  390. if err != nil {
  391. return
  392. }
  393. _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
  394. if e1 != 0 {
  395. err = errnoErr(e1)
  396. }
  397. return
  398. }
  399. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  400. func fremovexattr(fd int, attr string, options int) (err error) {
  401. var _p0 *byte
  402. _p0, err = BytePtrFromString(attr)
  403. if err != nil {
  404. return
  405. }
  406. _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(options))
  407. if e1 != 0 {
  408. err = errnoErr(e1)
  409. }
  410. return
  411. }
  412. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  413. func listxattr(path string, dest *byte, size int, options int) (sz int, err error) {
  414. var _p0 *byte
  415. _p0, err = BytePtrFromString(path)
  416. if err != nil {
  417. return
  418. }
  419. r0, _, e1 := Syscall6(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
  420. sz = int(r0)
  421. if e1 != 0 {
  422. err = errnoErr(e1)
  423. }
  424. return
  425. }
  426. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  427. func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) {
  428. r0, _, e1 := Syscall6(SYS_FLISTXATTR, uintptr(fd), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
  429. sz = int(r0)
  430. if e1 != 0 {
  431. err = errnoErr(e1)
  432. }
  433. return
  434. }
  435. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  436. func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
  437. _, _, e1 := Syscall6(SYS_SETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
  438. if e1 != 0 {
  439. err = errnoErr(e1)
  440. }
  441. return
  442. }
  443. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  444. func kill(pid int, signum int, posix int) (err error) {
  445. _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
  446. if e1 != 0 {
  447. err = errnoErr(e1)
  448. }
  449. return
  450. }
  451. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  452. func ioctl(fd int, req uint, arg uintptr) (err error) {
  453. _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
  454. if e1 != 0 {
  455. err = errnoErr(e1)
  456. }
  457. return
  458. }
  459. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  460. func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
  461. _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(offset>>32), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags), 0, 0)
  462. if e1 != 0 {
  463. err = errnoErr(e1)
  464. }
  465. return
  466. }
  467. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  468. func Access(path string, mode uint32) (err error) {
  469. var _p0 *byte
  470. _p0, err = BytePtrFromString(path)
  471. if err != nil {
  472. return
  473. }
  474. _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  475. if e1 != 0 {
  476. err = errnoErr(e1)
  477. }
  478. return
  479. }
  480. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  481. func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
  482. _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
  483. if e1 != 0 {
  484. err = errnoErr(e1)
  485. }
  486. return
  487. }
  488. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  489. func Chdir(path string) (err error) {
  490. var _p0 *byte
  491. _p0, err = BytePtrFromString(path)
  492. if err != nil {
  493. return
  494. }
  495. _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
  496. if e1 != 0 {
  497. err = errnoErr(e1)
  498. }
  499. return
  500. }
  501. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  502. func Chflags(path string, flags int) (err error) {
  503. var _p0 *byte
  504. _p0, err = BytePtrFromString(path)
  505. if err != nil {
  506. return
  507. }
  508. _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  509. if e1 != 0 {
  510. err = errnoErr(e1)
  511. }
  512. return
  513. }
  514. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  515. func Chmod(path string, mode uint32) (err error) {
  516. var _p0 *byte
  517. _p0, err = BytePtrFromString(path)
  518. if err != nil {
  519. return
  520. }
  521. _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  522. if e1 != 0 {
  523. err = errnoErr(e1)
  524. }
  525. return
  526. }
  527. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  528. func Chown(path string, uid int, gid int) (err error) {
  529. var _p0 *byte
  530. _p0, err = BytePtrFromString(path)
  531. if err != nil {
  532. return
  533. }
  534. _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  535. if e1 != 0 {
  536. err = errnoErr(e1)
  537. }
  538. return
  539. }
  540. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  541. func Chroot(path string) (err error) {
  542. var _p0 *byte
  543. _p0, err = BytePtrFromString(path)
  544. if err != nil {
  545. return
  546. }
  547. _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
  548. if e1 != 0 {
  549. err = errnoErr(e1)
  550. }
  551. return
  552. }
  553. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  554. func Close(fd int) (err error) {
  555. _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
  556. if e1 != 0 {
  557. err = errnoErr(e1)
  558. }
  559. return
  560. }
  561. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  562. func Dup(fd int) (nfd int, err error) {
  563. r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
  564. nfd = int(r0)
  565. if e1 != 0 {
  566. err = errnoErr(e1)
  567. }
  568. return
  569. }
  570. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  571. func Dup2(from int, to int) (err error) {
  572. _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
  573. if e1 != 0 {
  574. err = errnoErr(e1)
  575. }
  576. return
  577. }
  578. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  579. func Exchangedata(path1 string, path2 string, options int) (err error) {
  580. var _p0 *byte
  581. _p0, err = BytePtrFromString(path1)
  582. if err != nil {
  583. return
  584. }
  585. var _p1 *byte
  586. _p1, err = BytePtrFromString(path2)
  587. if err != nil {
  588. return
  589. }
  590. _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
  591. if e1 != 0 {
  592. err = errnoErr(e1)
  593. }
  594. return
  595. }
  596. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  597. func Exit(code int) {
  598. Syscall(SYS_EXIT, uintptr(code), 0, 0)
  599. return
  600. }
  601. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  602. func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
  603. var _p0 *byte
  604. _p0, err = BytePtrFromString(path)
  605. if err != nil {
  606. return
  607. }
  608. _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
  609. if e1 != 0 {
  610. err = errnoErr(e1)
  611. }
  612. return
  613. }
  614. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  615. func Fchdir(fd int) (err error) {
  616. _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
  617. if e1 != 0 {
  618. err = errnoErr(e1)
  619. }
  620. return
  621. }
  622. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  623. func Fchflags(fd int, flags int) (err error) {
  624. _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
  625. if e1 != 0 {
  626. err = errnoErr(e1)
  627. }
  628. return
  629. }
  630. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  631. func Fchmod(fd int, mode uint32) (err error) {
  632. _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
  633. if e1 != 0 {
  634. err = errnoErr(e1)
  635. }
  636. return
  637. }
  638. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  639. func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
  640. var _p0 *byte
  641. _p0, err = BytePtrFromString(path)
  642. if err != nil {
  643. return
  644. }
  645. _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
  646. if e1 != 0 {
  647. err = errnoErr(e1)
  648. }
  649. return
  650. }
  651. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  652. func Fchown(fd int, uid int, gid int) (err error) {
  653. _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
  654. if e1 != 0 {
  655. err = errnoErr(e1)
  656. }
  657. return
  658. }
  659. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  660. func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
  661. var _p0 *byte
  662. _p0, err = BytePtrFromString(path)
  663. if err != nil {
  664. return
  665. }
  666. _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
  667. if e1 != 0 {
  668. err = errnoErr(e1)
  669. }
  670. return
  671. }
  672. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  673. func Flock(fd int, how int) (err error) {
  674. _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
  675. if e1 != 0 {
  676. err = errnoErr(e1)
  677. }
  678. return
  679. }
  680. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  681. func Fpathconf(fd int, name int) (val int, err error) {
  682. r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
  683. val = int(r0)
  684. if e1 != 0 {
  685. err = errnoErr(e1)
  686. }
  687. return
  688. }
  689. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  690. func Fsync(fd int) (err error) {
  691. _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
  692. if e1 != 0 {
  693. err = errnoErr(e1)
  694. }
  695. return
  696. }
  697. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  698. func Ftruncate(fd int, length int64) (err error) {
  699. _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), uintptr(length>>32))
  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 Getdtablesize() (size int) {
  707. r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
  708. size = int(r0)
  709. return
  710. }
  711. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  712. func Getegid() (egid int) {
  713. r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
  714. egid = int(r0)
  715. return
  716. }
  717. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  718. func Geteuid() (uid int) {
  719. r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
  720. uid = int(r0)
  721. return
  722. }
  723. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  724. func Getgid() (gid int) {
  725. r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
  726. gid = int(r0)
  727. return
  728. }
  729. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  730. func Getpgid(pid int) (pgid int, err error) {
  731. r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
  732. pgid = int(r0)
  733. if e1 != 0 {
  734. err = errnoErr(e1)
  735. }
  736. return
  737. }
  738. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  739. func Getpgrp() (pgrp int) {
  740. r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
  741. pgrp = int(r0)
  742. return
  743. }
  744. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  745. func Getpid() (pid int) {
  746. r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
  747. pid = int(r0)
  748. return
  749. }
  750. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  751. func Getppid() (ppid int) {
  752. r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
  753. ppid = int(r0)
  754. return
  755. }
  756. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  757. func Getpriority(which int, who int) (prio int, err error) {
  758. r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
  759. prio = int(r0)
  760. if e1 != 0 {
  761. err = errnoErr(e1)
  762. }
  763. return
  764. }
  765. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  766. func Getrlimit(which int, lim *Rlimit) (err error) {
  767. _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 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 Getrusage(who int, rusage *Rusage) (err error) {
  775. _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
  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 Getsid(pid int) (sid int, err error) {
  783. r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
  784. sid = int(r0)
  785. if e1 != 0 {
  786. err = errnoErr(e1)
  787. }
  788. return
  789. }
  790. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  791. func Getuid() (uid int) {
  792. r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
  793. uid = int(r0)
  794. return
  795. }
  796. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  797. func Issetugid() (tainted bool) {
  798. r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0)
  799. tainted = bool(r0 != 0)
  800. return
  801. }
  802. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  803. func Kqueue() (fd int, err error) {
  804. r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
  805. fd = int(r0)
  806. if e1 != 0 {
  807. err = errnoErr(e1)
  808. }
  809. return
  810. }
  811. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  812. func Lchown(path string, uid int, gid int) (err error) {
  813. var _p0 *byte
  814. _p0, err = BytePtrFromString(path)
  815. if err != nil {
  816. return
  817. }
  818. _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  819. if e1 != 0 {
  820. err = errnoErr(e1)
  821. }
  822. return
  823. }
  824. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  825. func Link(path string, link string) (err error) {
  826. var _p0 *byte
  827. _p0, err = BytePtrFromString(path)
  828. if err != nil {
  829. return
  830. }
  831. var _p1 *byte
  832. _p1, err = BytePtrFromString(link)
  833. if err != nil {
  834. return
  835. }
  836. _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  837. if e1 != 0 {
  838. err = errnoErr(e1)
  839. }
  840. return
  841. }
  842. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  843. func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
  844. var _p0 *byte
  845. _p0, err = BytePtrFromString(path)
  846. if err != nil {
  847. return
  848. }
  849. var _p1 *byte
  850. _p1, err = BytePtrFromString(link)
  851. if err != nil {
  852. return
  853. }
  854. _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
  855. if e1 != 0 {
  856. err = errnoErr(e1)
  857. }
  858. return
  859. }
  860. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  861. func Listen(s int, backlog int) (err error) {
  862. _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
  863. if e1 != 0 {
  864. err = errnoErr(e1)
  865. }
  866. return
  867. }
  868. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  869. func Mkdir(path string, mode uint32) (err error) {
  870. var _p0 *byte
  871. _p0, err = BytePtrFromString(path)
  872. if err != nil {
  873. return
  874. }
  875. _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  876. if e1 != 0 {
  877. err = errnoErr(e1)
  878. }
  879. return
  880. }
  881. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  882. func Mkdirat(dirfd int, path string, mode uint32) (err error) {
  883. var _p0 *byte
  884. _p0, err = BytePtrFromString(path)
  885. if err != nil {
  886. return
  887. }
  888. _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  889. if e1 != 0 {
  890. err = errnoErr(e1)
  891. }
  892. return
  893. }
  894. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  895. func Mkfifo(path string, mode uint32) (err error) {
  896. var _p0 *byte
  897. _p0, err = BytePtrFromString(path)
  898. if err != nil {
  899. return
  900. }
  901. _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  902. if e1 != 0 {
  903. err = errnoErr(e1)
  904. }
  905. return
  906. }
  907. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  908. func Mknod(path string, mode uint32, dev int) (err error) {
  909. var _p0 *byte
  910. _p0, err = BytePtrFromString(path)
  911. if err != nil {
  912. return
  913. }
  914. _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
  915. if e1 != 0 {
  916. err = errnoErr(e1)
  917. }
  918. return
  919. }
  920. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  921. func Open(path string, mode int, perm uint32) (fd int, err error) {
  922. var _p0 *byte
  923. _p0, err = BytePtrFromString(path)
  924. if err != nil {
  925. return
  926. }
  927. r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
  928. fd = int(r0)
  929. if e1 != 0 {
  930. err = errnoErr(e1)
  931. }
  932. return
  933. }
  934. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  935. func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
  936. var _p0 *byte
  937. _p0, err = BytePtrFromString(path)
  938. if err != nil {
  939. return
  940. }
  941. r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
  942. fd = int(r0)
  943. if e1 != 0 {
  944. err = errnoErr(e1)
  945. }
  946. return
  947. }
  948. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  949. func Pathconf(path string, name int) (val int, err error) {
  950. var _p0 *byte
  951. _p0, err = BytePtrFromString(path)
  952. if err != nil {
  953. return
  954. }
  955. r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
  956. val = int(r0)
  957. if e1 != 0 {
  958. err = errnoErr(e1)
  959. }
  960. return
  961. }
  962. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  963. func Pread(fd int, p []byte, offset int64) (n int, err error) {
  964. var _p0 unsafe.Pointer
  965. if len(p) > 0 {
  966. _p0 = unsafe.Pointer(&p[0])
  967. } else {
  968. _p0 = unsafe.Pointer(&_zero)
  969. }
  970. r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
  971. n = int(r0)
  972. if e1 != 0 {
  973. err = errnoErr(e1)
  974. }
  975. return
  976. }
  977. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  978. func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  979. var _p0 unsafe.Pointer
  980. if len(p) > 0 {
  981. _p0 = unsafe.Pointer(&p[0])
  982. } else {
  983. _p0 = unsafe.Pointer(&_zero)
  984. }
  985. r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
  986. n = int(r0)
  987. if e1 != 0 {
  988. err = errnoErr(e1)
  989. }
  990. return
  991. }
  992. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  993. func read(fd int, p []byte) (n int, err error) {
  994. var _p0 unsafe.Pointer
  995. if len(p) > 0 {
  996. _p0 = unsafe.Pointer(&p[0])
  997. } else {
  998. _p0 = unsafe.Pointer(&_zero)
  999. }
  1000. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1001. n = int(r0)
  1002. if e1 != 0 {
  1003. err = errnoErr(e1)
  1004. }
  1005. return
  1006. }
  1007. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1008. func Readlink(path string, buf []byte) (n int, err error) {
  1009. var _p0 *byte
  1010. _p0, err = BytePtrFromString(path)
  1011. if err != nil {
  1012. return
  1013. }
  1014. var _p1 unsafe.Pointer
  1015. if len(buf) > 0 {
  1016. _p1 = unsafe.Pointer(&buf[0])
  1017. } else {
  1018. _p1 = unsafe.Pointer(&_zero)
  1019. }
  1020. r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
  1021. n = int(r0)
  1022. if e1 != 0 {
  1023. err = errnoErr(e1)
  1024. }
  1025. return
  1026. }
  1027. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1028. func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
  1029. var _p0 *byte
  1030. _p0, err = BytePtrFromString(path)
  1031. if err != nil {
  1032. return
  1033. }
  1034. var _p1 unsafe.Pointer
  1035. if len(buf) > 0 {
  1036. _p1 = unsafe.Pointer(&buf[0])
  1037. } else {
  1038. _p1 = unsafe.Pointer(&_zero)
  1039. }
  1040. r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
  1041. n = int(r0)
  1042. if e1 != 0 {
  1043. err = errnoErr(e1)
  1044. }
  1045. return
  1046. }
  1047. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1048. func Rename(from string, to string) (err error) {
  1049. var _p0 *byte
  1050. _p0, err = BytePtrFromString(from)
  1051. if err != nil {
  1052. return
  1053. }
  1054. var _p1 *byte
  1055. _p1, err = BytePtrFromString(to)
  1056. if err != nil {
  1057. return
  1058. }
  1059. _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1060. if e1 != 0 {
  1061. err = errnoErr(e1)
  1062. }
  1063. return
  1064. }
  1065. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1066. func Renameat(fromfd int, from string, tofd int, to string) (err error) {
  1067. var _p0 *byte
  1068. _p0, err = BytePtrFromString(from)
  1069. if err != nil {
  1070. return
  1071. }
  1072. var _p1 *byte
  1073. _p1, err = BytePtrFromString(to)
  1074. if err != nil {
  1075. return
  1076. }
  1077. _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
  1078. if e1 != 0 {
  1079. err = errnoErr(e1)
  1080. }
  1081. return
  1082. }
  1083. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1084. func Revoke(path string) (err error) {
  1085. var _p0 *byte
  1086. _p0, err = BytePtrFromString(path)
  1087. if err != nil {
  1088. return
  1089. }
  1090. _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
  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 Rmdir(path string) (err error) {
  1098. var _p0 *byte
  1099. _p0, err = BytePtrFromString(path)
  1100. if err != nil {
  1101. return
  1102. }
  1103. _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1104. if e1 != 0 {
  1105. err = errnoErr(e1)
  1106. }
  1107. return
  1108. }
  1109. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1110. func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
  1111. r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0)
  1112. newoffset = int64(int64(r1)<<32 | int64(r0))
  1113. if e1 != 0 {
  1114. err = errnoErr(e1)
  1115. }
  1116. return
  1117. }
  1118. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1119. func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
  1120. r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
  1121. n = int(r0)
  1122. if e1 != 0 {
  1123. err = errnoErr(e1)
  1124. }
  1125. return
  1126. }
  1127. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1128. func Setegid(egid int) (err error) {
  1129. _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0)
  1130. if e1 != 0 {
  1131. err = errnoErr(e1)
  1132. }
  1133. return
  1134. }
  1135. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1136. func Seteuid(euid int) (err error) {
  1137. _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
  1138. if e1 != 0 {
  1139. err = errnoErr(e1)
  1140. }
  1141. return
  1142. }
  1143. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1144. func Setgid(gid int) (err error) {
  1145. _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
  1146. if e1 != 0 {
  1147. err = errnoErr(e1)
  1148. }
  1149. return
  1150. }
  1151. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1152. func Setlogin(name string) (err error) {
  1153. var _p0 *byte
  1154. _p0, err = BytePtrFromString(name)
  1155. if err != nil {
  1156. return
  1157. }
  1158. _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1159. if e1 != 0 {
  1160. err = errnoErr(e1)
  1161. }
  1162. return
  1163. }
  1164. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1165. func Setpgid(pid int, pgid int) (err error) {
  1166. _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
  1167. if e1 != 0 {
  1168. err = errnoErr(e1)
  1169. }
  1170. return
  1171. }
  1172. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1173. func Setpriority(which int, who int, prio int) (err error) {
  1174. _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
  1175. if e1 != 0 {
  1176. err = errnoErr(e1)
  1177. }
  1178. return
  1179. }
  1180. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1181. func Setprivexec(flag int) (err error) {
  1182. _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0)
  1183. if e1 != 0 {
  1184. err = errnoErr(e1)
  1185. }
  1186. return
  1187. }
  1188. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1189. func Setregid(rgid int, egid int) (err error) {
  1190. _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
  1191. if e1 != 0 {
  1192. err = errnoErr(e1)
  1193. }
  1194. return
  1195. }
  1196. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1197. func Setreuid(ruid int, euid int) (err error) {
  1198. _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
  1199. if e1 != 0 {
  1200. err = errnoErr(e1)
  1201. }
  1202. return
  1203. }
  1204. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1205. func Setrlimit(which int, lim *Rlimit) (err error) {
  1206. _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 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 Setsid() (pid int, err error) {
  1214. r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
  1215. pid = int(r0)
  1216. if e1 != 0 {
  1217. err = errnoErr(e1)
  1218. }
  1219. return
  1220. }
  1221. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1222. func Settimeofday(tp *Timeval) (err error) {
  1223. _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
  1224. if e1 != 0 {
  1225. err = errnoErr(e1)
  1226. }
  1227. return
  1228. }
  1229. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1230. func Setuid(uid int) (err error) {
  1231. _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
  1232. if e1 != 0 {
  1233. err = errnoErr(e1)
  1234. }
  1235. return
  1236. }
  1237. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1238. func Symlink(path string, link string) (err error) {
  1239. var _p0 *byte
  1240. _p0, err = BytePtrFromString(path)
  1241. if err != nil {
  1242. return
  1243. }
  1244. var _p1 *byte
  1245. _p1, err = BytePtrFromString(link)
  1246. if err != nil {
  1247. return
  1248. }
  1249. _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1250. if e1 != 0 {
  1251. err = errnoErr(e1)
  1252. }
  1253. return
  1254. }
  1255. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1256. func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
  1257. var _p0 *byte
  1258. _p0, err = BytePtrFromString(oldpath)
  1259. if err != nil {
  1260. return
  1261. }
  1262. var _p1 *byte
  1263. _p1, err = BytePtrFromString(newpath)
  1264. if err != nil {
  1265. return
  1266. }
  1267. _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
  1268. if e1 != 0 {
  1269. err = errnoErr(e1)
  1270. }
  1271. return
  1272. }
  1273. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1274. func Sync() (err error) {
  1275. _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
  1276. if e1 != 0 {
  1277. err = errnoErr(e1)
  1278. }
  1279. return
  1280. }
  1281. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1282. func Truncate(path string, length int64) (err error) {
  1283. var _p0 *byte
  1284. _p0, err = BytePtrFromString(path)
  1285. if err != nil {
  1286. return
  1287. }
  1288. _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
  1289. if e1 != 0 {
  1290. err = errnoErr(e1)
  1291. }
  1292. return
  1293. }
  1294. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1295. func Umask(newmask int) (oldmask int) {
  1296. r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
  1297. oldmask = int(r0)
  1298. return
  1299. }
  1300. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1301. func Undelete(path string) (err error) {
  1302. var _p0 *byte
  1303. _p0, err = BytePtrFromString(path)
  1304. if err != nil {
  1305. return
  1306. }
  1307. _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1308. if e1 != 0 {
  1309. err = errnoErr(e1)
  1310. }
  1311. return
  1312. }
  1313. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1314. func Unlink(path string) (err error) {
  1315. var _p0 *byte
  1316. _p0, err = BytePtrFromString(path)
  1317. if err != nil {
  1318. return
  1319. }
  1320. _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1321. if e1 != 0 {
  1322. err = errnoErr(e1)
  1323. }
  1324. return
  1325. }
  1326. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1327. func Unlinkat(dirfd int, path string, flags int) (err error) {
  1328. var _p0 *byte
  1329. _p0, err = BytePtrFromString(path)
  1330. if err != nil {
  1331. return
  1332. }
  1333. _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
  1334. if e1 != 0 {
  1335. err = errnoErr(e1)
  1336. }
  1337. return
  1338. }
  1339. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1340. func Unmount(path string, flags int) (err error) {
  1341. var _p0 *byte
  1342. _p0, err = BytePtrFromString(path)
  1343. if err != nil {
  1344. return
  1345. }
  1346. _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  1347. if e1 != 0 {
  1348. err = errnoErr(e1)
  1349. }
  1350. return
  1351. }
  1352. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1353. func write(fd int, p []byte) (n int, err error) {
  1354. var _p0 unsafe.Pointer
  1355. if len(p) > 0 {
  1356. _p0 = unsafe.Pointer(&p[0])
  1357. } else {
  1358. _p0 = unsafe.Pointer(&_zero)
  1359. }
  1360. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1361. n = int(r0)
  1362. if e1 != 0 {
  1363. err = errnoErr(e1)
  1364. }
  1365. return
  1366. }
  1367. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1368. func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
  1369. r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0)
  1370. ret = uintptr(r0)
  1371. if e1 != 0 {
  1372. err = errnoErr(e1)
  1373. }
  1374. return
  1375. }
  1376. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1377. func munmap(addr uintptr, length uintptr) (err error) {
  1378. _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
  1379. if e1 != 0 {
  1380. err = errnoErr(e1)
  1381. }
  1382. return
  1383. }
  1384. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1385. func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
  1386. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1387. n = int(r0)
  1388. if e1 != 0 {
  1389. err = errnoErr(e1)
  1390. }
  1391. return
  1392. }
  1393. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1394. func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
  1395. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1396. n = int(r0)
  1397. if e1 != 0 {
  1398. err = errnoErr(e1)
  1399. }
  1400. return
  1401. }
  1402. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1403. func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) {
  1404. r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
  1405. sec = int32(r0)
  1406. usec = int32(r1)
  1407. if e1 != 0 {
  1408. err = errnoErr(e1)
  1409. }
  1410. return
  1411. }
  1412. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1413. func Fstat(fd int, stat *Stat_t) (err error) {
  1414. _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  1415. if e1 != 0 {
  1416. err = errnoErr(e1)
  1417. }
  1418. return
  1419. }
  1420. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1421. func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
  1422. var _p0 *byte
  1423. _p0, err = BytePtrFromString(path)
  1424. if err != nil {
  1425. return
  1426. }
  1427. _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
  1428. if e1 != 0 {
  1429. err = errnoErr(e1)
  1430. }
  1431. return
  1432. }
  1433. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1434. func Fstatfs(fd int, stat *Statfs_t) (err error) {
  1435. _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  1436. if e1 != 0 {
  1437. err = errnoErr(e1)
  1438. }
  1439. return
  1440. }
  1441. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1442. func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
  1443. r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(buf), uintptr(size), uintptr(flags))
  1444. n = int(r0)
  1445. if e1 != 0 {
  1446. err = errnoErr(e1)
  1447. }
  1448. return
  1449. }
  1450. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1451. func Lstat(path string, stat *Stat_t) (err error) {
  1452. var _p0 *byte
  1453. _p0, err = BytePtrFromString(path)
  1454. if err != nil {
  1455. return
  1456. }
  1457. _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1458. if e1 != 0 {
  1459. err = errnoErr(e1)
  1460. }
  1461. return
  1462. }
  1463. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1464. func Stat(path string, stat *Stat_t) (err error) {
  1465. var _p0 *byte
  1466. _p0, err = BytePtrFromString(path)
  1467. if err != nil {
  1468. return
  1469. }
  1470. _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1471. if e1 != 0 {
  1472. err = errnoErr(e1)
  1473. }
  1474. return
  1475. }
  1476. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1477. func Statfs(path string, stat *Statfs_t) (err error) {
  1478. var _p0 *byte
  1479. _p0, err = BytePtrFromString(path)
  1480. if err != nil {
  1481. return
  1482. }
  1483. _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1484. if e1 != 0 {
  1485. err = errnoErr(e1)
  1486. }
  1487. return
  1488. }