zsyscall_netbsd_arm64.go 44 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862
  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. //go:build netbsd && arm64
  4. // +build netbsd,arm64
  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() (fd1 int, fd2 int, err error) {
  293. r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
  294. fd1 = int(r0)
  295. fd2 = 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) (err error) {
  303. _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
  304. if e1 != 0 {
  305. err = errnoErr(e1)
  306. }
  307. return
  308. }
  309. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  310. func Getdents(fd int, buf []byte) (n int, err error) {
  311. var _p0 unsafe.Pointer
  312. if len(buf) > 0 {
  313. _p0 = unsafe.Pointer(&buf[0])
  314. } else {
  315. _p0 = unsafe.Pointer(&_zero)
  316. }
  317. r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
  318. n = int(r0)
  319. if e1 != 0 {
  320. err = errnoErr(e1)
  321. }
  322. return
  323. }
  324. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  325. func Getcwd(buf []byte) (n int, err error) {
  326. var _p0 unsafe.Pointer
  327. if len(buf) > 0 {
  328. _p0 = unsafe.Pointer(&buf[0])
  329. } else {
  330. _p0 = unsafe.Pointer(&_zero)
  331. }
  332. r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
  333. n = int(r0)
  334. if e1 != 0 {
  335. err = errnoErr(e1)
  336. }
  337. return
  338. }
  339. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  340. func ioctl(fd int, req uint, arg uintptr) (err error) {
  341. _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
  342. if e1 != 0 {
  343. err = errnoErr(e1)
  344. }
  345. return
  346. }
  347. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  348. func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
  349. var _p0 unsafe.Pointer
  350. if len(mib) > 0 {
  351. _p0 = unsafe.Pointer(&mib[0])
  352. } else {
  353. _p0 = unsafe.Pointer(&_zero)
  354. }
  355. _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
  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 Dup3(from int, to int, flags int) (err error) {
  474. _, _, e1 := Syscall(SYS_DUP3, uintptr(from), uintptr(to), uintptr(flags))
  475. if e1 != 0 {
  476. err = errnoErr(e1)
  477. }
  478. return
  479. }
  480. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  481. func Exit(code int) {
  482. Syscall(SYS_EXIT, uintptr(code), 0, 0)
  483. return
  484. }
  485. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  486. func ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
  487. var _p0 *byte
  488. _p0, err = BytePtrFromString(attrname)
  489. if err != nil {
  490. return
  491. }
  492. r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
  493. ret = int(r0)
  494. if e1 != 0 {
  495. err = errnoErr(e1)
  496. }
  497. return
  498. }
  499. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  500. func ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
  501. var _p0 *byte
  502. _p0, err = BytePtrFromString(attrname)
  503. if err != nil {
  504. return
  505. }
  506. r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
  507. ret = int(r0)
  508. if e1 != 0 {
  509. err = errnoErr(e1)
  510. }
  511. return
  512. }
  513. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  514. func ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) {
  515. var _p0 *byte
  516. _p0, err = BytePtrFromString(attrname)
  517. if err != nil {
  518. return
  519. }
  520. _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)))
  521. if e1 != 0 {
  522. err = errnoErr(e1)
  523. }
  524. return
  525. }
  526. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  527. func ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
  528. r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
  529. ret = int(r0)
  530. if e1 != 0 {
  531. err = errnoErr(e1)
  532. }
  533. return
  534. }
  535. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  536. func ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
  537. var _p0 *byte
  538. _p0, err = BytePtrFromString(file)
  539. if err != nil {
  540. return
  541. }
  542. var _p1 *byte
  543. _p1, err = BytePtrFromString(attrname)
  544. if err != nil {
  545. return
  546. }
  547. r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
  548. ret = int(r0)
  549. if e1 != 0 {
  550. err = errnoErr(e1)
  551. }
  552. return
  553. }
  554. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  555. func ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
  556. var _p0 *byte
  557. _p0, err = BytePtrFromString(file)
  558. if err != nil {
  559. return
  560. }
  561. var _p1 *byte
  562. _p1, err = BytePtrFromString(attrname)
  563. if err != nil {
  564. return
  565. }
  566. r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
  567. ret = int(r0)
  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 ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) {
  575. var _p0 *byte
  576. _p0, err = BytePtrFromString(file)
  577. if err != nil {
  578. return
  579. }
  580. var _p1 *byte
  581. _p1, err = BytePtrFromString(attrname)
  582. if err != nil {
  583. return
  584. }
  585. _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
  586. if e1 != 0 {
  587. err = errnoErr(e1)
  588. }
  589. return
  590. }
  591. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  592. func ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
  593. var _p0 *byte
  594. _p0, err = BytePtrFromString(file)
  595. if err != nil {
  596. return
  597. }
  598. r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
  599. ret = int(r0)
  600. if e1 != 0 {
  601. err = errnoErr(e1)
  602. }
  603. return
  604. }
  605. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  606. func ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
  607. var _p0 *byte
  608. _p0, err = BytePtrFromString(link)
  609. if err != nil {
  610. return
  611. }
  612. var _p1 *byte
  613. _p1, err = BytePtrFromString(attrname)
  614. if err != nil {
  615. return
  616. }
  617. r0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
  618. ret = int(r0)
  619. if e1 != 0 {
  620. err = errnoErr(e1)
  621. }
  622. return
  623. }
  624. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  625. func ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
  626. var _p0 *byte
  627. _p0, err = BytePtrFromString(link)
  628. if err != nil {
  629. return
  630. }
  631. var _p1 *byte
  632. _p1, err = BytePtrFromString(attrname)
  633. if err != nil {
  634. return
  635. }
  636. r0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
  637. ret = int(r0)
  638. if e1 != 0 {
  639. err = errnoErr(e1)
  640. }
  641. return
  642. }
  643. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  644. func ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) {
  645. var _p0 *byte
  646. _p0, err = BytePtrFromString(link)
  647. if err != nil {
  648. return
  649. }
  650. var _p1 *byte
  651. _p1, err = BytePtrFromString(attrname)
  652. if err != nil {
  653. return
  654. }
  655. _, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
  656. if e1 != 0 {
  657. err = errnoErr(e1)
  658. }
  659. return
  660. }
  661. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  662. func ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
  663. var _p0 *byte
  664. _p0, err = BytePtrFromString(link)
  665. if err != nil {
  666. return
  667. }
  668. r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
  669. ret = int(r0)
  670. if e1 != 0 {
  671. err = errnoErr(e1)
  672. }
  673. return
  674. }
  675. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  676. func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
  677. var _p0 *byte
  678. _p0, err = BytePtrFromString(path)
  679. if err != nil {
  680. return
  681. }
  682. _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
  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 Fadvise(fd int, offset int64, length int64, advice int) (err error) {
  690. _, _, e1 := Syscall6(SYS_POSIX_FADVISE, uintptr(fd), 0, uintptr(offset), 0, uintptr(length), uintptr(advice))
  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 Fchdir(fd int) (err error) {
  698. _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 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 Fchflags(fd int, flags int) (err error) {
  706. _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 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 Fchmod(fd int, mode uint32) (err error) {
  714. _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
  715. if e1 != 0 {
  716. err = errnoErr(e1)
  717. }
  718. return
  719. }
  720. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  721. func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
  722. var _p0 *byte
  723. _p0, err = BytePtrFromString(path)
  724. if err != nil {
  725. return
  726. }
  727. _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 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 Fchown(fd int, uid int, gid int) (err error) {
  735. _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
  736. if e1 != 0 {
  737. err = errnoErr(e1)
  738. }
  739. return
  740. }
  741. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  742. func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
  743. var _p0 *byte
  744. _p0, err = BytePtrFromString(path)
  745. if err != nil {
  746. return
  747. }
  748. _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 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 Flock(fd int, how int) (err error) {
  756. _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
  757. if e1 != 0 {
  758. err = errnoErr(e1)
  759. }
  760. return
  761. }
  762. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  763. func Fpathconf(fd int, name int) (val int, err error) {
  764. r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
  765. val = int(r0)
  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 Fstat(fd int, stat *Stat_t) (err error) {
  773. _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  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 Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
  781. var _p0 *byte
  782. _p0, err = BytePtrFromString(path)
  783. if err != nil {
  784. return
  785. }
  786. _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 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 Fstatvfs1(fd int, buf *Statvfs_t, flags int) (err error) {
  794. _, _, e1 := Syscall(SYS_FSTATVFS1, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(flags))
  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 Fsync(fd int) (err error) {
  802. _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
  803. if e1 != 0 {
  804. err = errnoErr(e1)
  805. }
  806. return
  807. }
  808. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  809. func Ftruncate(fd int, length int64) (err error) {
  810. _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length))
  811. if e1 != 0 {
  812. err = errnoErr(e1)
  813. }
  814. return
  815. }
  816. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  817. func Getegid() (egid int) {
  818. r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
  819. egid = int(r0)
  820. return
  821. }
  822. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  823. func Geteuid() (uid int) {
  824. r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
  825. uid = int(r0)
  826. return
  827. }
  828. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  829. func Getgid() (gid int) {
  830. r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
  831. gid = int(r0)
  832. return
  833. }
  834. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  835. func Getpgid(pid int) (pgid int, err error) {
  836. r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
  837. pgid = int(r0)
  838. if e1 != 0 {
  839. err = errnoErr(e1)
  840. }
  841. return
  842. }
  843. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  844. func Getpgrp() (pgrp int) {
  845. r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
  846. pgrp = int(r0)
  847. return
  848. }
  849. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  850. func Getpid() (pid int) {
  851. r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
  852. pid = int(r0)
  853. return
  854. }
  855. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  856. func Getppid() (ppid int) {
  857. r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
  858. ppid = int(r0)
  859. return
  860. }
  861. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  862. func Getpriority(which int, who int) (prio int, err error) {
  863. r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
  864. prio = int(r0)
  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 Getrlimit(which int, lim *Rlimit) (err error) {
  872. _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
  873. if e1 != 0 {
  874. err = errnoErr(e1)
  875. }
  876. return
  877. }
  878. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  879. func Getrusage(who int, rusage *Rusage) (err error) {
  880. _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
  881. if e1 != 0 {
  882. err = errnoErr(e1)
  883. }
  884. return
  885. }
  886. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  887. func Getsid(pid int) (sid int, err error) {
  888. r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
  889. sid = int(r0)
  890. if e1 != 0 {
  891. err = errnoErr(e1)
  892. }
  893. return
  894. }
  895. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  896. func Gettimeofday(tv *Timeval) (err error) {
  897. _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  898. if e1 != 0 {
  899. err = errnoErr(e1)
  900. }
  901. return
  902. }
  903. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  904. func Getuid() (uid int) {
  905. r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
  906. uid = int(r0)
  907. return
  908. }
  909. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  910. func Issetugid() (tainted bool) {
  911. r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
  912. tainted = bool(r0 != 0)
  913. return
  914. }
  915. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  916. func Kill(pid int, signum syscall.Signal) (err error) {
  917. _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
  918. if e1 != 0 {
  919. err = errnoErr(e1)
  920. }
  921. return
  922. }
  923. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  924. func Kqueue() (fd int, err error) {
  925. r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
  926. fd = int(r0)
  927. if e1 != 0 {
  928. err = errnoErr(e1)
  929. }
  930. return
  931. }
  932. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  933. func Lchown(path string, uid int, gid int) (err error) {
  934. var _p0 *byte
  935. _p0, err = BytePtrFromString(path)
  936. if err != nil {
  937. return
  938. }
  939. _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  940. if e1 != 0 {
  941. err = errnoErr(e1)
  942. }
  943. return
  944. }
  945. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  946. func Link(path string, link string) (err error) {
  947. var _p0 *byte
  948. _p0, err = BytePtrFromString(path)
  949. if err != nil {
  950. return
  951. }
  952. var _p1 *byte
  953. _p1, err = BytePtrFromString(link)
  954. if err != nil {
  955. return
  956. }
  957. _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  958. if e1 != 0 {
  959. err = errnoErr(e1)
  960. }
  961. return
  962. }
  963. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  964. func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
  965. var _p0 *byte
  966. _p0, err = BytePtrFromString(path)
  967. if err != nil {
  968. return
  969. }
  970. var _p1 *byte
  971. _p1, err = BytePtrFromString(link)
  972. if err != nil {
  973. return
  974. }
  975. _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
  976. if e1 != 0 {
  977. err = errnoErr(e1)
  978. }
  979. return
  980. }
  981. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  982. func Listen(s int, backlog int) (err error) {
  983. _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
  984. if e1 != 0 {
  985. err = errnoErr(e1)
  986. }
  987. return
  988. }
  989. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  990. func Lstat(path string, stat *Stat_t) (err error) {
  991. var _p0 *byte
  992. _p0, err = BytePtrFromString(path)
  993. if err != nil {
  994. return
  995. }
  996. _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  997. if e1 != 0 {
  998. err = errnoErr(e1)
  999. }
  1000. return
  1001. }
  1002. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1003. func Mkdir(path string, mode uint32) (err error) {
  1004. var _p0 *byte
  1005. _p0, err = BytePtrFromString(path)
  1006. if err != nil {
  1007. return
  1008. }
  1009. _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  1010. if e1 != 0 {
  1011. err = errnoErr(e1)
  1012. }
  1013. return
  1014. }
  1015. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1016. func Mkdirat(dirfd int, path string, mode uint32) (err error) {
  1017. var _p0 *byte
  1018. _p0, err = BytePtrFromString(path)
  1019. if err != nil {
  1020. return
  1021. }
  1022. _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  1023. if e1 != 0 {
  1024. err = errnoErr(e1)
  1025. }
  1026. return
  1027. }
  1028. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1029. func Mkfifo(path string, mode uint32) (err error) {
  1030. var _p0 *byte
  1031. _p0, err = BytePtrFromString(path)
  1032. if err != nil {
  1033. return
  1034. }
  1035. _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  1036. if e1 != 0 {
  1037. err = errnoErr(e1)
  1038. }
  1039. return
  1040. }
  1041. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1042. func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
  1043. var _p0 *byte
  1044. _p0, err = BytePtrFromString(path)
  1045. if err != nil {
  1046. return
  1047. }
  1048. _, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  1049. if e1 != 0 {
  1050. err = errnoErr(e1)
  1051. }
  1052. return
  1053. }
  1054. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1055. func Mknod(path string, mode uint32, dev int) (err error) {
  1056. var _p0 *byte
  1057. _p0, err = BytePtrFromString(path)
  1058. if err != nil {
  1059. return
  1060. }
  1061. _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
  1062. if e1 != 0 {
  1063. err = errnoErr(e1)
  1064. }
  1065. return
  1066. }
  1067. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1068. func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
  1069. var _p0 *byte
  1070. _p0, err = BytePtrFromString(path)
  1071. if err != nil {
  1072. return
  1073. }
  1074. _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
  1075. if e1 != 0 {
  1076. err = errnoErr(e1)
  1077. }
  1078. return
  1079. }
  1080. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1081. func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
  1082. _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
  1083. if e1 != 0 {
  1084. err = errnoErr(e1)
  1085. }
  1086. return
  1087. }
  1088. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1089. func Open(path string, mode int, perm uint32) (fd int, err error) {
  1090. var _p0 *byte
  1091. _p0, err = BytePtrFromString(path)
  1092. if err != nil {
  1093. return
  1094. }
  1095. r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
  1096. fd = int(r0)
  1097. if e1 != 0 {
  1098. err = errnoErr(e1)
  1099. }
  1100. return
  1101. }
  1102. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1103. func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
  1104. var _p0 *byte
  1105. _p0, err = BytePtrFromString(path)
  1106. if err != nil {
  1107. return
  1108. }
  1109. r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
  1110. fd = int(r0)
  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 Pathconf(path string, name int) (val int, err error) {
  1118. var _p0 *byte
  1119. _p0, err = BytePtrFromString(path)
  1120. if err != nil {
  1121. return
  1122. }
  1123. r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
  1124. val = int(r0)
  1125. if e1 != 0 {
  1126. err = errnoErr(e1)
  1127. }
  1128. return
  1129. }
  1130. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1131. func Pread(fd int, p []byte, offset int64) (n int, err error) {
  1132. var _p0 unsafe.Pointer
  1133. if len(p) > 0 {
  1134. _p0 = unsafe.Pointer(&p[0])
  1135. } else {
  1136. _p0 = unsafe.Pointer(&_zero)
  1137. }
  1138. r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0)
  1139. n = int(r0)
  1140. if e1 != 0 {
  1141. err = errnoErr(e1)
  1142. }
  1143. return
  1144. }
  1145. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1146. func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  1147. var _p0 unsafe.Pointer
  1148. if len(p) > 0 {
  1149. _p0 = unsafe.Pointer(&p[0])
  1150. } else {
  1151. _p0 = unsafe.Pointer(&_zero)
  1152. }
  1153. r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0)
  1154. n = int(r0)
  1155. if e1 != 0 {
  1156. err = errnoErr(e1)
  1157. }
  1158. return
  1159. }
  1160. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1161. func read(fd int, p []byte) (n int, err error) {
  1162. var _p0 unsafe.Pointer
  1163. if len(p) > 0 {
  1164. _p0 = unsafe.Pointer(&p[0])
  1165. } else {
  1166. _p0 = unsafe.Pointer(&_zero)
  1167. }
  1168. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1169. n = int(r0)
  1170. if e1 != 0 {
  1171. err = errnoErr(e1)
  1172. }
  1173. return
  1174. }
  1175. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1176. func Readlink(path string, buf []byte) (n int, err error) {
  1177. var _p0 *byte
  1178. _p0, err = BytePtrFromString(path)
  1179. if err != nil {
  1180. return
  1181. }
  1182. var _p1 unsafe.Pointer
  1183. if len(buf) > 0 {
  1184. _p1 = unsafe.Pointer(&buf[0])
  1185. } else {
  1186. _p1 = unsafe.Pointer(&_zero)
  1187. }
  1188. r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
  1189. n = int(r0)
  1190. if e1 != 0 {
  1191. err = errnoErr(e1)
  1192. }
  1193. return
  1194. }
  1195. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1196. func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
  1197. var _p0 *byte
  1198. _p0, err = BytePtrFromString(path)
  1199. if err != nil {
  1200. return
  1201. }
  1202. var _p1 unsafe.Pointer
  1203. if len(buf) > 0 {
  1204. _p1 = unsafe.Pointer(&buf[0])
  1205. } else {
  1206. _p1 = unsafe.Pointer(&_zero)
  1207. }
  1208. r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
  1209. n = int(r0)
  1210. if e1 != 0 {
  1211. err = errnoErr(e1)
  1212. }
  1213. return
  1214. }
  1215. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1216. func Rename(from string, to string) (err error) {
  1217. var _p0 *byte
  1218. _p0, err = BytePtrFromString(from)
  1219. if err != nil {
  1220. return
  1221. }
  1222. var _p1 *byte
  1223. _p1, err = BytePtrFromString(to)
  1224. if err != nil {
  1225. return
  1226. }
  1227. _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1228. if e1 != 0 {
  1229. err = errnoErr(e1)
  1230. }
  1231. return
  1232. }
  1233. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1234. func Renameat(fromfd int, from string, tofd int, to string) (err error) {
  1235. var _p0 *byte
  1236. _p0, err = BytePtrFromString(from)
  1237. if err != nil {
  1238. return
  1239. }
  1240. var _p1 *byte
  1241. _p1, err = BytePtrFromString(to)
  1242. if err != nil {
  1243. return
  1244. }
  1245. _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
  1246. if e1 != 0 {
  1247. err = errnoErr(e1)
  1248. }
  1249. return
  1250. }
  1251. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1252. func Revoke(path string) (err error) {
  1253. var _p0 *byte
  1254. _p0, err = BytePtrFromString(path)
  1255. if err != nil {
  1256. return
  1257. }
  1258. _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1259. if e1 != 0 {
  1260. err = errnoErr(e1)
  1261. }
  1262. return
  1263. }
  1264. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1265. func Rmdir(path string) (err error) {
  1266. var _p0 *byte
  1267. _p0, err = BytePtrFromString(path)
  1268. if err != nil {
  1269. return
  1270. }
  1271. _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1272. if e1 != 0 {
  1273. err = errnoErr(e1)
  1274. }
  1275. return
  1276. }
  1277. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1278. func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
  1279. r0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0)
  1280. newoffset = int64(r0)
  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 Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
  1288. r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
  1289. n = int(r0)
  1290. if e1 != 0 {
  1291. err = errnoErr(e1)
  1292. }
  1293. return
  1294. }
  1295. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1296. func Setegid(egid int) (err error) {
  1297. _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
  1298. if e1 != 0 {
  1299. err = errnoErr(e1)
  1300. }
  1301. return
  1302. }
  1303. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1304. func Seteuid(euid int) (err error) {
  1305. _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
  1306. if e1 != 0 {
  1307. err = errnoErr(e1)
  1308. }
  1309. return
  1310. }
  1311. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1312. func Setgid(gid int) (err error) {
  1313. _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
  1314. if e1 != 0 {
  1315. err = errnoErr(e1)
  1316. }
  1317. return
  1318. }
  1319. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1320. func Setpgid(pid int, pgid int) (err error) {
  1321. _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
  1322. if e1 != 0 {
  1323. err = errnoErr(e1)
  1324. }
  1325. return
  1326. }
  1327. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1328. func Setpriority(which int, who int, prio int) (err error) {
  1329. _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
  1330. if e1 != 0 {
  1331. err = errnoErr(e1)
  1332. }
  1333. return
  1334. }
  1335. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1336. func Setregid(rgid int, egid int) (err error) {
  1337. _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
  1338. if e1 != 0 {
  1339. err = errnoErr(e1)
  1340. }
  1341. return
  1342. }
  1343. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1344. func Setreuid(ruid int, euid int) (err error) {
  1345. _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
  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 Setrlimit(which int, lim *Rlimit) (err error) {
  1353. _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 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 Setsid() (pid int, err error) {
  1361. r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
  1362. pid = int(r0)
  1363. if e1 != 0 {
  1364. err = errnoErr(e1)
  1365. }
  1366. return
  1367. }
  1368. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1369. func Settimeofday(tp *Timeval) (err error) {
  1370. _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
  1371. if e1 != 0 {
  1372. err = errnoErr(e1)
  1373. }
  1374. return
  1375. }
  1376. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1377. func Setuid(uid int) (err error) {
  1378. _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
  1379. if e1 != 0 {
  1380. err = errnoErr(e1)
  1381. }
  1382. return
  1383. }
  1384. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1385. func Stat(path string, stat *Stat_t) (err error) {
  1386. var _p0 *byte
  1387. _p0, err = BytePtrFromString(path)
  1388. if err != nil {
  1389. return
  1390. }
  1391. _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  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 Statvfs1(path string, buf *Statvfs_t, flags int) (err error) {
  1399. var _p0 *byte
  1400. _p0, err = BytePtrFromString(path)
  1401. if err != nil {
  1402. return
  1403. }
  1404. _, _, e1 := Syscall(SYS_STATVFS1, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), uintptr(flags))
  1405. if e1 != 0 {
  1406. err = errnoErr(e1)
  1407. }
  1408. return
  1409. }
  1410. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1411. func Symlink(path string, link string) (err error) {
  1412. var _p0 *byte
  1413. _p0, err = BytePtrFromString(path)
  1414. if err != nil {
  1415. return
  1416. }
  1417. var _p1 *byte
  1418. _p1, err = BytePtrFromString(link)
  1419. if err != nil {
  1420. return
  1421. }
  1422. _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1423. if e1 != 0 {
  1424. err = errnoErr(e1)
  1425. }
  1426. return
  1427. }
  1428. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1429. func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
  1430. var _p0 *byte
  1431. _p0, err = BytePtrFromString(oldpath)
  1432. if err != nil {
  1433. return
  1434. }
  1435. var _p1 *byte
  1436. _p1, err = BytePtrFromString(newpath)
  1437. if err != nil {
  1438. return
  1439. }
  1440. _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
  1441. if e1 != 0 {
  1442. err = errnoErr(e1)
  1443. }
  1444. return
  1445. }
  1446. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1447. func Sync() (err error) {
  1448. _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
  1449. if e1 != 0 {
  1450. err = errnoErr(e1)
  1451. }
  1452. return
  1453. }
  1454. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1455. func Truncate(path string, length int64) (err error) {
  1456. var _p0 *byte
  1457. _p0, err = BytePtrFromString(path)
  1458. if err != nil {
  1459. return
  1460. }
  1461. _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length))
  1462. if e1 != 0 {
  1463. err = errnoErr(e1)
  1464. }
  1465. return
  1466. }
  1467. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1468. func Umask(newmask int) (oldmask int) {
  1469. r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
  1470. oldmask = int(r0)
  1471. return
  1472. }
  1473. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1474. func Unlink(path string) (err error) {
  1475. var _p0 *byte
  1476. _p0, err = BytePtrFromString(path)
  1477. if err != nil {
  1478. return
  1479. }
  1480. _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1481. if e1 != 0 {
  1482. err = errnoErr(e1)
  1483. }
  1484. return
  1485. }
  1486. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1487. func Unlinkat(dirfd int, path string, flags int) (err error) {
  1488. var _p0 *byte
  1489. _p0, err = BytePtrFromString(path)
  1490. if err != nil {
  1491. return
  1492. }
  1493. _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
  1494. if e1 != 0 {
  1495. err = errnoErr(e1)
  1496. }
  1497. return
  1498. }
  1499. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1500. func Unmount(path string, flags int) (err error) {
  1501. var _p0 *byte
  1502. _p0, err = BytePtrFromString(path)
  1503. if err != nil {
  1504. return
  1505. }
  1506. _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  1507. if e1 != 0 {
  1508. err = errnoErr(e1)
  1509. }
  1510. return
  1511. }
  1512. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1513. func write(fd int, p []byte) (n int, err error) {
  1514. var _p0 unsafe.Pointer
  1515. if len(p) > 0 {
  1516. _p0 = unsafe.Pointer(&p[0])
  1517. } else {
  1518. _p0 = unsafe.Pointer(&_zero)
  1519. }
  1520. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1521. n = int(r0)
  1522. if e1 != 0 {
  1523. err = errnoErr(e1)
  1524. }
  1525. return
  1526. }
  1527. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1528. func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
  1529. r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0)
  1530. ret = uintptr(r0)
  1531. if e1 != 0 {
  1532. err = errnoErr(e1)
  1533. }
  1534. return
  1535. }
  1536. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1537. func munmap(addr uintptr, length uintptr) (err error) {
  1538. _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
  1539. if e1 != 0 {
  1540. err = errnoErr(e1)
  1541. }
  1542. return
  1543. }
  1544. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1545. func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
  1546. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1547. n = int(r0)
  1548. if e1 != 0 {
  1549. err = errnoErr(e1)
  1550. }
  1551. return
  1552. }
  1553. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1554. func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
  1555. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1556. n = int(r0)
  1557. if e1 != 0 {
  1558. err = errnoErr(e1)
  1559. }
  1560. return
  1561. }
  1562. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1563. func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
  1564. var _p0 *byte
  1565. _p0, err = BytePtrFromString(path)
  1566. if err != nil {
  1567. return
  1568. }
  1569. _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
  1570. if e1 != 0 {
  1571. err = errnoErr(e1)
  1572. }
  1573. return
  1574. }