zsyscall_netbsd_arm64.go 43 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826
  1. // go run mksyscall.go -netbsd -tags netbsd,arm64 syscall_bsd.go syscall_netbsd.go syscall_netbsd_arm64.go
  2. // Code generated by the command above; see README.md. DO NOT EDIT.
  3. // +build netbsd,arm64
  4. package unix
  5. import (
  6. "syscall"
  7. "unsafe"
  8. )
  9. var _ syscall.Errno
  10. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  11. func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
  12. r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
  13. n = int(r0)
  14. if e1 != 0 {
  15. err = errnoErr(e1)
  16. }
  17. return
  18. }
  19. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  20. func setgroups(ngid int, gid *_Gid_t) (err error) {
  21. _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
  22. if e1 != 0 {
  23. err = errnoErr(e1)
  24. }
  25. return
  26. }
  27. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  28. func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
  29. r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
  30. wpid = int(r0)
  31. if e1 != 0 {
  32. err = errnoErr(e1)
  33. }
  34. return
  35. }
  36. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  37. func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
  38. r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  39. fd = int(r0)
  40. if e1 != 0 {
  41. err = errnoErr(e1)
  42. }
  43. return
  44. }
  45. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  46. func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  47. _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
  48. if e1 != 0 {
  49. err = errnoErr(e1)
  50. }
  51. return
  52. }
  53. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  54. func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  55. _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
  56. if e1 != 0 {
  57. err = errnoErr(e1)
  58. }
  59. return
  60. }
  61. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  62. func socket(domain int, typ int, proto int) (fd int, err error) {
  63. r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
  64. fd = int(r0)
  65. if e1 != 0 {
  66. err = errnoErr(e1)
  67. }
  68. return
  69. }
  70. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  71. func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
  72. _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
  73. if e1 != 0 {
  74. err = errnoErr(e1)
  75. }
  76. return
  77. }
  78. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  79. func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
  80. _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
  81. if e1 != 0 {
  82. err = errnoErr(e1)
  83. }
  84. return
  85. }
  86. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  87. func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  88. _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  89. if e1 != 0 {
  90. err = errnoErr(e1)
  91. }
  92. return
  93. }
  94. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  95. func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  96. _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  97. if e1 != 0 {
  98. err = errnoErr(e1)
  99. }
  100. return
  101. }
  102. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  103. func Shutdown(s int, how int) (err error) {
  104. _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
  105. if e1 != 0 {
  106. err = errnoErr(e1)
  107. }
  108. return
  109. }
  110. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  111. func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
  112. _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
  113. if e1 != 0 {
  114. err = errnoErr(e1)
  115. }
  116. return
  117. }
  118. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  119. func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
  120. var _p0 unsafe.Pointer
  121. if len(p) > 0 {
  122. _p0 = unsafe.Pointer(&p[0])
  123. } else {
  124. _p0 = unsafe.Pointer(&_zero)
  125. }
  126. r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
  127. n = int(r0)
  128. if e1 != 0 {
  129. err = errnoErr(e1)
  130. }
  131. return
  132. }
  133. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  134. func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
  135. var _p0 unsafe.Pointer
  136. if len(buf) > 0 {
  137. _p0 = unsafe.Pointer(&buf[0])
  138. } else {
  139. _p0 = unsafe.Pointer(&_zero)
  140. }
  141. _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
  142. if e1 != 0 {
  143. err = errnoErr(e1)
  144. }
  145. return
  146. }
  147. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  148. func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  149. r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  150. n = int(r0)
  151. if e1 != 0 {
  152. err = errnoErr(e1)
  153. }
  154. return
  155. }
  156. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  157. func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  158. r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  159. n = int(r0)
  160. if e1 != 0 {
  161. err = errnoErr(e1)
  162. }
  163. return
  164. }
  165. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  166. func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
  167. r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
  168. n = int(r0)
  169. if e1 != 0 {
  170. err = errnoErr(e1)
  171. }
  172. return
  173. }
  174. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  175. func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
  176. var _p0 unsafe.Pointer
  177. if len(mib) > 0 {
  178. _p0 = unsafe.Pointer(&mib[0])
  179. } else {
  180. _p0 = unsafe.Pointer(&_zero)
  181. }
  182. _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
  183. if e1 != 0 {
  184. err = errnoErr(e1)
  185. }
  186. return
  187. }
  188. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  189. func utimes(path string, timeval *[2]Timeval) (err error) {
  190. var _p0 *byte
  191. _p0, err = BytePtrFromString(path)
  192. if err != nil {
  193. return
  194. }
  195. _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
  196. if e1 != 0 {
  197. err = errnoErr(e1)
  198. }
  199. return
  200. }
  201. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  202. func futimes(fd int, timeval *[2]Timeval) (err error) {
  203. _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
  204. if e1 != 0 {
  205. err = errnoErr(e1)
  206. }
  207. return
  208. }
  209. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  210. func fcntl(fd int, cmd int, arg int) (val int, err error) {
  211. r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
  212. val = int(r0)
  213. if e1 != 0 {
  214. err = errnoErr(e1)
  215. }
  216. return
  217. }
  218. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  219. func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
  220. r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
  221. n = int(r0)
  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 Madvise(b []byte, behav int) (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_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
  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 Mlock(b []byte) (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_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
  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 Mlockall(flags int) (err error) {
  257. _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
  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 Mprotect(b []byte, prot 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_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
  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 Msync(b []byte, flags int) (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_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
  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 Munlock(b []byte) (err error) {
  293. var _p0 unsafe.Pointer
  294. if len(b) > 0 {
  295. _p0 = unsafe.Pointer(&b[0])
  296. } else {
  297. _p0 = unsafe.Pointer(&_zero)
  298. }
  299. _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
  300. if e1 != 0 {
  301. err = errnoErr(e1)
  302. }
  303. return
  304. }
  305. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  306. func Munlockall() (err error) {
  307. _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
  308. if e1 != 0 {
  309. err = errnoErr(e1)
  310. }
  311. return
  312. }
  313. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  314. func pipe() (fd1 int, fd2 int, err error) {
  315. r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
  316. fd1 = int(r0)
  317. fd2 = int(r1)
  318. if e1 != 0 {
  319. err = errnoErr(e1)
  320. }
  321. return
  322. }
  323. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  324. func getdents(fd int, buf []byte) (n int, err error) {
  325. var _p0 unsafe.Pointer
  326. if len(buf) > 0 {
  327. _p0 = unsafe.Pointer(&buf[0])
  328. } else {
  329. _p0 = unsafe.Pointer(&_zero)
  330. }
  331. r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
  332. n = int(r0)
  333. if e1 != 0 {
  334. err = errnoErr(e1)
  335. }
  336. return
  337. }
  338. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  339. func Getcwd(buf []byte) (n int, err error) {
  340. var _p0 unsafe.Pointer
  341. if len(buf) > 0 {
  342. _p0 = unsafe.Pointer(&buf[0])
  343. } else {
  344. _p0 = unsafe.Pointer(&_zero)
  345. }
  346. r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
  347. n = int(r0)
  348. if e1 != 0 {
  349. err = errnoErr(e1)
  350. }
  351. return
  352. }
  353. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  354. func ioctl(fd int, req uint, arg uintptr) (err error) {
  355. _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
  356. if e1 != 0 {
  357. err = errnoErr(e1)
  358. }
  359. return
  360. }
  361. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  362. func Access(path string, mode uint32) (err error) {
  363. var _p0 *byte
  364. _p0, err = BytePtrFromString(path)
  365. if err != nil {
  366. return
  367. }
  368. _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  369. if e1 != 0 {
  370. err = errnoErr(e1)
  371. }
  372. return
  373. }
  374. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  375. func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
  376. _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
  377. if e1 != 0 {
  378. err = errnoErr(e1)
  379. }
  380. return
  381. }
  382. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  383. func Chdir(path string) (err error) {
  384. var _p0 *byte
  385. _p0, err = BytePtrFromString(path)
  386. if err != nil {
  387. return
  388. }
  389. _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
  390. if e1 != 0 {
  391. err = errnoErr(e1)
  392. }
  393. return
  394. }
  395. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  396. func Chflags(path string, flags int) (err error) {
  397. var _p0 *byte
  398. _p0, err = BytePtrFromString(path)
  399. if err != nil {
  400. return
  401. }
  402. _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  403. if e1 != 0 {
  404. err = errnoErr(e1)
  405. }
  406. return
  407. }
  408. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  409. func Chmod(path string, mode uint32) (err error) {
  410. var _p0 *byte
  411. _p0, err = BytePtrFromString(path)
  412. if err != nil {
  413. return
  414. }
  415. _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  416. if e1 != 0 {
  417. err = errnoErr(e1)
  418. }
  419. return
  420. }
  421. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  422. func Chown(path string, uid int, gid int) (err error) {
  423. var _p0 *byte
  424. _p0, err = BytePtrFromString(path)
  425. if err != nil {
  426. return
  427. }
  428. _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  429. if e1 != 0 {
  430. err = errnoErr(e1)
  431. }
  432. return
  433. }
  434. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  435. func Chroot(path string) (err error) {
  436. var _p0 *byte
  437. _p0, err = BytePtrFromString(path)
  438. if err != nil {
  439. return
  440. }
  441. _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
  442. if e1 != 0 {
  443. err = errnoErr(e1)
  444. }
  445. return
  446. }
  447. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  448. func Close(fd int) (err error) {
  449. _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
  450. if e1 != 0 {
  451. err = errnoErr(e1)
  452. }
  453. return
  454. }
  455. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  456. func Dup(fd int) (nfd int, err error) {
  457. r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
  458. nfd = int(r0)
  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 Dup2(from int, to int) (err error) {
  466. _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 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 Exit(code int) {
  474. Syscall(SYS_EXIT, uintptr(code), 0, 0)
  475. return
  476. }
  477. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  478. func ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
  479. var _p0 *byte
  480. _p0, err = BytePtrFromString(attrname)
  481. if err != nil {
  482. return
  483. }
  484. r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
  485. ret = int(r0)
  486. if e1 != 0 {
  487. err = errnoErr(e1)
  488. }
  489. return
  490. }
  491. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  492. func ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
  493. var _p0 *byte
  494. _p0, err = BytePtrFromString(attrname)
  495. if err != nil {
  496. return
  497. }
  498. r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
  499. ret = int(r0)
  500. if e1 != 0 {
  501. err = errnoErr(e1)
  502. }
  503. return
  504. }
  505. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  506. func ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) {
  507. var _p0 *byte
  508. _p0, err = BytePtrFromString(attrname)
  509. if err != nil {
  510. return
  511. }
  512. _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)))
  513. if e1 != 0 {
  514. err = errnoErr(e1)
  515. }
  516. return
  517. }
  518. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  519. func ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
  520. r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
  521. ret = int(r0)
  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 ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
  529. var _p0 *byte
  530. _p0, err = BytePtrFromString(file)
  531. if err != nil {
  532. return
  533. }
  534. var _p1 *byte
  535. _p1, err = BytePtrFromString(attrname)
  536. if err != nil {
  537. return
  538. }
  539. r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
  540. ret = int(r0)
  541. if e1 != 0 {
  542. err = errnoErr(e1)
  543. }
  544. return
  545. }
  546. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  547. func ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
  548. var _p0 *byte
  549. _p0, err = BytePtrFromString(file)
  550. if err != nil {
  551. return
  552. }
  553. var _p1 *byte
  554. _p1, err = BytePtrFromString(attrname)
  555. if err != nil {
  556. return
  557. }
  558. r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
  559. ret = int(r0)
  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 ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) {
  567. var _p0 *byte
  568. _p0, err = BytePtrFromString(file)
  569. if err != nil {
  570. return
  571. }
  572. var _p1 *byte
  573. _p1, err = BytePtrFromString(attrname)
  574. if err != nil {
  575. return
  576. }
  577. _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
  578. if e1 != 0 {
  579. err = errnoErr(e1)
  580. }
  581. return
  582. }
  583. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  584. func ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
  585. var _p0 *byte
  586. _p0, err = BytePtrFromString(file)
  587. if err != nil {
  588. return
  589. }
  590. r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
  591. ret = int(r0)
  592. if e1 != 0 {
  593. err = errnoErr(e1)
  594. }
  595. return
  596. }
  597. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  598. func ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
  599. var _p0 *byte
  600. _p0, err = BytePtrFromString(link)
  601. if err != nil {
  602. return
  603. }
  604. var _p1 *byte
  605. _p1, err = BytePtrFromString(attrname)
  606. if err != nil {
  607. return
  608. }
  609. r0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
  610. ret = int(r0)
  611. if e1 != 0 {
  612. err = errnoErr(e1)
  613. }
  614. return
  615. }
  616. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  617. func ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
  618. var _p0 *byte
  619. _p0, err = BytePtrFromString(link)
  620. if err != nil {
  621. return
  622. }
  623. var _p1 *byte
  624. _p1, err = BytePtrFromString(attrname)
  625. if err != nil {
  626. return
  627. }
  628. r0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
  629. ret = int(r0)
  630. if e1 != 0 {
  631. err = errnoErr(e1)
  632. }
  633. return
  634. }
  635. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  636. func ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) {
  637. var _p0 *byte
  638. _p0, err = BytePtrFromString(link)
  639. if err != nil {
  640. return
  641. }
  642. var _p1 *byte
  643. _p1, err = BytePtrFromString(attrname)
  644. if err != nil {
  645. return
  646. }
  647. _, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
  648. if e1 != 0 {
  649. err = errnoErr(e1)
  650. }
  651. return
  652. }
  653. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  654. func ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
  655. var _p0 *byte
  656. _p0, err = BytePtrFromString(link)
  657. if err != nil {
  658. return
  659. }
  660. r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
  661. ret = int(r0)
  662. if e1 != 0 {
  663. err = errnoErr(e1)
  664. }
  665. return
  666. }
  667. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  668. func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
  669. var _p0 *byte
  670. _p0, err = BytePtrFromString(path)
  671. if err != nil {
  672. return
  673. }
  674. _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 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 Fadvise(fd int, offset int64, length int64, advice int) (err error) {
  682. _, _, e1 := Syscall6(SYS_POSIX_FADVISE, uintptr(fd), 0, uintptr(offset), 0, uintptr(length), uintptr(advice))
  683. if e1 != 0 {
  684. err = errnoErr(e1)
  685. }
  686. return
  687. }
  688. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  689. func Fchdir(fd int) (err error) {
  690. _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
  691. if e1 != 0 {
  692. err = errnoErr(e1)
  693. }
  694. return
  695. }
  696. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  697. func Fchflags(fd int, flags int) (err error) {
  698. _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
  699. if e1 != 0 {
  700. err = errnoErr(e1)
  701. }
  702. return
  703. }
  704. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  705. func Fchmod(fd int, mode uint32) (err error) {
  706. _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
  707. if e1 != 0 {
  708. err = errnoErr(e1)
  709. }
  710. return
  711. }
  712. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  713. func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
  714. var _p0 *byte
  715. _p0, err = BytePtrFromString(path)
  716. if err != nil {
  717. return
  718. }
  719. _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 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 Fchown(fd int, uid int, gid int) (err error) {
  727. _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
  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 Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
  735. var _p0 *byte
  736. _p0, err = BytePtrFromString(path)
  737. if err != nil {
  738. return
  739. }
  740. _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
  741. if e1 != 0 {
  742. err = errnoErr(e1)
  743. }
  744. return
  745. }
  746. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  747. func Flock(fd int, how int) (err error) {
  748. _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
  749. if e1 != 0 {
  750. err = errnoErr(e1)
  751. }
  752. return
  753. }
  754. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  755. func Fpathconf(fd int, name int) (val int, err error) {
  756. r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
  757. val = int(r0)
  758. if e1 != 0 {
  759. err = errnoErr(e1)
  760. }
  761. return
  762. }
  763. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  764. func Fstat(fd int, stat *Stat_t) (err error) {
  765. _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  766. if e1 != 0 {
  767. err = errnoErr(e1)
  768. }
  769. return
  770. }
  771. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  772. func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
  773. var _p0 *byte
  774. _p0, err = BytePtrFromString(path)
  775. if err != nil {
  776. return
  777. }
  778. _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
  779. if e1 != 0 {
  780. err = errnoErr(e1)
  781. }
  782. return
  783. }
  784. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  785. func Fsync(fd int) (err error) {
  786. _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
  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 Ftruncate(fd int, length int64) (err error) {
  794. _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length))
  795. if e1 != 0 {
  796. err = errnoErr(e1)
  797. }
  798. return
  799. }
  800. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  801. func Getegid() (egid int) {
  802. r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
  803. egid = int(r0)
  804. return
  805. }
  806. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  807. func Geteuid() (uid int) {
  808. r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
  809. uid = int(r0)
  810. return
  811. }
  812. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  813. func Getgid() (gid int) {
  814. r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
  815. gid = int(r0)
  816. return
  817. }
  818. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  819. func Getpgid(pid int) (pgid int, err error) {
  820. r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
  821. pgid = int(r0)
  822. if e1 != 0 {
  823. err = errnoErr(e1)
  824. }
  825. return
  826. }
  827. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  828. func Getpgrp() (pgrp int) {
  829. r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
  830. pgrp = int(r0)
  831. return
  832. }
  833. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  834. func Getpid() (pid int) {
  835. r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
  836. pid = int(r0)
  837. return
  838. }
  839. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  840. func Getppid() (ppid int) {
  841. r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
  842. ppid = int(r0)
  843. return
  844. }
  845. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  846. func Getpriority(which int, who int) (prio int, err error) {
  847. r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
  848. prio = int(r0)
  849. if e1 != 0 {
  850. err = errnoErr(e1)
  851. }
  852. return
  853. }
  854. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  855. func Getrlimit(which int, lim *Rlimit) (err error) {
  856. _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 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 Getrusage(who int, rusage *Rusage) (err error) {
  864. _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
  865. if e1 != 0 {
  866. err = errnoErr(e1)
  867. }
  868. return
  869. }
  870. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  871. func Getsid(pid int) (sid int, err error) {
  872. r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
  873. sid = int(r0)
  874. if e1 != 0 {
  875. err = errnoErr(e1)
  876. }
  877. return
  878. }
  879. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  880. func Gettimeofday(tv *Timeval) (err error) {
  881. _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  882. if e1 != 0 {
  883. err = errnoErr(e1)
  884. }
  885. return
  886. }
  887. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  888. func Getuid() (uid int) {
  889. r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
  890. uid = int(r0)
  891. return
  892. }
  893. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  894. func Issetugid() (tainted bool) {
  895. r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
  896. tainted = bool(r0 != 0)
  897. return
  898. }
  899. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  900. func Kill(pid int, signum syscall.Signal) (err error) {
  901. _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 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 Kqueue() (fd int, err error) {
  909. r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
  910. fd = int(r0)
  911. if e1 != 0 {
  912. err = errnoErr(e1)
  913. }
  914. return
  915. }
  916. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  917. func Lchown(path string, uid int, gid int) (err error) {
  918. var _p0 *byte
  919. _p0, err = BytePtrFromString(path)
  920. if err != nil {
  921. return
  922. }
  923. _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  924. if e1 != 0 {
  925. err = errnoErr(e1)
  926. }
  927. return
  928. }
  929. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  930. func Link(path string, link string) (err error) {
  931. var _p0 *byte
  932. _p0, err = BytePtrFromString(path)
  933. if err != nil {
  934. return
  935. }
  936. var _p1 *byte
  937. _p1, err = BytePtrFromString(link)
  938. if err != nil {
  939. return
  940. }
  941. _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  942. if e1 != 0 {
  943. err = errnoErr(e1)
  944. }
  945. return
  946. }
  947. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  948. func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
  949. var _p0 *byte
  950. _p0, err = BytePtrFromString(path)
  951. if err != nil {
  952. return
  953. }
  954. var _p1 *byte
  955. _p1, err = BytePtrFromString(link)
  956. if err != nil {
  957. return
  958. }
  959. _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
  960. if e1 != 0 {
  961. err = errnoErr(e1)
  962. }
  963. return
  964. }
  965. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  966. func Listen(s int, backlog int) (err error) {
  967. _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
  968. if e1 != 0 {
  969. err = errnoErr(e1)
  970. }
  971. return
  972. }
  973. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  974. func Lstat(path string, stat *Stat_t) (err error) {
  975. var _p0 *byte
  976. _p0, err = BytePtrFromString(path)
  977. if err != nil {
  978. return
  979. }
  980. _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  981. if e1 != 0 {
  982. err = errnoErr(e1)
  983. }
  984. return
  985. }
  986. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  987. func Mkdir(path string, mode uint32) (err error) {
  988. var _p0 *byte
  989. _p0, err = BytePtrFromString(path)
  990. if err != nil {
  991. return
  992. }
  993. _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  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 Mkdirat(dirfd int, path string, mode uint32) (err error) {
  1001. var _p0 *byte
  1002. _p0, err = BytePtrFromString(path)
  1003. if err != nil {
  1004. return
  1005. }
  1006. _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  1007. if e1 != 0 {
  1008. err = errnoErr(e1)
  1009. }
  1010. return
  1011. }
  1012. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1013. func Mkfifo(path string, mode uint32) (err error) {
  1014. var _p0 *byte
  1015. _p0, err = BytePtrFromString(path)
  1016. if err != nil {
  1017. return
  1018. }
  1019. _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  1020. if e1 != 0 {
  1021. err = errnoErr(e1)
  1022. }
  1023. return
  1024. }
  1025. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1026. func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
  1027. var _p0 *byte
  1028. _p0, err = BytePtrFromString(path)
  1029. if err != nil {
  1030. return
  1031. }
  1032. _, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  1033. if e1 != 0 {
  1034. err = errnoErr(e1)
  1035. }
  1036. return
  1037. }
  1038. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1039. func Mknod(path string, mode uint32, dev int) (err error) {
  1040. var _p0 *byte
  1041. _p0, err = BytePtrFromString(path)
  1042. if err != nil {
  1043. return
  1044. }
  1045. _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
  1046. if e1 != 0 {
  1047. err = errnoErr(e1)
  1048. }
  1049. return
  1050. }
  1051. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1052. func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
  1053. var _p0 *byte
  1054. _p0, err = BytePtrFromString(path)
  1055. if err != nil {
  1056. return
  1057. }
  1058. _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
  1059. if e1 != 0 {
  1060. err = errnoErr(e1)
  1061. }
  1062. return
  1063. }
  1064. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1065. func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
  1066. _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
  1067. if e1 != 0 {
  1068. err = errnoErr(e1)
  1069. }
  1070. return
  1071. }
  1072. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1073. func Open(path string, mode int, perm uint32) (fd int, err error) {
  1074. var _p0 *byte
  1075. _p0, err = BytePtrFromString(path)
  1076. if err != nil {
  1077. return
  1078. }
  1079. r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
  1080. fd = int(r0)
  1081. if e1 != 0 {
  1082. err = errnoErr(e1)
  1083. }
  1084. return
  1085. }
  1086. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1087. func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
  1088. var _p0 *byte
  1089. _p0, err = BytePtrFromString(path)
  1090. if err != nil {
  1091. return
  1092. }
  1093. r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
  1094. fd = int(r0)
  1095. if e1 != 0 {
  1096. err = errnoErr(e1)
  1097. }
  1098. return
  1099. }
  1100. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1101. func Pathconf(path string, name int) (val int, err error) {
  1102. var _p0 *byte
  1103. _p0, err = BytePtrFromString(path)
  1104. if err != nil {
  1105. return
  1106. }
  1107. r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
  1108. val = int(r0)
  1109. if e1 != 0 {
  1110. err = errnoErr(e1)
  1111. }
  1112. return
  1113. }
  1114. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1115. func Pread(fd int, p []byte, offset int64) (n int, err error) {
  1116. var _p0 unsafe.Pointer
  1117. if len(p) > 0 {
  1118. _p0 = unsafe.Pointer(&p[0])
  1119. } else {
  1120. _p0 = unsafe.Pointer(&_zero)
  1121. }
  1122. r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0)
  1123. n = int(r0)
  1124. if e1 != 0 {
  1125. err = errnoErr(e1)
  1126. }
  1127. return
  1128. }
  1129. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1130. func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  1131. var _p0 unsafe.Pointer
  1132. if len(p) > 0 {
  1133. _p0 = unsafe.Pointer(&p[0])
  1134. } else {
  1135. _p0 = unsafe.Pointer(&_zero)
  1136. }
  1137. r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0)
  1138. n = int(r0)
  1139. if e1 != 0 {
  1140. err = errnoErr(e1)
  1141. }
  1142. return
  1143. }
  1144. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1145. func read(fd int, p []byte) (n int, err error) {
  1146. var _p0 unsafe.Pointer
  1147. if len(p) > 0 {
  1148. _p0 = unsafe.Pointer(&p[0])
  1149. } else {
  1150. _p0 = unsafe.Pointer(&_zero)
  1151. }
  1152. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1153. n = int(r0)
  1154. if e1 != 0 {
  1155. err = errnoErr(e1)
  1156. }
  1157. return
  1158. }
  1159. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1160. func Readlink(path string, buf []byte) (n int, err error) {
  1161. var _p0 *byte
  1162. _p0, err = BytePtrFromString(path)
  1163. if err != nil {
  1164. return
  1165. }
  1166. var _p1 unsafe.Pointer
  1167. if len(buf) > 0 {
  1168. _p1 = unsafe.Pointer(&buf[0])
  1169. } else {
  1170. _p1 = unsafe.Pointer(&_zero)
  1171. }
  1172. r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
  1173. n = int(r0)
  1174. if e1 != 0 {
  1175. err = errnoErr(e1)
  1176. }
  1177. return
  1178. }
  1179. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1180. func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
  1181. var _p0 *byte
  1182. _p0, err = BytePtrFromString(path)
  1183. if err != nil {
  1184. return
  1185. }
  1186. var _p1 unsafe.Pointer
  1187. if len(buf) > 0 {
  1188. _p1 = unsafe.Pointer(&buf[0])
  1189. } else {
  1190. _p1 = unsafe.Pointer(&_zero)
  1191. }
  1192. r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
  1193. n = int(r0)
  1194. if e1 != 0 {
  1195. err = errnoErr(e1)
  1196. }
  1197. return
  1198. }
  1199. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1200. func Rename(from string, to string) (err error) {
  1201. var _p0 *byte
  1202. _p0, err = BytePtrFromString(from)
  1203. if err != nil {
  1204. return
  1205. }
  1206. var _p1 *byte
  1207. _p1, err = BytePtrFromString(to)
  1208. if err != nil {
  1209. return
  1210. }
  1211. _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1212. if e1 != 0 {
  1213. err = errnoErr(e1)
  1214. }
  1215. return
  1216. }
  1217. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1218. func Renameat(fromfd int, from string, tofd int, to string) (err error) {
  1219. var _p0 *byte
  1220. _p0, err = BytePtrFromString(from)
  1221. if err != nil {
  1222. return
  1223. }
  1224. var _p1 *byte
  1225. _p1, err = BytePtrFromString(to)
  1226. if err != nil {
  1227. return
  1228. }
  1229. _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
  1230. if e1 != 0 {
  1231. err = errnoErr(e1)
  1232. }
  1233. return
  1234. }
  1235. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1236. func Revoke(path string) (err error) {
  1237. var _p0 *byte
  1238. _p0, err = BytePtrFromString(path)
  1239. if err != nil {
  1240. return
  1241. }
  1242. _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1243. if e1 != 0 {
  1244. err = errnoErr(e1)
  1245. }
  1246. return
  1247. }
  1248. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1249. func Rmdir(path string) (err error) {
  1250. var _p0 *byte
  1251. _p0, err = BytePtrFromString(path)
  1252. if err != nil {
  1253. return
  1254. }
  1255. _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1256. if e1 != 0 {
  1257. err = errnoErr(e1)
  1258. }
  1259. return
  1260. }
  1261. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1262. func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
  1263. r0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0)
  1264. newoffset = int64(r0)
  1265. if e1 != 0 {
  1266. err = errnoErr(e1)
  1267. }
  1268. return
  1269. }
  1270. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1271. func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
  1272. _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
  1273. if e1 != 0 {
  1274. err = errnoErr(e1)
  1275. }
  1276. return
  1277. }
  1278. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1279. func Setegid(egid int) (err error) {
  1280. _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
  1281. if e1 != 0 {
  1282. err = errnoErr(e1)
  1283. }
  1284. return
  1285. }
  1286. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1287. func Seteuid(euid int) (err error) {
  1288. _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
  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 Setgid(gid int) (err error) {
  1296. _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
  1297. if e1 != 0 {
  1298. err = errnoErr(e1)
  1299. }
  1300. return
  1301. }
  1302. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1303. func Setpgid(pid int, pgid int) (err error) {
  1304. _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
  1305. if e1 != 0 {
  1306. err = errnoErr(e1)
  1307. }
  1308. return
  1309. }
  1310. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1311. func Setpriority(which int, who int, prio int) (err error) {
  1312. _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
  1313. if e1 != 0 {
  1314. err = errnoErr(e1)
  1315. }
  1316. return
  1317. }
  1318. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1319. func Setregid(rgid int, egid int) (err error) {
  1320. _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 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 Setreuid(ruid int, euid int) (err error) {
  1328. _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
  1329. if e1 != 0 {
  1330. err = errnoErr(e1)
  1331. }
  1332. return
  1333. }
  1334. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1335. func Setrlimit(which int, lim *Rlimit) (err error) {
  1336. _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
  1337. if e1 != 0 {
  1338. err = errnoErr(e1)
  1339. }
  1340. return
  1341. }
  1342. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1343. func Setsid() (pid int, err error) {
  1344. r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
  1345. pid = int(r0)
  1346. if e1 != 0 {
  1347. err = errnoErr(e1)
  1348. }
  1349. return
  1350. }
  1351. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1352. func Settimeofday(tp *Timeval) (err error) {
  1353. _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
  1354. if e1 != 0 {
  1355. err = errnoErr(e1)
  1356. }
  1357. return
  1358. }
  1359. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1360. func Setuid(uid int) (err error) {
  1361. _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
  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 Stat(path string, stat *Stat_t) (err error) {
  1369. var _p0 *byte
  1370. _p0, err = BytePtrFromString(path)
  1371. if err != nil {
  1372. return
  1373. }
  1374. _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1375. if e1 != 0 {
  1376. err = errnoErr(e1)
  1377. }
  1378. return
  1379. }
  1380. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1381. func Symlink(path string, link string) (err error) {
  1382. var _p0 *byte
  1383. _p0, err = BytePtrFromString(path)
  1384. if err != nil {
  1385. return
  1386. }
  1387. var _p1 *byte
  1388. _p1, err = BytePtrFromString(link)
  1389. if err != nil {
  1390. return
  1391. }
  1392. _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1393. if e1 != 0 {
  1394. err = errnoErr(e1)
  1395. }
  1396. return
  1397. }
  1398. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1399. func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
  1400. var _p0 *byte
  1401. _p0, err = BytePtrFromString(oldpath)
  1402. if err != nil {
  1403. return
  1404. }
  1405. var _p1 *byte
  1406. _p1, err = BytePtrFromString(newpath)
  1407. if err != nil {
  1408. return
  1409. }
  1410. _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
  1411. if e1 != 0 {
  1412. err = errnoErr(e1)
  1413. }
  1414. return
  1415. }
  1416. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1417. func Sync() (err error) {
  1418. _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
  1419. if e1 != 0 {
  1420. err = errnoErr(e1)
  1421. }
  1422. return
  1423. }
  1424. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1425. func Truncate(path string, length int64) (err error) {
  1426. var _p0 *byte
  1427. _p0, err = BytePtrFromString(path)
  1428. if err != nil {
  1429. return
  1430. }
  1431. _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length))
  1432. if e1 != 0 {
  1433. err = errnoErr(e1)
  1434. }
  1435. return
  1436. }
  1437. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1438. func Umask(newmask int) (oldmask int) {
  1439. r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
  1440. oldmask = int(r0)
  1441. return
  1442. }
  1443. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1444. func Unlink(path string) (err error) {
  1445. var _p0 *byte
  1446. _p0, err = BytePtrFromString(path)
  1447. if err != nil {
  1448. return
  1449. }
  1450. _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1451. if e1 != 0 {
  1452. err = errnoErr(e1)
  1453. }
  1454. return
  1455. }
  1456. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1457. func Unlinkat(dirfd int, path string, flags int) (err error) {
  1458. var _p0 *byte
  1459. _p0, err = BytePtrFromString(path)
  1460. if err != nil {
  1461. return
  1462. }
  1463. _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
  1464. if e1 != 0 {
  1465. err = errnoErr(e1)
  1466. }
  1467. return
  1468. }
  1469. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1470. func Unmount(path string, flags int) (err error) {
  1471. var _p0 *byte
  1472. _p0, err = BytePtrFromString(path)
  1473. if err != nil {
  1474. return
  1475. }
  1476. _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  1477. if e1 != 0 {
  1478. err = errnoErr(e1)
  1479. }
  1480. return
  1481. }
  1482. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1483. func write(fd int, p []byte) (n int, err error) {
  1484. var _p0 unsafe.Pointer
  1485. if len(p) > 0 {
  1486. _p0 = unsafe.Pointer(&p[0])
  1487. } else {
  1488. _p0 = unsafe.Pointer(&_zero)
  1489. }
  1490. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1491. n = int(r0)
  1492. if e1 != 0 {
  1493. err = errnoErr(e1)
  1494. }
  1495. return
  1496. }
  1497. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1498. func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
  1499. r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0)
  1500. ret = uintptr(r0)
  1501. if e1 != 0 {
  1502. err = errnoErr(e1)
  1503. }
  1504. return
  1505. }
  1506. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1507. func munmap(addr uintptr, length uintptr) (err error) {
  1508. _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
  1509. if e1 != 0 {
  1510. err = errnoErr(e1)
  1511. }
  1512. return
  1513. }
  1514. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1515. func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
  1516. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1517. n = int(r0)
  1518. if e1 != 0 {
  1519. err = errnoErr(e1)
  1520. }
  1521. return
  1522. }
  1523. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1524. func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
  1525. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1526. n = int(r0)
  1527. if e1 != 0 {
  1528. err = errnoErr(e1)
  1529. }
  1530. return
  1531. }
  1532. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1533. func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
  1534. var _p0 *byte
  1535. _p0, err = BytePtrFromString(path)
  1536. if err != nil {
  1537. return
  1538. }
  1539. _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
  1540. if e1 != 0 {
  1541. err = errnoErr(e1)
  1542. }
  1543. return
  1544. }