zsyscall_freebsd_amd64.go 45 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889
  1. // mksyscall.pl -tags freebsd,amd64 syscall_bsd.go syscall_freebsd.go syscall_freebsd_amd64.go
  2. // Code generated by the command above; see README.md. DO NOT EDIT.
  3. // +build freebsd,amd64
  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() (r int, w int, err error) {
  315. r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
  316. r = int(r0)
  317. w = 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 ioctl(fd int, req uint, arg uintptr) (err error) {
  325. _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
  326. if e1 != 0 {
  327. err = errnoErr(e1)
  328. }
  329. return
  330. }
  331. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  332. func Access(path string, mode uint32) (err error) {
  333. var _p0 *byte
  334. _p0, err = BytePtrFromString(path)
  335. if err != nil {
  336. return
  337. }
  338. _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  339. if e1 != 0 {
  340. err = errnoErr(e1)
  341. }
  342. return
  343. }
  344. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  345. func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
  346. _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
  347. if e1 != 0 {
  348. err = errnoErr(e1)
  349. }
  350. return
  351. }
  352. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  353. func CapEnter() (err error) {
  354. _, _, e1 := Syscall(SYS_CAP_ENTER, 0, 0, 0)
  355. if e1 != 0 {
  356. err = errnoErr(e1)
  357. }
  358. return
  359. }
  360. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  361. func capRightsGet(version int, fd int, rightsp *CapRights) (err error) {
  362. _, _, e1 := Syscall(SYS___CAP_RIGHTS_GET, uintptr(version), uintptr(fd), uintptr(unsafe.Pointer(rightsp)))
  363. if e1 != 0 {
  364. err = errnoErr(e1)
  365. }
  366. return
  367. }
  368. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  369. func capRightsLimit(fd int, rightsp *CapRights) (err error) {
  370. _, _, e1 := Syscall(SYS_CAP_RIGHTS_LIMIT, uintptr(fd), uintptr(unsafe.Pointer(rightsp)), 0)
  371. if e1 != 0 {
  372. err = errnoErr(e1)
  373. }
  374. return
  375. }
  376. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  377. func Chdir(path string) (err error) {
  378. var _p0 *byte
  379. _p0, err = BytePtrFromString(path)
  380. if err != nil {
  381. return
  382. }
  383. _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
  384. if e1 != 0 {
  385. err = errnoErr(e1)
  386. }
  387. return
  388. }
  389. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  390. func Chflags(path string, flags int) (err error) {
  391. var _p0 *byte
  392. _p0, err = BytePtrFromString(path)
  393. if err != nil {
  394. return
  395. }
  396. _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  397. if e1 != 0 {
  398. err = errnoErr(e1)
  399. }
  400. return
  401. }
  402. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  403. func Chmod(path string, mode uint32) (err error) {
  404. var _p0 *byte
  405. _p0, err = BytePtrFromString(path)
  406. if err != nil {
  407. return
  408. }
  409. _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  410. if e1 != 0 {
  411. err = errnoErr(e1)
  412. }
  413. return
  414. }
  415. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  416. func Chown(path string, uid int, gid int) (err error) {
  417. var _p0 *byte
  418. _p0, err = BytePtrFromString(path)
  419. if err != nil {
  420. return
  421. }
  422. _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  423. if e1 != 0 {
  424. err = errnoErr(e1)
  425. }
  426. return
  427. }
  428. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  429. func Chroot(path string) (err error) {
  430. var _p0 *byte
  431. _p0, err = BytePtrFromString(path)
  432. if err != nil {
  433. return
  434. }
  435. _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
  436. if e1 != 0 {
  437. err = errnoErr(e1)
  438. }
  439. return
  440. }
  441. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  442. func Close(fd int) (err error) {
  443. _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
  444. if e1 != 0 {
  445. err = errnoErr(e1)
  446. }
  447. return
  448. }
  449. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  450. func Dup(fd int) (nfd int, err error) {
  451. r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
  452. nfd = int(r0)
  453. if e1 != 0 {
  454. err = errnoErr(e1)
  455. }
  456. return
  457. }
  458. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  459. func Dup2(from int, to int) (err error) {
  460. _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
  461. if e1 != 0 {
  462. err = errnoErr(e1)
  463. }
  464. return
  465. }
  466. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  467. func Exit(code int) {
  468. Syscall(SYS_EXIT, uintptr(code), 0, 0)
  469. return
  470. }
  471. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  472. func ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
  473. var _p0 *byte
  474. _p0, err = BytePtrFromString(attrname)
  475. if err != nil {
  476. return
  477. }
  478. r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
  479. ret = int(r0)
  480. if e1 != 0 {
  481. err = errnoErr(e1)
  482. }
  483. return
  484. }
  485. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  486. func ExtattrSetFd(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_SET_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 ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) {
  501. var _p0 *byte
  502. _p0, err = BytePtrFromString(attrname)
  503. if err != nil {
  504. return
  505. }
  506. _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)))
  507. if e1 != 0 {
  508. err = errnoErr(e1)
  509. }
  510. return
  511. }
  512. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  513. func ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
  514. r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
  515. ret = int(r0)
  516. if e1 != 0 {
  517. err = errnoErr(e1)
  518. }
  519. return
  520. }
  521. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  522. func ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
  523. var _p0 *byte
  524. _p0, err = BytePtrFromString(file)
  525. if err != nil {
  526. return
  527. }
  528. var _p1 *byte
  529. _p1, err = BytePtrFromString(attrname)
  530. if err != nil {
  531. return
  532. }
  533. r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
  534. ret = int(r0)
  535. if e1 != 0 {
  536. err = errnoErr(e1)
  537. }
  538. return
  539. }
  540. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  541. func ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
  542. var _p0 *byte
  543. _p0, err = BytePtrFromString(file)
  544. if err != nil {
  545. return
  546. }
  547. var _p1 *byte
  548. _p1, err = BytePtrFromString(attrname)
  549. if err != nil {
  550. return
  551. }
  552. r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
  553. ret = int(r0)
  554. if e1 != 0 {
  555. err = errnoErr(e1)
  556. }
  557. return
  558. }
  559. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  560. func ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) {
  561. var _p0 *byte
  562. _p0, err = BytePtrFromString(file)
  563. if err != nil {
  564. return
  565. }
  566. var _p1 *byte
  567. _p1, err = BytePtrFromString(attrname)
  568. if err != nil {
  569. return
  570. }
  571. _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
  572. if e1 != 0 {
  573. err = errnoErr(e1)
  574. }
  575. return
  576. }
  577. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  578. func ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
  579. var _p0 *byte
  580. _p0, err = BytePtrFromString(file)
  581. if err != nil {
  582. return
  583. }
  584. r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
  585. ret = int(r0)
  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 ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
  593. var _p0 *byte
  594. _p0, err = BytePtrFromString(link)
  595. if err != nil {
  596. return
  597. }
  598. var _p1 *byte
  599. _p1, err = BytePtrFromString(attrname)
  600. if err != nil {
  601. return
  602. }
  603. r0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
  604. ret = int(r0)
  605. if e1 != 0 {
  606. err = errnoErr(e1)
  607. }
  608. return
  609. }
  610. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  611. func ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
  612. var _p0 *byte
  613. _p0, err = BytePtrFromString(link)
  614. if err != nil {
  615. return
  616. }
  617. var _p1 *byte
  618. _p1, err = BytePtrFromString(attrname)
  619. if err != nil {
  620. return
  621. }
  622. r0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
  623. ret = int(r0)
  624. if e1 != 0 {
  625. err = errnoErr(e1)
  626. }
  627. return
  628. }
  629. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  630. func ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) {
  631. var _p0 *byte
  632. _p0, err = BytePtrFromString(link)
  633. if err != nil {
  634. return
  635. }
  636. var _p1 *byte
  637. _p1, err = BytePtrFromString(attrname)
  638. if err != nil {
  639. return
  640. }
  641. _, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
  642. if e1 != 0 {
  643. err = errnoErr(e1)
  644. }
  645. return
  646. }
  647. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  648. func ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
  649. var _p0 *byte
  650. _p0, err = BytePtrFromString(link)
  651. if err != nil {
  652. return
  653. }
  654. r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
  655. ret = int(r0)
  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 Fadvise(fd int, offset int64, length int64, advice int) (err error) {
  663. _, _, e1 := Syscall6(SYS_POSIX_FADVISE, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
  664. if e1 != 0 {
  665. err = errnoErr(e1)
  666. }
  667. return
  668. }
  669. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  670. func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
  671. var _p0 *byte
  672. _p0, err = BytePtrFromString(path)
  673. if err != nil {
  674. return
  675. }
  676. _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
  677. if e1 != 0 {
  678. err = errnoErr(e1)
  679. }
  680. return
  681. }
  682. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  683. func Fchdir(fd int) (err error) {
  684. _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
  685. if e1 != 0 {
  686. err = errnoErr(e1)
  687. }
  688. return
  689. }
  690. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  691. func Fchflags(fd int, flags int) (err error) {
  692. _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
  693. if e1 != 0 {
  694. err = errnoErr(e1)
  695. }
  696. return
  697. }
  698. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  699. func Fchmod(fd int, mode uint32) (err error) {
  700. _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
  701. if e1 != 0 {
  702. err = errnoErr(e1)
  703. }
  704. return
  705. }
  706. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  707. func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
  708. var _p0 *byte
  709. _p0, err = BytePtrFromString(path)
  710. if err != nil {
  711. return
  712. }
  713. _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
  714. if e1 != 0 {
  715. err = errnoErr(e1)
  716. }
  717. return
  718. }
  719. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  720. func Fchown(fd int, uid int, gid int) (err error) {
  721. _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
  722. if e1 != 0 {
  723. err = errnoErr(e1)
  724. }
  725. return
  726. }
  727. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  728. func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
  729. var _p0 *byte
  730. _p0, err = BytePtrFromString(path)
  731. if err != nil {
  732. return
  733. }
  734. _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
  735. if e1 != 0 {
  736. err = errnoErr(e1)
  737. }
  738. return
  739. }
  740. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  741. func Flock(fd int, how int) (err error) {
  742. _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
  743. if e1 != 0 {
  744. err = errnoErr(e1)
  745. }
  746. return
  747. }
  748. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  749. func Fpathconf(fd int, name int) (val int, err error) {
  750. r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
  751. val = int(r0)
  752. if e1 != 0 {
  753. err = errnoErr(e1)
  754. }
  755. return
  756. }
  757. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  758. func Fstat(fd int, stat *Stat_t) (err error) {
  759. _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  760. if e1 != 0 {
  761. err = errnoErr(e1)
  762. }
  763. return
  764. }
  765. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  766. func Fstatfs(fd int, stat *Statfs_t) (err error) {
  767. _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  768. if e1 != 0 {
  769. err = errnoErr(e1)
  770. }
  771. return
  772. }
  773. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  774. func Fsync(fd int) (err error) {
  775. _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
  776. if e1 != 0 {
  777. err = errnoErr(e1)
  778. }
  779. return
  780. }
  781. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  782. func Ftruncate(fd int, length int64) (err error) {
  783. _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
  784. if e1 != 0 {
  785. err = errnoErr(e1)
  786. }
  787. return
  788. }
  789. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  790. func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
  791. var _p0 unsafe.Pointer
  792. if len(buf) > 0 {
  793. _p0 = unsafe.Pointer(&buf[0])
  794. } else {
  795. _p0 = unsafe.Pointer(&_zero)
  796. }
  797. r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
  798. n = int(r0)
  799. if e1 != 0 {
  800. err = errnoErr(e1)
  801. }
  802. return
  803. }
  804. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  805. func Getdtablesize() (size int) {
  806. r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
  807. size = int(r0)
  808. return
  809. }
  810. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  811. func Getegid() (egid int) {
  812. r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
  813. egid = int(r0)
  814. return
  815. }
  816. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  817. func Geteuid() (uid int) {
  818. r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
  819. uid = int(r0)
  820. return
  821. }
  822. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  823. func Getgid() (gid int) {
  824. r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
  825. gid = int(r0)
  826. return
  827. }
  828. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  829. func Getpgid(pid int) (pgid int, err error) {
  830. r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
  831. pgid = int(r0)
  832. if e1 != 0 {
  833. err = errnoErr(e1)
  834. }
  835. return
  836. }
  837. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  838. func Getpgrp() (pgrp int) {
  839. r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
  840. pgrp = int(r0)
  841. return
  842. }
  843. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  844. func Getpid() (pid int) {
  845. r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
  846. pid = int(r0)
  847. return
  848. }
  849. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  850. func Getppid() (ppid int) {
  851. r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
  852. ppid = int(r0)
  853. return
  854. }
  855. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  856. func Getpriority(which int, who int) (prio int, err error) {
  857. r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
  858. prio = int(r0)
  859. if e1 != 0 {
  860. err = errnoErr(e1)
  861. }
  862. return
  863. }
  864. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  865. func Getrlimit(which int, lim *Rlimit) (err error) {
  866. _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
  867. if e1 != 0 {
  868. err = errnoErr(e1)
  869. }
  870. return
  871. }
  872. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  873. func Getrusage(who int, rusage *Rusage) (err error) {
  874. _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
  875. if e1 != 0 {
  876. err = errnoErr(e1)
  877. }
  878. return
  879. }
  880. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  881. func Getsid(pid int) (sid int, err error) {
  882. r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
  883. sid = int(r0)
  884. if e1 != 0 {
  885. err = errnoErr(e1)
  886. }
  887. return
  888. }
  889. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  890. func Gettimeofday(tv *Timeval) (err error) {
  891. _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  892. if e1 != 0 {
  893. err = errnoErr(e1)
  894. }
  895. return
  896. }
  897. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  898. func Getuid() (uid int) {
  899. r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
  900. uid = int(r0)
  901. return
  902. }
  903. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  904. func Issetugid() (tainted bool) {
  905. r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
  906. tainted = bool(r0 != 0)
  907. return
  908. }
  909. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  910. func Kill(pid int, signum syscall.Signal) (err error) {
  911. _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
  912. if e1 != 0 {
  913. err = errnoErr(e1)
  914. }
  915. return
  916. }
  917. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  918. func Kqueue() (fd int, err error) {
  919. r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
  920. fd = int(r0)
  921. if e1 != 0 {
  922. err = errnoErr(e1)
  923. }
  924. return
  925. }
  926. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  927. func Lchown(path string, uid int, gid int) (err error) {
  928. var _p0 *byte
  929. _p0, err = BytePtrFromString(path)
  930. if err != nil {
  931. return
  932. }
  933. _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  934. if e1 != 0 {
  935. err = errnoErr(e1)
  936. }
  937. return
  938. }
  939. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  940. func Link(path string, link string) (err error) {
  941. var _p0 *byte
  942. _p0, err = BytePtrFromString(path)
  943. if err != nil {
  944. return
  945. }
  946. var _p1 *byte
  947. _p1, err = BytePtrFromString(link)
  948. if err != nil {
  949. return
  950. }
  951. _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  952. if e1 != 0 {
  953. err = errnoErr(e1)
  954. }
  955. return
  956. }
  957. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  958. func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
  959. var _p0 *byte
  960. _p0, err = BytePtrFromString(path)
  961. if err != nil {
  962. return
  963. }
  964. var _p1 *byte
  965. _p1, err = BytePtrFromString(link)
  966. if err != nil {
  967. return
  968. }
  969. _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
  970. if e1 != 0 {
  971. err = errnoErr(e1)
  972. }
  973. return
  974. }
  975. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  976. func Listen(s int, backlog int) (err error) {
  977. _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
  978. if e1 != 0 {
  979. err = errnoErr(e1)
  980. }
  981. return
  982. }
  983. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  984. func Lstat(path string, stat *Stat_t) (err error) {
  985. var _p0 *byte
  986. _p0, err = BytePtrFromString(path)
  987. if err != nil {
  988. return
  989. }
  990. _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  991. if e1 != 0 {
  992. err = errnoErr(e1)
  993. }
  994. return
  995. }
  996. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  997. func Mkdir(path string, mode uint32) (err error) {
  998. var _p0 *byte
  999. _p0, err = BytePtrFromString(path)
  1000. if err != nil {
  1001. return
  1002. }
  1003. _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  1004. if e1 != 0 {
  1005. err = errnoErr(e1)
  1006. }
  1007. return
  1008. }
  1009. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1010. func Mkdirat(dirfd int, path string, mode uint32) (err error) {
  1011. var _p0 *byte
  1012. _p0, err = BytePtrFromString(path)
  1013. if err != nil {
  1014. return
  1015. }
  1016. _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  1017. if e1 != 0 {
  1018. err = errnoErr(e1)
  1019. }
  1020. return
  1021. }
  1022. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1023. func Mkfifo(path string, mode uint32) (err error) {
  1024. var _p0 *byte
  1025. _p0, err = BytePtrFromString(path)
  1026. if err != nil {
  1027. return
  1028. }
  1029. _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  1030. if e1 != 0 {
  1031. err = errnoErr(e1)
  1032. }
  1033. return
  1034. }
  1035. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1036. func Mknod(path string, mode uint32, dev int) (err error) {
  1037. var _p0 *byte
  1038. _p0, err = BytePtrFromString(path)
  1039. if err != nil {
  1040. return
  1041. }
  1042. _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
  1043. if e1 != 0 {
  1044. err = errnoErr(e1)
  1045. }
  1046. return
  1047. }
  1048. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1049. func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
  1050. _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
  1051. if e1 != 0 {
  1052. err = errnoErr(e1)
  1053. }
  1054. return
  1055. }
  1056. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1057. func Open(path string, mode int, perm uint32) (fd int, err error) {
  1058. var _p0 *byte
  1059. _p0, err = BytePtrFromString(path)
  1060. if err != nil {
  1061. return
  1062. }
  1063. r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
  1064. fd = int(r0)
  1065. if e1 != 0 {
  1066. err = errnoErr(e1)
  1067. }
  1068. return
  1069. }
  1070. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1071. func Openat(fdat int, path string, mode int, perm uint32) (fd int, err error) {
  1072. var _p0 *byte
  1073. _p0, err = BytePtrFromString(path)
  1074. if err != nil {
  1075. return
  1076. }
  1077. r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(fdat), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
  1078. fd = int(r0)
  1079. if e1 != 0 {
  1080. err = errnoErr(e1)
  1081. }
  1082. return
  1083. }
  1084. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1085. func Pathconf(path string, name int) (val int, err error) {
  1086. var _p0 *byte
  1087. _p0, err = BytePtrFromString(path)
  1088. if err != nil {
  1089. return
  1090. }
  1091. r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
  1092. val = int(r0)
  1093. if e1 != 0 {
  1094. err = errnoErr(e1)
  1095. }
  1096. return
  1097. }
  1098. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1099. func Pread(fd int, p []byte, offset int64) (n int, err error) {
  1100. var _p0 unsafe.Pointer
  1101. if len(p) > 0 {
  1102. _p0 = unsafe.Pointer(&p[0])
  1103. } else {
  1104. _p0 = unsafe.Pointer(&_zero)
  1105. }
  1106. r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  1107. n = int(r0)
  1108. if e1 != 0 {
  1109. err = errnoErr(e1)
  1110. }
  1111. return
  1112. }
  1113. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1114. func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  1115. var _p0 unsafe.Pointer
  1116. if len(p) > 0 {
  1117. _p0 = unsafe.Pointer(&p[0])
  1118. } else {
  1119. _p0 = unsafe.Pointer(&_zero)
  1120. }
  1121. r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  1122. n = int(r0)
  1123. if e1 != 0 {
  1124. err = errnoErr(e1)
  1125. }
  1126. return
  1127. }
  1128. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1129. func read(fd int, p []byte) (n int, err error) {
  1130. var _p0 unsafe.Pointer
  1131. if len(p) > 0 {
  1132. _p0 = unsafe.Pointer(&p[0])
  1133. } else {
  1134. _p0 = unsafe.Pointer(&_zero)
  1135. }
  1136. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1137. n = int(r0)
  1138. if e1 != 0 {
  1139. err = errnoErr(e1)
  1140. }
  1141. return
  1142. }
  1143. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1144. func Readlink(path string, buf []byte) (n int, err error) {
  1145. var _p0 *byte
  1146. _p0, err = BytePtrFromString(path)
  1147. if err != nil {
  1148. return
  1149. }
  1150. var _p1 unsafe.Pointer
  1151. if len(buf) > 0 {
  1152. _p1 = unsafe.Pointer(&buf[0])
  1153. } else {
  1154. _p1 = unsafe.Pointer(&_zero)
  1155. }
  1156. r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
  1157. n = int(r0)
  1158. if e1 != 0 {
  1159. err = errnoErr(e1)
  1160. }
  1161. return
  1162. }
  1163. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1164. func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
  1165. var _p0 *byte
  1166. _p0, err = BytePtrFromString(path)
  1167. if err != nil {
  1168. return
  1169. }
  1170. var _p1 unsafe.Pointer
  1171. if len(buf) > 0 {
  1172. _p1 = unsafe.Pointer(&buf[0])
  1173. } else {
  1174. _p1 = unsafe.Pointer(&_zero)
  1175. }
  1176. r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
  1177. n = int(r0)
  1178. if e1 != 0 {
  1179. err = errnoErr(e1)
  1180. }
  1181. return
  1182. }
  1183. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1184. func Rename(from string, to string) (err error) {
  1185. var _p0 *byte
  1186. _p0, err = BytePtrFromString(from)
  1187. if err != nil {
  1188. return
  1189. }
  1190. var _p1 *byte
  1191. _p1, err = BytePtrFromString(to)
  1192. if err != nil {
  1193. return
  1194. }
  1195. _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1196. if e1 != 0 {
  1197. err = errnoErr(e1)
  1198. }
  1199. return
  1200. }
  1201. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1202. func Renameat(fromfd int, from string, tofd int, to string) (err error) {
  1203. var _p0 *byte
  1204. _p0, err = BytePtrFromString(from)
  1205. if err != nil {
  1206. return
  1207. }
  1208. var _p1 *byte
  1209. _p1, err = BytePtrFromString(to)
  1210. if err != nil {
  1211. return
  1212. }
  1213. _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
  1214. if e1 != 0 {
  1215. err = errnoErr(e1)
  1216. }
  1217. return
  1218. }
  1219. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1220. func Revoke(path string) (err error) {
  1221. var _p0 *byte
  1222. _p0, err = BytePtrFromString(path)
  1223. if err != nil {
  1224. return
  1225. }
  1226. _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1227. if e1 != 0 {
  1228. err = errnoErr(e1)
  1229. }
  1230. return
  1231. }
  1232. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1233. func Rmdir(path string) (err error) {
  1234. var _p0 *byte
  1235. _p0, err = BytePtrFromString(path)
  1236. if err != nil {
  1237. return
  1238. }
  1239. _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1240. if e1 != 0 {
  1241. err = errnoErr(e1)
  1242. }
  1243. return
  1244. }
  1245. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1246. func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
  1247. r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
  1248. newoffset = int64(r0)
  1249. if e1 != 0 {
  1250. err = errnoErr(e1)
  1251. }
  1252. return
  1253. }
  1254. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1255. func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
  1256. _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
  1257. if e1 != 0 {
  1258. err = errnoErr(e1)
  1259. }
  1260. return
  1261. }
  1262. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1263. func Setegid(egid int) (err error) {
  1264. _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
  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 Seteuid(euid int) (err error) {
  1272. _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 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 Setgid(gid int) (err error) {
  1280. _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 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 Setlogin(name string) (err error) {
  1288. var _p0 *byte
  1289. _p0, err = BytePtrFromString(name)
  1290. if err != nil {
  1291. return
  1292. }
  1293. _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1294. if e1 != 0 {
  1295. err = errnoErr(e1)
  1296. }
  1297. return
  1298. }
  1299. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1300. func Setpgid(pid int, pgid int) (err error) {
  1301. _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
  1302. if e1 != 0 {
  1303. err = errnoErr(e1)
  1304. }
  1305. return
  1306. }
  1307. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1308. func Setpriority(which int, who int, prio int) (err error) {
  1309. _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
  1310. if e1 != 0 {
  1311. err = errnoErr(e1)
  1312. }
  1313. return
  1314. }
  1315. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1316. func Setregid(rgid int, egid int) (err error) {
  1317. _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
  1318. if e1 != 0 {
  1319. err = errnoErr(e1)
  1320. }
  1321. return
  1322. }
  1323. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1324. func Setreuid(ruid int, euid int) (err error) {
  1325. _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
  1326. if e1 != 0 {
  1327. err = errnoErr(e1)
  1328. }
  1329. return
  1330. }
  1331. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1332. func Setresgid(rgid int, egid int, sgid int) (err error) {
  1333. _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
  1334. if e1 != 0 {
  1335. err = errnoErr(e1)
  1336. }
  1337. return
  1338. }
  1339. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1340. func Setresuid(ruid int, euid int, suid int) (err error) {
  1341. _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
  1342. if e1 != 0 {
  1343. err = errnoErr(e1)
  1344. }
  1345. return
  1346. }
  1347. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1348. func Setrlimit(which int, lim *Rlimit) (err error) {
  1349. _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
  1350. if e1 != 0 {
  1351. err = errnoErr(e1)
  1352. }
  1353. return
  1354. }
  1355. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1356. func Setsid() (pid int, err error) {
  1357. r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
  1358. pid = int(r0)
  1359. if e1 != 0 {
  1360. err = errnoErr(e1)
  1361. }
  1362. return
  1363. }
  1364. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1365. func Settimeofday(tp *Timeval) (err error) {
  1366. _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
  1367. if e1 != 0 {
  1368. err = errnoErr(e1)
  1369. }
  1370. return
  1371. }
  1372. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1373. func Setuid(uid int) (err error) {
  1374. _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 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 Stat(path string, stat *Stat_t) (err error) {
  1382. var _p0 *byte
  1383. _p0, err = BytePtrFromString(path)
  1384. if err != nil {
  1385. return
  1386. }
  1387. _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1388. if e1 != 0 {
  1389. err = errnoErr(e1)
  1390. }
  1391. return
  1392. }
  1393. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1394. func Statfs(path string, stat *Statfs_t) (err error) {
  1395. var _p0 *byte
  1396. _p0, err = BytePtrFromString(path)
  1397. if err != nil {
  1398. return
  1399. }
  1400. _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1401. if e1 != 0 {
  1402. err = errnoErr(e1)
  1403. }
  1404. return
  1405. }
  1406. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1407. func Symlink(path string, link string) (err error) {
  1408. var _p0 *byte
  1409. _p0, err = BytePtrFromString(path)
  1410. if err != nil {
  1411. return
  1412. }
  1413. var _p1 *byte
  1414. _p1, err = BytePtrFromString(link)
  1415. if err != nil {
  1416. return
  1417. }
  1418. _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 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 Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
  1426. var _p0 *byte
  1427. _p0, err = BytePtrFromString(oldpath)
  1428. if err != nil {
  1429. return
  1430. }
  1431. var _p1 *byte
  1432. _p1, err = BytePtrFromString(newpath)
  1433. if err != nil {
  1434. return
  1435. }
  1436. _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
  1437. if e1 != 0 {
  1438. err = errnoErr(e1)
  1439. }
  1440. return
  1441. }
  1442. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1443. func Sync() (err error) {
  1444. _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
  1445. if e1 != 0 {
  1446. err = errnoErr(e1)
  1447. }
  1448. return
  1449. }
  1450. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1451. func Truncate(path string, length int64) (err error) {
  1452. var _p0 *byte
  1453. _p0, err = BytePtrFromString(path)
  1454. if err != nil {
  1455. return
  1456. }
  1457. _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
  1458. if e1 != 0 {
  1459. err = errnoErr(e1)
  1460. }
  1461. return
  1462. }
  1463. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1464. func Umask(newmask int) (oldmask int) {
  1465. r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
  1466. oldmask = int(r0)
  1467. return
  1468. }
  1469. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1470. func Undelete(path string) (err error) {
  1471. var _p0 *byte
  1472. _p0, err = BytePtrFromString(path)
  1473. if err != nil {
  1474. return
  1475. }
  1476. _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 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 Unlink(path string) (err error) {
  1484. var _p0 *byte
  1485. _p0, err = BytePtrFromString(path)
  1486. if err != nil {
  1487. return
  1488. }
  1489. _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1490. if e1 != 0 {
  1491. err = errnoErr(e1)
  1492. }
  1493. return
  1494. }
  1495. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1496. func Unlinkat(dirfd int, path string, flags int) (err error) {
  1497. var _p0 *byte
  1498. _p0, err = BytePtrFromString(path)
  1499. if err != nil {
  1500. return
  1501. }
  1502. _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
  1503. if e1 != 0 {
  1504. err = errnoErr(e1)
  1505. }
  1506. return
  1507. }
  1508. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1509. func Unmount(path string, flags int) (err error) {
  1510. var _p0 *byte
  1511. _p0, err = BytePtrFromString(path)
  1512. if err != nil {
  1513. return
  1514. }
  1515. _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  1516. if e1 != 0 {
  1517. err = errnoErr(e1)
  1518. }
  1519. return
  1520. }
  1521. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1522. func write(fd int, p []byte) (n int, err error) {
  1523. var _p0 unsafe.Pointer
  1524. if len(p) > 0 {
  1525. _p0 = unsafe.Pointer(&p[0])
  1526. } else {
  1527. _p0 = unsafe.Pointer(&_zero)
  1528. }
  1529. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1530. n = int(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 mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
  1538. r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
  1539. ret = uintptr(r0)
  1540. if e1 != 0 {
  1541. err = errnoErr(e1)
  1542. }
  1543. return
  1544. }
  1545. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1546. func munmap(addr uintptr, length uintptr) (err error) {
  1547. _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
  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 readlen(fd int, buf *byte, nbuf int) (n int, err error) {
  1555. r0, _, e1 := Syscall(SYS_READ, 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 writelen(fd int, buf *byte, nbuf int) (n int, err error) {
  1564. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1565. n = int(r0)
  1566. if e1 != 0 {
  1567. err = errnoErr(e1)
  1568. }
  1569. return
  1570. }
  1571. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1572. func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) {
  1573. r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
  1574. nfd = int(r0)
  1575. if e1 != 0 {
  1576. err = errnoErr(e1)
  1577. }
  1578. return
  1579. }
  1580. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1581. func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
  1582. var _p0 *byte
  1583. _p0, err = BytePtrFromString(path)
  1584. if err != nil {
  1585. return
  1586. }
  1587. _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
  1588. if e1 != 0 {
  1589. err = errnoErr(e1)
  1590. }
  1591. return
  1592. }