zsyscall_netbsd_arm64.go 43 KB

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