zsyscall_freebsd_arm.go 48 KB

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