zsyscall_dragonfly_amd64.go 39 KB

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