zsyscall_freebsd_386.go 48 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016
  1. // go run mksyscall.go -l32 -tags freebsd,386 syscall_bsd.go syscall_freebsd.go syscall_freebsd_386.go
  2. // Code generated by the command above; see README.md. DO NOT EDIT.
  3. //go:build freebsd && 386
  4. // +build freebsd,386
  5. package unix
  6. import (
  7. "syscall"
  8. "unsafe"
  9. )
  10. var _ syscall.Errno
  11. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  12. func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
  13. r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
  14. n = int(r0)
  15. if e1 != 0 {
  16. err = errnoErr(e1)
  17. }
  18. return
  19. }
  20. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  21. func setgroups(ngid int, gid *_Gid_t) (err error) {
  22. _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
  23. if e1 != 0 {
  24. err = errnoErr(e1)
  25. }
  26. return
  27. }
  28. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  29. func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
  30. r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
  31. wpid = int(r0)
  32. if e1 != 0 {
  33. err = errnoErr(e1)
  34. }
  35. return
  36. }
  37. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  38. func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
  39. r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  40. fd = int(r0)
  41. if e1 != 0 {
  42. err = errnoErr(e1)
  43. }
  44. return
  45. }
  46. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  47. func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  48. _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
  49. if e1 != 0 {
  50. err = errnoErr(e1)
  51. }
  52. return
  53. }
  54. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  55. func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  56. _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
  57. if e1 != 0 {
  58. err = errnoErr(e1)
  59. }
  60. return
  61. }
  62. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  63. func socket(domain int, typ int, proto int) (fd int, err error) {
  64. r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
  65. fd = int(r0)
  66. if e1 != 0 {
  67. err = errnoErr(e1)
  68. }
  69. return
  70. }
  71. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  72. func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
  73. _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
  74. if e1 != 0 {
  75. err = errnoErr(e1)
  76. }
  77. return
  78. }
  79. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  80. func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
  81. _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
  82. if e1 != 0 {
  83. err = errnoErr(e1)
  84. }
  85. return
  86. }
  87. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  88. func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  89. _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  90. if e1 != 0 {
  91. err = errnoErr(e1)
  92. }
  93. return
  94. }
  95. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  96. func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  97. _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  98. if e1 != 0 {
  99. err = errnoErr(e1)
  100. }
  101. return
  102. }
  103. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  104. func Shutdown(s int, how int) (err error) {
  105. _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
  106. if e1 != 0 {
  107. err = errnoErr(e1)
  108. }
  109. return
  110. }
  111. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  112. func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
  113. _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
  114. if e1 != 0 {
  115. err = errnoErr(e1)
  116. }
  117. return
  118. }
  119. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  120. func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
  121. var _p0 unsafe.Pointer
  122. if len(p) > 0 {
  123. _p0 = unsafe.Pointer(&p[0])
  124. } else {
  125. _p0 = unsafe.Pointer(&_zero)
  126. }
  127. r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
  128. n = int(r0)
  129. if e1 != 0 {
  130. err = errnoErr(e1)
  131. }
  132. return
  133. }
  134. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  135. func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
  136. var _p0 unsafe.Pointer
  137. if len(buf) > 0 {
  138. _p0 = unsafe.Pointer(&buf[0])
  139. } else {
  140. _p0 = unsafe.Pointer(&_zero)
  141. }
  142. _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
  143. if e1 != 0 {
  144. err = errnoErr(e1)
  145. }
  146. return
  147. }
  148. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  149. func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  150. r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  151. n = int(r0)
  152. if e1 != 0 {
  153. err = errnoErr(e1)
  154. }
  155. return
  156. }
  157. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  158. func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  159. r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  160. n = int(r0)
  161. if e1 != 0 {
  162. err = errnoErr(e1)
  163. }
  164. return
  165. }
  166. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  167. func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
  168. r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
  169. n = int(r0)
  170. if e1 != 0 {
  171. err = errnoErr(e1)
  172. }
  173. return
  174. }
  175. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  176. func utimes(path string, timeval *[2]Timeval) (err error) {
  177. var _p0 *byte
  178. _p0, err = BytePtrFromString(path)
  179. if err != nil {
  180. return
  181. }
  182. _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
  183. if e1 != 0 {
  184. err = errnoErr(e1)
  185. }
  186. return
  187. }
  188. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  189. func futimes(fd int, timeval *[2]Timeval) (err error) {
  190. _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
  191. if e1 != 0 {
  192. err = errnoErr(e1)
  193. }
  194. return
  195. }
  196. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  197. func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
  198. r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
  199. n = int(r0)
  200. if e1 != 0 {
  201. err = errnoErr(e1)
  202. }
  203. return
  204. }
  205. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  206. func Madvise(b []byte, behav int) (err error) {
  207. var _p0 unsafe.Pointer
  208. if len(b) > 0 {
  209. _p0 = unsafe.Pointer(&b[0])
  210. } else {
  211. _p0 = unsafe.Pointer(&_zero)
  212. }
  213. _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
  214. if e1 != 0 {
  215. err = errnoErr(e1)
  216. }
  217. return
  218. }
  219. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  220. func Mlock(b []byte) (err error) {
  221. var _p0 unsafe.Pointer
  222. if len(b) > 0 {
  223. _p0 = unsafe.Pointer(&b[0])
  224. } else {
  225. _p0 = unsafe.Pointer(&_zero)
  226. }
  227. _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
  228. if e1 != 0 {
  229. err = errnoErr(e1)
  230. }
  231. return
  232. }
  233. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  234. func Mlockall(flags int) (err error) {
  235. _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
  236. if e1 != 0 {
  237. err = errnoErr(e1)
  238. }
  239. return
  240. }
  241. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  242. func Mprotect(b []byte, prot int) (err error) {
  243. var _p0 unsafe.Pointer
  244. if len(b) > 0 {
  245. _p0 = unsafe.Pointer(&b[0])
  246. } else {
  247. _p0 = unsafe.Pointer(&_zero)
  248. }
  249. _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
  250. if e1 != 0 {
  251. err = errnoErr(e1)
  252. }
  253. return
  254. }
  255. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  256. func Msync(b []byte, flags int) (err error) {
  257. var _p0 unsafe.Pointer
  258. if len(b) > 0 {
  259. _p0 = unsafe.Pointer(&b[0])
  260. } else {
  261. _p0 = unsafe.Pointer(&_zero)
  262. }
  263. _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
  264. if e1 != 0 {
  265. err = errnoErr(e1)
  266. }
  267. return
  268. }
  269. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  270. func Munlock(b []byte) (err error) {
  271. var _p0 unsafe.Pointer
  272. if len(b) > 0 {
  273. _p0 = unsafe.Pointer(&b[0])
  274. } else {
  275. _p0 = unsafe.Pointer(&_zero)
  276. }
  277. _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
  278. if e1 != 0 {
  279. err = errnoErr(e1)
  280. }
  281. return
  282. }
  283. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  284. func Munlockall() (err error) {
  285. _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
  286. if e1 != 0 {
  287. err = errnoErr(e1)
  288. }
  289. return
  290. }
  291. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  292. func pipe2(p *[2]_C_int, flags int) (err error) {
  293. _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
  294. if e1 != 0 {
  295. err = errnoErr(e1)
  296. }
  297. return
  298. }
  299. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  300. func Getcwd(buf []byte) (n int, err error) {
  301. var _p0 unsafe.Pointer
  302. if len(buf) > 0 {
  303. _p0 = unsafe.Pointer(&buf[0])
  304. } else {
  305. _p0 = unsafe.Pointer(&_zero)
  306. }
  307. r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
  308. n = int(r0)
  309. if e1 != 0 {
  310. err = errnoErr(e1)
  311. }
  312. return
  313. }
  314. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  315. func ioctl(fd int, req uint, arg uintptr) (err error) {
  316. _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
  317. if e1 != 0 {
  318. err = errnoErr(e1)
  319. }
  320. return
  321. }
  322. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  323. func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
  324. var _p0 unsafe.Pointer
  325. if len(mib) > 0 {
  326. _p0 = unsafe.Pointer(&mib[0])
  327. } else {
  328. _p0 = unsafe.Pointer(&_zero)
  329. }
  330. _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
  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 ptrace(request int, pid int, addr uintptr, data int) (err error) {
  338. _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 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 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 := Syscall6(SYS_POSIX_FADVISE, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32), uintptr(advice))
  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 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), uintptr(length>>32))
  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 *uint64) (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), uintptr(dev>>32), 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)), uintptr(offset), uintptr(offset>>32), 0)
  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)), uintptr(offset), uintptr(offset>>32), 0)
  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), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 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(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
  1352. r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
  1353. n = int(r0)
  1354. if e1 != 0 {
  1355. err = errnoErr(e1)
  1356. }
  1357. return
  1358. }
  1359. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1360. func Setegid(egid int) (err error) {
  1361. _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
  1362. if e1 != 0 {
  1363. err = errnoErr(e1)
  1364. }
  1365. return
  1366. }
  1367. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1368. func Seteuid(euid int) (err error) {
  1369. _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
  1370. if e1 != 0 {
  1371. err = errnoErr(e1)
  1372. }
  1373. return
  1374. }
  1375. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1376. func Setgid(gid int) (err error) {
  1377. _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
  1378. if e1 != 0 {
  1379. err = errnoErr(e1)
  1380. }
  1381. return
  1382. }
  1383. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1384. func Setlogin(name string) (err error) {
  1385. var _p0 *byte
  1386. _p0, err = BytePtrFromString(name)
  1387. if err != nil {
  1388. return
  1389. }
  1390. _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1391. if e1 != 0 {
  1392. err = errnoErr(e1)
  1393. }
  1394. return
  1395. }
  1396. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1397. func Setpgid(pid int, pgid int) (err error) {
  1398. _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
  1399. if e1 != 0 {
  1400. err = errnoErr(e1)
  1401. }
  1402. return
  1403. }
  1404. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1405. func Setpriority(which int, who int, prio int) (err error) {
  1406. _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
  1407. if e1 != 0 {
  1408. err = errnoErr(e1)
  1409. }
  1410. return
  1411. }
  1412. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1413. func Setregid(rgid int, egid int) (err error) {
  1414. _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
  1415. if e1 != 0 {
  1416. err = errnoErr(e1)
  1417. }
  1418. return
  1419. }
  1420. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1421. func Setreuid(ruid int, euid int) (err error) {
  1422. _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
  1423. if e1 != 0 {
  1424. err = errnoErr(e1)
  1425. }
  1426. return
  1427. }
  1428. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1429. func Setresgid(rgid int, egid int, sgid int) (err error) {
  1430. _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
  1431. if e1 != 0 {
  1432. err = errnoErr(e1)
  1433. }
  1434. return
  1435. }
  1436. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1437. func Setresuid(ruid int, euid int, suid int) (err error) {
  1438. _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
  1439. if e1 != 0 {
  1440. err = errnoErr(e1)
  1441. }
  1442. return
  1443. }
  1444. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1445. func Setrlimit(which int, lim *Rlimit) (err error) {
  1446. _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
  1447. if e1 != 0 {
  1448. err = errnoErr(e1)
  1449. }
  1450. return
  1451. }
  1452. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1453. func Setsid() (pid int, err error) {
  1454. r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
  1455. pid = int(r0)
  1456. if e1 != 0 {
  1457. err = errnoErr(e1)
  1458. }
  1459. return
  1460. }
  1461. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1462. func Settimeofday(tp *Timeval) (err error) {
  1463. _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
  1464. if e1 != 0 {
  1465. err = errnoErr(e1)
  1466. }
  1467. return
  1468. }
  1469. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1470. func Setuid(uid int) (err error) {
  1471. _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
  1472. if e1 != 0 {
  1473. err = errnoErr(e1)
  1474. }
  1475. return
  1476. }
  1477. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1478. func stat(path string, stat *stat_freebsd11_t) (err error) {
  1479. var _p0 *byte
  1480. _p0, err = BytePtrFromString(path)
  1481. if err != nil {
  1482. return
  1483. }
  1484. _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1485. if e1 != 0 {
  1486. err = errnoErr(e1)
  1487. }
  1488. return
  1489. }
  1490. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1491. func statfs(path string, stat *statfs_freebsd11_t) (err error) {
  1492. var _p0 *byte
  1493. _p0, err = BytePtrFromString(path)
  1494. if err != nil {
  1495. return
  1496. }
  1497. _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1498. if e1 != 0 {
  1499. err = errnoErr(e1)
  1500. }
  1501. return
  1502. }
  1503. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1504. func statfs_freebsd12(path string, stat *Statfs_t) (err error) {
  1505. var _p0 *byte
  1506. _p0, err = BytePtrFromString(path)
  1507. if err != nil {
  1508. return
  1509. }
  1510. _, _, e1 := Syscall(SYS_STATFS_FREEBSD12, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1511. if e1 != 0 {
  1512. err = errnoErr(e1)
  1513. }
  1514. return
  1515. }
  1516. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1517. func Symlink(path string, link string) (err error) {
  1518. var _p0 *byte
  1519. _p0, err = BytePtrFromString(path)
  1520. if err != nil {
  1521. return
  1522. }
  1523. var _p1 *byte
  1524. _p1, err = BytePtrFromString(link)
  1525. if err != nil {
  1526. return
  1527. }
  1528. _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1529. if e1 != 0 {
  1530. err = errnoErr(e1)
  1531. }
  1532. return
  1533. }
  1534. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1535. func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
  1536. var _p0 *byte
  1537. _p0, err = BytePtrFromString(oldpath)
  1538. if err != nil {
  1539. return
  1540. }
  1541. var _p1 *byte
  1542. _p1, err = BytePtrFromString(newpath)
  1543. if err != nil {
  1544. return
  1545. }
  1546. _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
  1547. if e1 != 0 {
  1548. err = errnoErr(e1)
  1549. }
  1550. return
  1551. }
  1552. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1553. func Sync() (err error) {
  1554. _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
  1555. if e1 != 0 {
  1556. err = errnoErr(e1)
  1557. }
  1558. return
  1559. }
  1560. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1561. func Truncate(path string, length int64) (err error) {
  1562. var _p0 *byte
  1563. _p0, err = BytePtrFromString(path)
  1564. if err != nil {
  1565. return
  1566. }
  1567. _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
  1568. if e1 != 0 {
  1569. err = errnoErr(e1)
  1570. }
  1571. return
  1572. }
  1573. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1574. func Umask(newmask int) (oldmask int) {
  1575. r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
  1576. oldmask = int(r0)
  1577. return
  1578. }
  1579. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1580. func Undelete(path string) (err error) {
  1581. var _p0 *byte
  1582. _p0, err = BytePtrFromString(path)
  1583. if err != nil {
  1584. return
  1585. }
  1586. _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1587. if e1 != 0 {
  1588. err = errnoErr(e1)
  1589. }
  1590. return
  1591. }
  1592. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1593. func Unlink(path string) (err error) {
  1594. var _p0 *byte
  1595. _p0, err = BytePtrFromString(path)
  1596. if err != nil {
  1597. return
  1598. }
  1599. _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1600. if e1 != 0 {
  1601. err = errnoErr(e1)
  1602. }
  1603. return
  1604. }
  1605. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1606. func Unlinkat(dirfd int, path string, flags int) (err error) {
  1607. var _p0 *byte
  1608. _p0, err = BytePtrFromString(path)
  1609. if err != nil {
  1610. return
  1611. }
  1612. _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
  1613. if e1 != 0 {
  1614. err = errnoErr(e1)
  1615. }
  1616. return
  1617. }
  1618. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1619. func Unmount(path string, flags int) (err error) {
  1620. var _p0 *byte
  1621. _p0, err = BytePtrFromString(path)
  1622. if err != nil {
  1623. return
  1624. }
  1625. _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  1626. if e1 != 0 {
  1627. err = errnoErr(e1)
  1628. }
  1629. return
  1630. }
  1631. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1632. func write(fd int, p []byte) (n int, err error) {
  1633. var _p0 unsafe.Pointer
  1634. if len(p) > 0 {
  1635. _p0 = unsafe.Pointer(&p[0])
  1636. } else {
  1637. _p0 = unsafe.Pointer(&_zero)
  1638. }
  1639. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1640. n = int(r0)
  1641. if e1 != 0 {
  1642. err = errnoErr(e1)
  1643. }
  1644. return
  1645. }
  1646. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1647. func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
  1648. r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0)
  1649. ret = uintptr(r0)
  1650. if e1 != 0 {
  1651. err = errnoErr(e1)
  1652. }
  1653. return
  1654. }
  1655. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1656. func munmap(addr uintptr, length uintptr) (err error) {
  1657. _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
  1658. if e1 != 0 {
  1659. err = errnoErr(e1)
  1660. }
  1661. return
  1662. }
  1663. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1664. func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
  1665. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1666. n = int(r0)
  1667. if e1 != 0 {
  1668. err = errnoErr(e1)
  1669. }
  1670. return
  1671. }
  1672. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1673. func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
  1674. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1675. n = int(r0)
  1676. if e1 != 0 {
  1677. err = errnoErr(e1)
  1678. }
  1679. return
  1680. }
  1681. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1682. func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) {
  1683. r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
  1684. nfd = int(r0)
  1685. if e1 != 0 {
  1686. err = errnoErr(e1)
  1687. }
  1688. return
  1689. }
  1690. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1691. func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
  1692. var _p0 *byte
  1693. _p0, err = BytePtrFromString(path)
  1694. if err != nil {
  1695. return
  1696. }
  1697. _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
  1698. if e1 != 0 {
  1699. err = errnoErr(e1)
  1700. }
  1701. return
  1702. }