zsyscall_dragonfly_amd64.go 39 KB

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