zsyscall_linux_ppc64le.go 63 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622
  1. // go run mksyscall.go -tags linux,ppc64le syscall_linux.go syscall_linux_ppc64x.go
  2. // Code generated by the command above; see README.md. DO NOT EDIT.
  3. // +build linux,ppc64le
  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 FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
  12. r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0)
  13. fd = 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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
  21. _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 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 fchmodat(dirfd int, path string, mode uint32) (err error) {
  29. var _p0 *byte
  30. _p0, err = BytePtrFromString(path)
  31. if err != nil {
  32. return
  33. }
  34. _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  35. if e1 != 0 {
  36. err = errnoErr(e1)
  37. }
  38. return
  39. }
  40. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  41. func ioctl(fd int, req uint, arg uintptr) (err error) {
  42. _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
  43. if e1 != 0 {
  44. err = errnoErr(e1)
  45. }
  46. return
  47. }
  48. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  49. func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
  50. var _p0 *byte
  51. _p0, err = BytePtrFromString(oldpath)
  52. if err != nil {
  53. return
  54. }
  55. var _p1 *byte
  56. _p1, err = BytePtrFromString(newpath)
  57. if err != nil {
  58. return
  59. }
  60. _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
  61. if e1 != 0 {
  62. err = errnoErr(e1)
  63. }
  64. return
  65. }
  66. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  67. func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
  68. var _p0 *byte
  69. _p0, err = BytePtrFromString(path)
  70. if err != nil {
  71. return
  72. }
  73. r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
  74. fd = int(r0)
  75. if e1 != 0 {
  76. err = errnoErr(e1)
  77. }
  78. return
  79. }
  80. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  81. func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
  82. r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
  83. n = int(r0)
  84. if e1 != 0 {
  85. err = errnoErr(e1)
  86. }
  87. return
  88. }
  89. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  90. func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
  91. var _p0 *byte
  92. _p0, err = BytePtrFromString(path)
  93. if err != nil {
  94. return
  95. }
  96. var _p1 unsafe.Pointer
  97. if len(buf) > 0 {
  98. _p1 = unsafe.Pointer(&buf[0])
  99. } else {
  100. _p1 = unsafe.Pointer(&_zero)
  101. }
  102. r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
  103. n = int(r0)
  104. if e1 != 0 {
  105. err = errnoErr(e1)
  106. }
  107. return
  108. }
  109. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  110. func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
  111. var _p0 *byte
  112. _p0, err = BytePtrFromString(oldpath)
  113. if err != nil {
  114. return
  115. }
  116. var _p1 *byte
  117. _p1, err = BytePtrFromString(newpath)
  118. if err != nil {
  119. return
  120. }
  121. _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
  122. if e1 != 0 {
  123. err = errnoErr(e1)
  124. }
  125. return
  126. }
  127. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  128. func Unlinkat(dirfd int, path string, flags int) (err error) {
  129. var _p0 *byte
  130. _p0, err = BytePtrFromString(path)
  131. if err != nil {
  132. return
  133. }
  134. _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
  135. if e1 != 0 {
  136. err = errnoErr(e1)
  137. }
  138. return
  139. }
  140. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  141. func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
  142. var _p0 *byte
  143. _p0, err = BytePtrFromString(path)
  144. if err != nil {
  145. return
  146. }
  147. _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
  148. if e1 != 0 {
  149. err = errnoErr(e1)
  150. }
  151. return
  152. }
  153. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  154. func Getcwd(buf []byte) (n int, err error) {
  155. var _p0 unsafe.Pointer
  156. if len(buf) > 0 {
  157. _p0 = unsafe.Pointer(&buf[0])
  158. } else {
  159. _p0 = unsafe.Pointer(&_zero)
  160. }
  161. r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
  162. n = int(r0)
  163. if e1 != 0 {
  164. err = errnoErr(e1)
  165. }
  166. return
  167. }
  168. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  169. func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
  170. r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
  171. wpid = int(r0)
  172. if e1 != 0 {
  173. err = errnoErr(e1)
  174. }
  175. return
  176. }
  177. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  178. func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
  179. r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
  180. ret = int(r0)
  181. if e1 != 0 {
  182. err = errnoErr(e1)
  183. }
  184. return
  185. }
  186. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  187. func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
  188. var _p0 unsafe.Pointer
  189. if len(buf) > 0 {
  190. _p0 = unsafe.Pointer(&buf[0])
  191. } else {
  192. _p0 = unsafe.Pointer(&_zero)
  193. }
  194. r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
  195. ret = int(r0)
  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 keyctlJoin(cmd int, arg2 string) (ret int, err error) {
  203. var _p0 *byte
  204. _p0, err = BytePtrFromString(arg2)
  205. if err != nil {
  206. return
  207. }
  208. r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
  209. ret = int(r0)
  210. if e1 != 0 {
  211. err = errnoErr(e1)
  212. }
  213. return
  214. }
  215. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  216. func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
  217. var _p0 *byte
  218. _p0, err = BytePtrFromString(arg3)
  219. if err != nil {
  220. return
  221. }
  222. var _p1 *byte
  223. _p1, err = BytePtrFromString(arg4)
  224. if err != nil {
  225. return
  226. }
  227. r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
  228. ret = int(r0)
  229. if e1 != 0 {
  230. err = errnoErr(e1)
  231. }
  232. return
  233. }
  234. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  235. func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
  236. var _p0 unsafe.Pointer
  237. if len(payload) > 0 {
  238. _p0 = unsafe.Pointer(&payload[0])
  239. } else {
  240. _p0 = unsafe.Pointer(&_zero)
  241. }
  242. _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
  243. if e1 != 0 {
  244. err = errnoErr(e1)
  245. }
  246. return
  247. }
  248. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  249. func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
  250. var _p0 unsafe.Pointer
  251. if len(buf) > 0 {
  252. _p0 = unsafe.Pointer(&buf[0])
  253. } else {
  254. _p0 = unsafe.Pointer(&_zero)
  255. }
  256. r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
  257. ret = int(r0)
  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 keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
  265. var _p0 *byte
  266. _p0, err = BytePtrFromString(keyType)
  267. if err != nil {
  268. return
  269. }
  270. var _p1 *byte
  271. _p1, err = BytePtrFromString(restriction)
  272. if err != nil {
  273. return
  274. }
  275. _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
  276. if e1 != 0 {
  277. err = errnoErr(e1)
  278. }
  279. return
  280. }
  281. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  282. func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
  283. _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
  284. if e1 != 0 {
  285. err = errnoErr(e1)
  286. }
  287. return
  288. }
  289. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  290. func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
  291. _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
  292. if e1 != 0 {
  293. err = errnoErr(e1)
  294. }
  295. return
  296. }
  297. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  298. func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
  299. var _p0 *byte
  300. _p0, err = BytePtrFromString(arg)
  301. if err != nil {
  302. return
  303. }
  304. _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
  305. if e1 != 0 {
  306. err = errnoErr(e1)
  307. }
  308. return
  309. }
  310. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  311. func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
  312. var _p0 *byte
  313. _p0, err = BytePtrFromString(source)
  314. if err != nil {
  315. return
  316. }
  317. var _p1 *byte
  318. _p1, err = BytePtrFromString(target)
  319. if err != nil {
  320. return
  321. }
  322. var _p2 *byte
  323. _p2, err = BytePtrFromString(fstype)
  324. if err != nil {
  325. return
  326. }
  327. _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
  328. if e1 != 0 {
  329. err = errnoErr(e1)
  330. }
  331. return
  332. }
  333. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  334. func Acct(path string) (err error) {
  335. var _p0 *byte
  336. _p0, err = BytePtrFromString(path)
  337. if err != nil {
  338. return
  339. }
  340. _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
  341. if e1 != 0 {
  342. err = errnoErr(e1)
  343. }
  344. return
  345. }
  346. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  347. func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
  348. var _p0 *byte
  349. _p0, err = BytePtrFromString(keyType)
  350. if err != nil {
  351. return
  352. }
  353. var _p1 *byte
  354. _p1, err = BytePtrFromString(description)
  355. if err != nil {
  356. return
  357. }
  358. var _p2 unsafe.Pointer
  359. if len(payload) > 0 {
  360. _p2 = unsafe.Pointer(&payload[0])
  361. } else {
  362. _p2 = unsafe.Pointer(&_zero)
  363. }
  364. r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
  365. id = int(r0)
  366. if e1 != 0 {
  367. err = errnoErr(e1)
  368. }
  369. return
  370. }
  371. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  372. func Adjtimex(buf *Timex) (state int, err error) {
  373. r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
  374. state = int(r0)
  375. if e1 != 0 {
  376. err = errnoErr(e1)
  377. }
  378. return
  379. }
  380. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  381. func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
  382. _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
  383. if e1 != 0 {
  384. err = errnoErr(e1)
  385. }
  386. return
  387. }
  388. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  389. func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
  390. _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
  391. if e1 != 0 {
  392. err = errnoErr(e1)
  393. }
  394. return
  395. }
  396. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  397. func Chdir(path string) (err error) {
  398. var _p0 *byte
  399. _p0, err = BytePtrFromString(path)
  400. if err != nil {
  401. return
  402. }
  403. _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
  404. if e1 != 0 {
  405. err = errnoErr(e1)
  406. }
  407. return
  408. }
  409. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  410. func Chroot(path string) (err error) {
  411. var _p0 *byte
  412. _p0, err = BytePtrFromString(path)
  413. if err != nil {
  414. return
  415. }
  416. _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
  417. if e1 != 0 {
  418. err = errnoErr(e1)
  419. }
  420. return
  421. }
  422. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  423. func ClockGetres(clockid int32, res *Timespec) (err error) {
  424. _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
  425. if e1 != 0 {
  426. err = errnoErr(e1)
  427. }
  428. return
  429. }
  430. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  431. func ClockGettime(clockid int32, time *Timespec) (err error) {
  432. _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
  433. if e1 != 0 {
  434. err = errnoErr(e1)
  435. }
  436. return
  437. }
  438. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  439. func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
  440. _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
  441. if e1 != 0 {
  442. err = errnoErr(e1)
  443. }
  444. return
  445. }
  446. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  447. func Close(fd int) (err error) {
  448. _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
  449. if e1 != 0 {
  450. err = errnoErr(e1)
  451. }
  452. return
  453. }
  454. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  455. func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
  456. r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
  457. n = int(r0)
  458. if e1 != 0 {
  459. err = errnoErr(e1)
  460. }
  461. return
  462. }
  463. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  464. func DeleteModule(name string, flags int) (err error) {
  465. var _p0 *byte
  466. _p0, err = BytePtrFromString(name)
  467. if err != nil {
  468. return
  469. }
  470. _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  471. if e1 != 0 {
  472. err = errnoErr(e1)
  473. }
  474. return
  475. }
  476. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  477. func Dup(oldfd int) (fd int, err error) {
  478. r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
  479. fd = int(r0)
  480. if e1 != 0 {
  481. err = errnoErr(e1)
  482. }
  483. return
  484. }
  485. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  486. func Dup3(oldfd int, newfd int, flags int) (err error) {
  487. _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
  488. if e1 != 0 {
  489. err = errnoErr(e1)
  490. }
  491. return
  492. }
  493. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  494. func EpollCreate1(flag int) (fd int, err error) {
  495. r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
  496. fd = int(r0)
  497. if e1 != 0 {
  498. err = errnoErr(e1)
  499. }
  500. return
  501. }
  502. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  503. func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
  504. _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
  505. if e1 != 0 {
  506. err = errnoErr(e1)
  507. }
  508. return
  509. }
  510. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  511. func Eventfd(initval uint, flags int) (fd int, err error) {
  512. r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0)
  513. fd = int(r0)
  514. if e1 != 0 {
  515. err = errnoErr(e1)
  516. }
  517. return
  518. }
  519. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  520. func Exit(code int) {
  521. SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
  522. return
  523. }
  524. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  525. func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
  526. _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
  527. if e1 != 0 {
  528. err = errnoErr(e1)
  529. }
  530. return
  531. }
  532. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  533. func Fchdir(fd int) (err error) {
  534. _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
  535. if e1 != 0 {
  536. err = errnoErr(e1)
  537. }
  538. return
  539. }
  540. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  541. func Fchmod(fd int, mode uint32) (err error) {
  542. _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
  543. if e1 != 0 {
  544. err = errnoErr(e1)
  545. }
  546. return
  547. }
  548. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  549. func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
  550. var _p0 *byte
  551. _p0, err = BytePtrFromString(path)
  552. if err != nil {
  553. return
  554. }
  555. _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
  556. if e1 != 0 {
  557. err = errnoErr(e1)
  558. }
  559. return
  560. }
  561. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  562. func Fdatasync(fd int) (err error) {
  563. _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
  564. if e1 != 0 {
  565. err = errnoErr(e1)
  566. }
  567. return
  568. }
  569. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  570. func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
  571. var _p0 *byte
  572. _p0, err = BytePtrFromString(attr)
  573. if err != nil {
  574. return
  575. }
  576. var _p1 unsafe.Pointer
  577. if len(dest) > 0 {
  578. _p1 = unsafe.Pointer(&dest[0])
  579. } else {
  580. _p1 = unsafe.Pointer(&_zero)
  581. }
  582. r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
  583. sz = int(r0)
  584. if e1 != 0 {
  585. err = errnoErr(e1)
  586. }
  587. return
  588. }
  589. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  590. func FinitModule(fd int, params string, flags int) (err error) {
  591. var _p0 *byte
  592. _p0, err = BytePtrFromString(params)
  593. if err != nil {
  594. return
  595. }
  596. _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
  597. if e1 != 0 {
  598. err = errnoErr(e1)
  599. }
  600. return
  601. }
  602. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  603. func Flistxattr(fd int, dest []byte) (sz int, err error) {
  604. var _p0 unsafe.Pointer
  605. if len(dest) > 0 {
  606. _p0 = unsafe.Pointer(&dest[0])
  607. } else {
  608. _p0 = unsafe.Pointer(&_zero)
  609. }
  610. r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
  611. sz = int(r0)
  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 Flock(fd int, how int) (err error) {
  619. _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
  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 Fremovexattr(fd int, attr string) (err error) {
  627. var _p0 *byte
  628. _p0, err = BytePtrFromString(attr)
  629. if err != nil {
  630. return
  631. }
  632. _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
  633. if e1 != 0 {
  634. err = errnoErr(e1)
  635. }
  636. return
  637. }
  638. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  639. func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
  640. var _p0 *byte
  641. _p0, err = BytePtrFromString(attr)
  642. if err != nil {
  643. return
  644. }
  645. var _p1 unsafe.Pointer
  646. if len(dest) > 0 {
  647. _p1 = unsafe.Pointer(&dest[0])
  648. } else {
  649. _p1 = unsafe.Pointer(&_zero)
  650. }
  651. _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
  652. if e1 != 0 {
  653. err = errnoErr(e1)
  654. }
  655. return
  656. }
  657. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  658. func Fsync(fd int) (err error) {
  659. _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
  660. if e1 != 0 {
  661. err = errnoErr(e1)
  662. }
  663. return
  664. }
  665. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  666. func Getdents(fd int, buf []byte) (n int, err error) {
  667. var _p0 unsafe.Pointer
  668. if len(buf) > 0 {
  669. _p0 = unsafe.Pointer(&buf[0])
  670. } else {
  671. _p0 = unsafe.Pointer(&_zero)
  672. }
  673. r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
  674. n = int(r0)
  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 Getpgid(pid int) (pgid int, err error) {
  682. r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
  683. pgid = int(r0)
  684. if e1 != 0 {
  685. err = errnoErr(e1)
  686. }
  687. return
  688. }
  689. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  690. func Getpid() (pid int) {
  691. r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
  692. pid = int(r0)
  693. return
  694. }
  695. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  696. func Getppid() (ppid int) {
  697. r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
  698. ppid = int(r0)
  699. return
  700. }
  701. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  702. func Getpriority(which int, who int) (prio int, err error) {
  703. r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
  704. prio = int(r0)
  705. if e1 != 0 {
  706. err = errnoErr(e1)
  707. }
  708. return
  709. }
  710. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  711. func Getrandom(buf []byte, flags int) (n int, err error) {
  712. var _p0 unsafe.Pointer
  713. if len(buf) > 0 {
  714. _p0 = unsafe.Pointer(&buf[0])
  715. } else {
  716. _p0 = unsafe.Pointer(&_zero)
  717. }
  718. r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
  719. n = int(r0)
  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 Getrusage(who int, rusage *Rusage) (err error) {
  727. _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
  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 Getsid(pid int) (sid int, err error) {
  735. r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
  736. sid = int(r0)
  737. if e1 != 0 {
  738. err = errnoErr(e1)
  739. }
  740. return
  741. }
  742. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  743. func Gettid() (tid int) {
  744. r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
  745. tid = int(r0)
  746. return
  747. }
  748. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  749. func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
  750. var _p0 *byte
  751. _p0, err = BytePtrFromString(path)
  752. if err != nil {
  753. return
  754. }
  755. var _p1 *byte
  756. _p1, err = BytePtrFromString(attr)
  757. if err != nil {
  758. return
  759. }
  760. var _p2 unsafe.Pointer
  761. if len(dest) > 0 {
  762. _p2 = unsafe.Pointer(&dest[0])
  763. } else {
  764. _p2 = unsafe.Pointer(&_zero)
  765. }
  766. r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
  767. sz = int(r0)
  768. if e1 != 0 {
  769. err = errnoErr(e1)
  770. }
  771. return
  772. }
  773. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  774. func InitModule(moduleImage []byte, params string) (err error) {
  775. var _p0 unsafe.Pointer
  776. if len(moduleImage) > 0 {
  777. _p0 = unsafe.Pointer(&moduleImage[0])
  778. } else {
  779. _p0 = unsafe.Pointer(&_zero)
  780. }
  781. var _p1 *byte
  782. _p1, err = BytePtrFromString(params)
  783. if err != nil {
  784. return
  785. }
  786. _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
  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 InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
  794. var _p0 *byte
  795. _p0, err = BytePtrFromString(pathname)
  796. if err != nil {
  797. return
  798. }
  799. r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
  800. watchdesc = int(r0)
  801. if e1 != 0 {
  802. err = errnoErr(e1)
  803. }
  804. return
  805. }
  806. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  807. func InotifyInit1(flags int) (fd int, err error) {
  808. r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
  809. fd = int(r0)
  810. if e1 != 0 {
  811. err = errnoErr(e1)
  812. }
  813. return
  814. }
  815. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  816. func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
  817. r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
  818. success = int(r0)
  819. if e1 != 0 {
  820. err = errnoErr(e1)
  821. }
  822. return
  823. }
  824. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  825. func Kill(pid int, sig syscall.Signal) (err error) {
  826. _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
  827. if e1 != 0 {
  828. err = errnoErr(e1)
  829. }
  830. return
  831. }
  832. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  833. func Klogctl(typ int, buf []byte) (n int, err error) {
  834. var _p0 unsafe.Pointer
  835. if len(buf) > 0 {
  836. _p0 = unsafe.Pointer(&buf[0])
  837. } else {
  838. _p0 = unsafe.Pointer(&_zero)
  839. }
  840. r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
  841. n = int(r0)
  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 Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
  849. var _p0 *byte
  850. _p0, err = BytePtrFromString(path)
  851. if err != nil {
  852. return
  853. }
  854. var _p1 *byte
  855. _p1, err = BytePtrFromString(attr)
  856. if err != nil {
  857. return
  858. }
  859. var _p2 unsafe.Pointer
  860. if len(dest) > 0 {
  861. _p2 = unsafe.Pointer(&dest[0])
  862. } else {
  863. _p2 = unsafe.Pointer(&_zero)
  864. }
  865. r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
  866. sz = int(r0)
  867. if e1 != 0 {
  868. err = errnoErr(e1)
  869. }
  870. return
  871. }
  872. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  873. func Listxattr(path string, dest []byte) (sz int, err error) {
  874. var _p0 *byte
  875. _p0, err = BytePtrFromString(path)
  876. if err != nil {
  877. return
  878. }
  879. var _p1 unsafe.Pointer
  880. if len(dest) > 0 {
  881. _p1 = unsafe.Pointer(&dest[0])
  882. } else {
  883. _p1 = unsafe.Pointer(&_zero)
  884. }
  885. r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
  886. sz = int(r0)
  887. if e1 != 0 {
  888. err = errnoErr(e1)
  889. }
  890. return
  891. }
  892. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  893. func Llistxattr(path string, dest []byte) (sz int, err error) {
  894. var _p0 *byte
  895. _p0, err = BytePtrFromString(path)
  896. if err != nil {
  897. return
  898. }
  899. var _p1 unsafe.Pointer
  900. if len(dest) > 0 {
  901. _p1 = unsafe.Pointer(&dest[0])
  902. } else {
  903. _p1 = unsafe.Pointer(&_zero)
  904. }
  905. r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
  906. sz = int(r0)
  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 Lremovexattr(path string, attr string) (err error) {
  914. var _p0 *byte
  915. _p0, err = BytePtrFromString(path)
  916. if err != nil {
  917. return
  918. }
  919. var _p1 *byte
  920. _p1, err = BytePtrFromString(attr)
  921. if err != nil {
  922. return
  923. }
  924. _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  925. if e1 != 0 {
  926. err = errnoErr(e1)
  927. }
  928. return
  929. }
  930. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  931. func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
  932. var _p0 *byte
  933. _p0, err = BytePtrFromString(path)
  934. if err != nil {
  935. return
  936. }
  937. var _p1 *byte
  938. _p1, err = BytePtrFromString(attr)
  939. if err != nil {
  940. return
  941. }
  942. var _p2 unsafe.Pointer
  943. if len(data) > 0 {
  944. _p2 = unsafe.Pointer(&data[0])
  945. } else {
  946. _p2 = unsafe.Pointer(&_zero)
  947. }
  948. _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
  949. if e1 != 0 {
  950. err = errnoErr(e1)
  951. }
  952. return
  953. }
  954. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  955. func MemfdCreate(name string, flags int) (fd int, err error) {
  956. var _p0 *byte
  957. _p0, err = BytePtrFromString(name)
  958. if err != nil {
  959. return
  960. }
  961. r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  962. fd = int(r0)
  963. if e1 != 0 {
  964. err = errnoErr(e1)
  965. }
  966. return
  967. }
  968. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  969. func Mkdirat(dirfd int, path string, mode uint32) (err error) {
  970. var _p0 *byte
  971. _p0, err = BytePtrFromString(path)
  972. if err != nil {
  973. return
  974. }
  975. _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  976. if e1 != 0 {
  977. err = errnoErr(e1)
  978. }
  979. return
  980. }
  981. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  982. func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
  983. var _p0 *byte
  984. _p0, err = BytePtrFromString(path)
  985. if err != nil {
  986. return
  987. }
  988. _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
  989. if e1 != 0 {
  990. err = errnoErr(e1)
  991. }
  992. return
  993. }
  994. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  995. func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
  996. _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
  997. if e1 != 0 {
  998. err = errnoErr(e1)
  999. }
  1000. return
  1001. }
  1002. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1003. func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
  1004. r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
  1005. fd = int(r0)
  1006. if e1 != 0 {
  1007. err = errnoErr(e1)
  1008. }
  1009. return
  1010. }
  1011. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1012. func PivotRoot(newroot string, putold string) (err error) {
  1013. var _p0 *byte
  1014. _p0, err = BytePtrFromString(newroot)
  1015. if err != nil {
  1016. return
  1017. }
  1018. var _p1 *byte
  1019. _p1, err = BytePtrFromString(putold)
  1020. if err != nil {
  1021. return
  1022. }
  1023. _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1024. if e1 != 0 {
  1025. err = errnoErr(e1)
  1026. }
  1027. return
  1028. }
  1029. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1030. func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
  1031. _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
  1032. if e1 != 0 {
  1033. err = errnoErr(e1)
  1034. }
  1035. return
  1036. }
  1037. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1038. func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
  1039. _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
  1040. if e1 != 0 {
  1041. err = errnoErr(e1)
  1042. }
  1043. return
  1044. }
  1045. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1046. func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
  1047. r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
  1048. n = int(r0)
  1049. if e1 != 0 {
  1050. err = errnoErr(e1)
  1051. }
  1052. return
  1053. }
  1054. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1055. func read(fd int, p []byte) (n int, err error) {
  1056. var _p0 unsafe.Pointer
  1057. if len(p) > 0 {
  1058. _p0 = unsafe.Pointer(&p[0])
  1059. } else {
  1060. _p0 = unsafe.Pointer(&_zero)
  1061. }
  1062. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1063. n = int(r0)
  1064. if e1 != 0 {
  1065. err = errnoErr(e1)
  1066. }
  1067. return
  1068. }
  1069. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1070. func Removexattr(path string, attr string) (err error) {
  1071. var _p0 *byte
  1072. _p0, err = BytePtrFromString(path)
  1073. if err != nil {
  1074. return
  1075. }
  1076. var _p1 *byte
  1077. _p1, err = BytePtrFromString(attr)
  1078. if err != nil {
  1079. return
  1080. }
  1081. _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1082. if e1 != 0 {
  1083. err = errnoErr(e1)
  1084. }
  1085. return
  1086. }
  1087. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1088. func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
  1089. var _p0 *byte
  1090. _p0, err = BytePtrFromString(oldpath)
  1091. if err != nil {
  1092. return
  1093. }
  1094. var _p1 *byte
  1095. _p1, err = BytePtrFromString(newpath)
  1096. if err != nil {
  1097. return
  1098. }
  1099. _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
  1100. if e1 != 0 {
  1101. err = errnoErr(e1)
  1102. }
  1103. return
  1104. }
  1105. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1106. func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
  1107. var _p0 *byte
  1108. _p0, err = BytePtrFromString(keyType)
  1109. if err != nil {
  1110. return
  1111. }
  1112. var _p1 *byte
  1113. _p1, err = BytePtrFromString(description)
  1114. if err != nil {
  1115. return
  1116. }
  1117. var _p2 *byte
  1118. _p2, err = BytePtrFromString(callback)
  1119. if err != nil {
  1120. return
  1121. }
  1122. r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
  1123. id = 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 Setdomainname(p []byte) (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. _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
  1138. if e1 != 0 {
  1139. err = errnoErr(e1)
  1140. }
  1141. return
  1142. }
  1143. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1144. func Sethostname(p []byte) (err error) {
  1145. var _p0 unsafe.Pointer
  1146. if len(p) > 0 {
  1147. _p0 = unsafe.Pointer(&p[0])
  1148. } else {
  1149. _p0 = unsafe.Pointer(&_zero)
  1150. }
  1151. _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
  1152. if e1 != 0 {
  1153. err = errnoErr(e1)
  1154. }
  1155. return
  1156. }
  1157. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1158. func Setpgid(pid int, pgid int) (err error) {
  1159. _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
  1160. if e1 != 0 {
  1161. err = errnoErr(e1)
  1162. }
  1163. return
  1164. }
  1165. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1166. func Setsid() (pid int, err error) {
  1167. r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
  1168. pid = int(r0)
  1169. if e1 != 0 {
  1170. err = errnoErr(e1)
  1171. }
  1172. return
  1173. }
  1174. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1175. func Settimeofday(tv *Timeval) (err error) {
  1176. _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  1177. if e1 != 0 {
  1178. err = errnoErr(e1)
  1179. }
  1180. return
  1181. }
  1182. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1183. func Setns(fd int, nstype int) (err error) {
  1184. _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
  1185. if e1 != 0 {
  1186. err = errnoErr(e1)
  1187. }
  1188. return
  1189. }
  1190. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1191. func Setpriority(which int, who int, prio int) (err error) {
  1192. _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
  1193. if e1 != 0 {
  1194. err = errnoErr(e1)
  1195. }
  1196. return
  1197. }
  1198. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1199. func Setxattr(path string, attr string, data []byte, flags int) (err error) {
  1200. var _p0 *byte
  1201. _p0, err = BytePtrFromString(path)
  1202. if err != nil {
  1203. return
  1204. }
  1205. var _p1 *byte
  1206. _p1, err = BytePtrFromString(attr)
  1207. if err != nil {
  1208. return
  1209. }
  1210. var _p2 unsafe.Pointer
  1211. if len(data) > 0 {
  1212. _p2 = unsafe.Pointer(&data[0])
  1213. } else {
  1214. _p2 = unsafe.Pointer(&_zero)
  1215. }
  1216. _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
  1217. if e1 != 0 {
  1218. err = errnoErr(e1)
  1219. }
  1220. return
  1221. }
  1222. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1223. func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
  1224. r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
  1225. newfd = int(r0)
  1226. if e1 != 0 {
  1227. err = errnoErr(e1)
  1228. }
  1229. return
  1230. }
  1231. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1232. func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
  1233. var _p0 *byte
  1234. _p0, err = BytePtrFromString(path)
  1235. if err != nil {
  1236. return
  1237. }
  1238. _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
  1239. if e1 != 0 {
  1240. err = errnoErr(e1)
  1241. }
  1242. return
  1243. }
  1244. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1245. func Sync() {
  1246. SyscallNoError(SYS_SYNC, 0, 0, 0)
  1247. return
  1248. }
  1249. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1250. func Syncfs(fd int) (err error) {
  1251. _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
  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 Sysinfo(info *Sysinfo_t) (err error) {
  1259. _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 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 Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
  1267. r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
  1268. n = int64(r0)
  1269. if e1 != 0 {
  1270. err = errnoErr(e1)
  1271. }
  1272. return
  1273. }
  1274. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1275. func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
  1276. _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
  1277. if e1 != 0 {
  1278. err = errnoErr(e1)
  1279. }
  1280. return
  1281. }
  1282. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1283. func Times(tms *Tms) (ticks uintptr, err error) {
  1284. r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
  1285. ticks = uintptr(r0)
  1286. if e1 != 0 {
  1287. err = errnoErr(e1)
  1288. }
  1289. return
  1290. }
  1291. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1292. func Umask(mask int) (oldmask int) {
  1293. r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
  1294. oldmask = int(r0)
  1295. return
  1296. }
  1297. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1298. func Uname(buf *Utsname) (err error) {
  1299. _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
  1300. if e1 != 0 {
  1301. err = errnoErr(e1)
  1302. }
  1303. return
  1304. }
  1305. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1306. func Unmount(target string, flags int) (err error) {
  1307. var _p0 *byte
  1308. _p0, err = BytePtrFromString(target)
  1309. if err != nil {
  1310. return
  1311. }
  1312. _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  1313. if e1 != 0 {
  1314. err = errnoErr(e1)
  1315. }
  1316. return
  1317. }
  1318. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1319. func Unshare(flags int) (err error) {
  1320. _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
  1321. if e1 != 0 {
  1322. err = errnoErr(e1)
  1323. }
  1324. return
  1325. }
  1326. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1327. func write(fd int, p []byte) (n int, err error) {
  1328. var _p0 unsafe.Pointer
  1329. if len(p) > 0 {
  1330. _p0 = unsafe.Pointer(&p[0])
  1331. } else {
  1332. _p0 = unsafe.Pointer(&_zero)
  1333. }
  1334. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1335. n = int(r0)
  1336. if e1 != 0 {
  1337. err = errnoErr(e1)
  1338. }
  1339. return
  1340. }
  1341. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1342. func exitThread(code int) (err error) {
  1343. _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
  1344. if e1 != 0 {
  1345. err = errnoErr(e1)
  1346. }
  1347. return
  1348. }
  1349. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1350. func readlen(fd int, p *byte, np int) (n int, err error) {
  1351. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
  1352. n = int(r0)
  1353. if e1 != 0 {
  1354. err = errnoErr(e1)
  1355. }
  1356. return
  1357. }
  1358. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1359. func writelen(fd int, p *byte, np int) (n int, err error) {
  1360. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
  1361. n = int(r0)
  1362. if e1 != 0 {
  1363. err = errnoErr(e1)
  1364. }
  1365. return
  1366. }
  1367. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1368. func readv(fd int, iovs []Iovec) (n int, err error) {
  1369. var _p0 unsafe.Pointer
  1370. if len(iovs) > 0 {
  1371. _p0 = unsafe.Pointer(&iovs[0])
  1372. } else {
  1373. _p0 = unsafe.Pointer(&_zero)
  1374. }
  1375. r0, _, e1 := Syscall(SYS_READV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
  1376. n = int(r0)
  1377. if e1 != 0 {
  1378. err = errnoErr(e1)
  1379. }
  1380. return
  1381. }
  1382. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1383. func writev(fd int, iovs []Iovec) (n int, err error) {
  1384. var _p0 unsafe.Pointer
  1385. if len(iovs) > 0 {
  1386. _p0 = unsafe.Pointer(&iovs[0])
  1387. } else {
  1388. _p0 = unsafe.Pointer(&_zero)
  1389. }
  1390. r0, _, e1 := Syscall(SYS_WRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
  1391. n = int(r0)
  1392. if e1 != 0 {
  1393. err = errnoErr(e1)
  1394. }
  1395. return
  1396. }
  1397. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1398. func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
  1399. var _p0 unsafe.Pointer
  1400. if len(iovs) > 0 {
  1401. _p0 = unsafe.Pointer(&iovs[0])
  1402. } else {
  1403. _p0 = unsafe.Pointer(&_zero)
  1404. }
  1405. r0, _, e1 := Syscall6(SYS_PREADV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
  1406. n = int(r0)
  1407. if e1 != 0 {
  1408. err = errnoErr(e1)
  1409. }
  1410. return
  1411. }
  1412. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1413. func pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
  1414. var _p0 unsafe.Pointer
  1415. if len(iovs) > 0 {
  1416. _p0 = unsafe.Pointer(&iovs[0])
  1417. } else {
  1418. _p0 = unsafe.Pointer(&_zero)
  1419. }
  1420. r0, _, e1 := Syscall6(SYS_PWRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
  1421. n = int(r0)
  1422. if e1 != 0 {
  1423. err = errnoErr(e1)
  1424. }
  1425. return
  1426. }
  1427. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1428. func preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
  1429. var _p0 unsafe.Pointer
  1430. if len(iovs) > 0 {
  1431. _p0 = unsafe.Pointer(&iovs[0])
  1432. } else {
  1433. _p0 = unsafe.Pointer(&_zero)
  1434. }
  1435. r0, _, e1 := Syscall6(SYS_PREADV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
  1436. n = int(r0)
  1437. if e1 != 0 {
  1438. err = errnoErr(e1)
  1439. }
  1440. return
  1441. }
  1442. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1443. func pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
  1444. var _p0 unsafe.Pointer
  1445. if len(iovs) > 0 {
  1446. _p0 = unsafe.Pointer(&iovs[0])
  1447. } else {
  1448. _p0 = unsafe.Pointer(&_zero)
  1449. }
  1450. r0, _, e1 := Syscall6(SYS_PWRITEV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
  1451. n = int(r0)
  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 munmap(addr uintptr, length uintptr) (err error) {
  1459. _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
  1460. if e1 != 0 {
  1461. err = errnoErr(e1)
  1462. }
  1463. return
  1464. }
  1465. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1466. func Madvise(b []byte, advice int) (err error) {
  1467. var _p0 unsafe.Pointer
  1468. if len(b) > 0 {
  1469. _p0 = unsafe.Pointer(&b[0])
  1470. } else {
  1471. _p0 = unsafe.Pointer(&_zero)
  1472. }
  1473. _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
  1474. if e1 != 0 {
  1475. err = errnoErr(e1)
  1476. }
  1477. return
  1478. }
  1479. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1480. func Mprotect(b []byte, prot int) (err error) {
  1481. var _p0 unsafe.Pointer
  1482. if len(b) > 0 {
  1483. _p0 = unsafe.Pointer(&b[0])
  1484. } else {
  1485. _p0 = unsafe.Pointer(&_zero)
  1486. }
  1487. _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
  1488. if e1 != 0 {
  1489. err = errnoErr(e1)
  1490. }
  1491. return
  1492. }
  1493. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1494. func Mlock(b []byte) (err error) {
  1495. var _p0 unsafe.Pointer
  1496. if len(b) > 0 {
  1497. _p0 = unsafe.Pointer(&b[0])
  1498. } else {
  1499. _p0 = unsafe.Pointer(&_zero)
  1500. }
  1501. _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
  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 Mlockall(flags int) (err error) {
  1509. _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 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 Msync(b []byte, flags int) (err error) {
  1517. var _p0 unsafe.Pointer
  1518. if len(b) > 0 {
  1519. _p0 = unsafe.Pointer(&b[0])
  1520. } else {
  1521. _p0 = unsafe.Pointer(&_zero)
  1522. }
  1523. _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
  1524. if e1 != 0 {
  1525. err = errnoErr(e1)
  1526. }
  1527. return
  1528. }
  1529. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1530. func Munlock(b []byte) (err error) {
  1531. var _p0 unsafe.Pointer
  1532. if len(b) > 0 {
  1533. _p0 = unsafe.Pointer(&b[0])
  1534. } else {
  1535. _p0 = unsafe.Pointer(&_zero)
  1536. }
  1537. _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
  1538. if e1 != 0 {
  1539. err = errnoErr(e1)
  1540. }
  1541. return
  1542. }
  1543. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1544. func Munlockall() (err error) {
  1545. _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
  1546. if e1 != 0 {
  1547. err = errnoErr(e1)
  1548. }
  1549. return
  1550. }
  1551. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1552. func faccessat(dirfd int, path string, mode uint32) (err error) {
  1553. var _p0 *byte
  1554. _p0, err = BytePtrFromString(path)
  1555. if err != nil {
  1556. return
  1557. }
  1558. _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  1559. if e1 != 0 {
  1560. err = errnoErr(e1)
  1561. }
  1562. return
  1563. }
  1564. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1565. func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
  1566. var _p0 *byte
  1567. _p0, err = BytePtrFromString(pathname)
  1568. if err != nil {
  1569. return
  1570. }
  1571. _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
  1572. if e1 != 0 {
  1573. err = errnoErr(e1)
  1574. }
  1575. return
  1576. }
  1577. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1578. func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
  1579. r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags))
  1580. fd = int(r0)
  1581. if e1 != 0 {
  1582. err = errnoErr(e1)
  1583. }
  1584. return
  1585. }
  1586. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1587. func Dup2(oldfd int, newfd int) (err error) {
  1588. _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
  1589. if e1 != 0 {
  1590. err = errnoErr(e1)
  1591. }
  1592. return
  1593. }
  1594. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1595. func EpollCreate(size int) (fd int, err error) {
  1596. r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
  1597. fd = int(r0)
  1598. if e1 != 0 {
  1599. err = errnoErr(e1)
  1600. }
  1601. return
  1602. }
  1603. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1604. func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
  1605. var _p0 unsafe.Pointer
  1606. if len(events) > 0 {
  1607. _p0 = unsafe.Pointer(&events[0])
  1608. } else {
  1609. _p0 = unsafe.Pointer(&_zero)
  1610. }
  1611. r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
  1612. n = int(r0)
  1613. if e1 != 0 {
  1614. err = errnoErr(e1)
  1615. }
  1616. return
  1617. }
  1618. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1619. func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
  1620. _, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
  1621. if e1 != 0 {
  1622. err = errnoErr(e1)
  1623. }
  1624. return
  1625. }
  1626. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1627. func Fchown(fd int, uid int, gid int) (err error) {
  1628. _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
  1629. if e1 != 0 {
  1630. err = errnoErr(e1)
  1631. }
  1632. return
  1633. }
  1634. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1635. func Fstat(fd int, stat *Stat_t) (err error) {
  1636. _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  1637. if e1 != 0 {
  1638. err = errnoErr(e1)
  1639. }
  1640. return
  1641. }
  1642. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1643. func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
  1644. var _p0 *byte
  1645. _p0, err = BytePtrFromString(path)
  1646. if err != nil {
  1647. return
  1648. }
  1649. _, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
  1650. if e1 != 0 {
  1651. err = errnoErr(e1)
  1652. }
  1653. return
  1654. }
  1655. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1656. func Fstatfs(fd int, buf *Statfs_t) (err error) {
  1657. _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
  1658. if e1 != 0 {
  1659. err = errnoErr(e1)
  1660. }
  1661. return
  1662. }
  1663. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1664. func Ftruncate(fd int, length int64) (err error) {
  1665. _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
  1666. if e1 != 0 {
  1667. err = errnoErr(e1)
  1668. }
  1669. return
  1670. }
  1671. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1672. func Getegid() (egid int) {
  1673. r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)
  1674. egid = int(r0)
  1675. return
  1676. }
  1677. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1678. func Geteuid() (euid int) {
  1679. r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)
  1680. euid = int(r0)
  1681. return
  1682. }
  1683. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1684. func Getgid() (gid int) {
  1685. r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)
  1686. gid = int(r0)
  1687. return
  1688. }
  1689. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1690. func Getrlimit(resource int, rlim *Rlimit) (err error) {
  1691. _, _, e1 := RawSyscall(SYS_UGETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  1692. if e1 != 0 {
  1693. err = errnoErr(e1)
  1694. }
  1695. return
  1696. }
  1697. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1698. func Getuid() (uid int) {
  1699. r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)
  1700. uid = int(r0)
  1701. return
  1702. }
  1703. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1704. func InotifyInit() (fd int, err error) {
  1705. r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
  1706. fd = int(r0)
  1707. if e1 != 0 {
  1708. err = errnoErr(e1)
  1709. }
  1710. return
  1711. }
  1712. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1713. func Ioperm(from int, num int, on int) (err error) {
  1714. _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
  1715. if e1 != 0 {
  1716. err = errnoErr(e1)
  1717. }
  1718. return
  1719. }
  1720. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1721. func Iopl(level int) (err error) {
  1722. _, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0)
  1723. if e1 != 0 {
  1724. err = errnoErr(e1)
  1725. }
  1726. return
  1727. }
  1728. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1729. func Lchown(path string, uid int, gid int) (err error) {
  1730. var _p0 *byte
  1731. _p0, err = BytePtrFromString(path)
  1732. if err != nil {
  1733. return
  1734. }
  1735. _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  1736. if e1 != 0 {
  1737. err = errnoErr(e1)
  1738. }
  1739. return
  1740. }
  1741. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1742. func Listen(s int, n int) (err error) {
  1743. _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
  1744. if e1 != 0 {
  1745. err = errnoErr(e1)
  1746. }
  1747. return
  1748. }
  1749. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1750. func Lstat(path string, stat *Stat_t) (err error) {
  1751. var _p0 *byte
  1752. _p0, err = BytePtrFromString(path)
  1753. if err != nil {
  1754. return
  1755. }
  1756. _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1757. if e1 != 0 {
  1758. err = errnoErr(e1)
  1759. }
  1760. return
  1761. }
  1762. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1763. func Pause() (err error) {
  1764. _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
  1765. if e1 != 0 {
  1766. err = errnoErr(e1)
  1767. }
  1768. return
  1769. }
  1770. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1771. func Pread(fd int, p []byte, offset int64) (n int, err error) {
  1772. var _p0 unsafe.Pointer
  1773. if len(p) > 0 {
  1774. _p0 = unsafe.Pointer(&p[0])
  1775. } else {
  1776. _p0 = unsafe.Pointer(&_zero)
  1777. }
  1778. r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  1779. n = int(r0)
  1780. if e1 != 0 {
  1781. err = errnoErr(e1)
  1782. }
  1783. return
  1784. }
  1785. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1786. func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  1787. var _p0 unsafe.Pointer
  1788. if len(p) > 0 {
  1789. _p0 = unsafe.Pointer(&p[0])
  1790. } else {
  1791. _p0 = unsafe.Pointer(&_zero)
  1792. }
  1793. r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  1794. n = int(r0)
  1795. if e1 != 0 {
  1796. err = errnoErr(e1)
  1797. }
  1798. return
  1799. }
  1800. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1801. func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
  1802. var _p0 *byte
  1803. _p0, err = BytePtrFromString(oldpath)
  1804. if err != nil {
  1805. return
  1806. }
  1807. var _p1 *byte
  1808. _p1, err = BytePtrFromString(newpath)
  1809. if err != nil {
  1810. return
  1811. }
  1812. _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
  1813. if e1 != 0 {
  1814. err = errnoErr(e1)
  1815. }
  1816. return
  1817. }
  1818. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1819. func Seek(fd int, offset int64, whence int) (off int64, err error) {
  1820. r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
  1821. off = int64(r0)
  1822. if e1 != 0 {
  1823. err = errnoErr(e1)
  1824. }
  1825. return
  1826. }
  1827. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1828. func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
  1829. r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
  1830. n = int(r0)
  1831. if e1 != 0 {
  1832. err = errnoErr(e1)
  1833. }
  1834. return
  1835. }
  1836. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1837. func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
  1838. r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
  1839. written = int(r0)
  1840. if e1 != 0 {
  1841. err = errnoErr(e1)
  1842. }
  1843. return
  1844. }
  1845. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1846. func setfsgid(gid int) (prev int, err error) {
  1847. r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
  1848. prev = int(r0)
  1849. if e1 != 0 {
  1850. err = errnoErr(e1)
  1851. }
  1852. return
  1853. }
  1854. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1855. func setfsuid(uid int) (prev int, err error) {
  1856. r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
  1857. prev = int(r0)
  1858. if e1 != 0 {
  1859. err = errnoErr(e1)
  1860. }
  1861. return
  1862. }
  1863. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1864. func Setregid(rgid int, egid int) (err error) {
  1865. _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
  1866. if e1 != 0 {
  1867. err = errnoErr(e1)
  1868. }
  1869. return
  1870. }
  1871. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1872. func Setresgid(rgid int, egid int, sgid int) (err error) {
  1873. _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
  1874. if e1 != 0 {
  1875. err = errnoErr(e1)
  1876. }
  1877. return
  1878. }
  1879. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1880. func Setresuid(ruid int, euid int, suid int) (err error) {
  1881. _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
  1882. if e1 != 0 {
  1883. err = errnoErr(e1)
  1884. }
  1885. return
  1886. }
  1887. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1888. func Setrlimit(resource int, rlim *Rlimit) (err error) {
  1889. _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  1890. if e1 != 0 {
  1891. err = errnoErr(e1)
  1892. }
  1893. return
  1894. }
  1895. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1896. func Setreuid(ruid int, euid int) (err error) {
  1897. _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
  1898. if e1 != 0 {
  1899. err = errnoErr(e1)
  1900. }
  1901. return
  1902. }
  1903. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1904. func Shutdown(fd int, how int) (err error) {
  1905. _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
  1906. if e1 != 0 {
  1907. err = errnoErr(e1)
  1908. }
  1909. return
  1910. }
  1911. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1912. func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
  1913. r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
  1914. n = int64(r0)
  1915. if e1 != 0 {
  1916. err = errnoErr(e1)
  1917. }
  1918. return
  1919. }
  1920. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1921. func Stat(path string, stat *Stat_t) (err error) {
  1922. var _p0 *byte
  1923. _p0, err = BytePtrFromString(path)
  1924. if err != nil {
  1925. return
  1926. }
  1927. _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1928. if e1 != 0 {
  1929. err = errnoErr(e1)
  1930. }
  1931. return
  1932. }
  1933. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1934. func Statfs(path string, buf *Statfs_t) (err error) {
  1935. var _p0 *byte
  1936. _p0, err = BytePtrFromString(path)
  1937. if err != nil {
  1938. return
  1939. }
  1940. _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
  1941. if e1 != 0 {
  1942. err = errnoErr(e1)
  1943. }
  1944. return
  1945. }
  1946. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1947. func Truncate(path string, length int64) (err error) {
  1948. var _p0 *byte
  1949. _p0, err = BytePtrFromString(path)
  1950. if err != nil {
  1951. return
  1952. }
  1953. _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
  1954. if e1 != 0 {
  1955. err = errnoErr(e1)
  1956. }
  1957. return
  1958. }
  1959. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1960. func Ustat(dev int, ubuf *Ustat_t) (err error) {
  1961. _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
  1962. if e1 != 0 {
  1963. err = errnoErr(e1)
  1964. }
  1965. return
  1966. }
  1967. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1968. func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
  1969. r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1970. fd = int(r0)
  1971. if e1 != 0 {
  1972. err = errnoErr(e1)
  1973. }
  1974. return
  1975. }
  1976. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1977. func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
  1978. r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
  1979. fd = int(r0)
  1980. if e1 != 0 {
  1981. err = errnoErr(e1)
  1982. }
  1983. return
  1984. }
  1985. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1986. func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  1987. _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
  1988. if e1 != 0 {
  1989. err = errnoErr(e1)
  1990. }
  1991. return
  1992. }
  1993. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1994. func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  1995. _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
  1996. if e1 != 0 {
  1997. err = errnoErr(e1)
  1998. }
  1999. return
  2000. }
  2001. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2002. func getgroups(n int, list *_Gid_t) (nn int, err error) {
  2003. r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  2004. nn = int(r0)
  2005. if e1 != 0 {
  2006. err = errnoErr(e1)
  2007. }
  2008. return
  2009. }
  2010. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2011. func setgroups(n int, list *_Gid_t) (err error) {
  2012. _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  2013. if e1 != 0 {
  2014. err = errnoErr(e1)
  2015. }
  2016. return
  2017. }
  2018. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2019. func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
  2020. _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
  2021. if e1 != 0 {
  2022. err = errnoErr(e1)
  2023. }
  2024. return
  2025. }
  2026. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2027. func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
  2028. _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
  2029. if e1 != 0 {
  2030. err = errnoErr(e1)
  2031. }
  2032. return
  2033. }
  2034. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2035. func socket(domain int, typ int, proto int) (fd int, err error) {
  2036. r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
  2037. fd = int(r0)
  2038. if e1 != 0 {
  2039. err = errnoErr(e1)
  2040. }
  2041. return
  2042. }
  2043. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2044. func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
  2045. _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
  2046. if e1 != 0 {
  2047. err = errnoErr(e1)
  2048. }
  2049. return
  2050. }
  2051. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2052. func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  2053. _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  2054. if e1 != 0 {
  2055. err = errnoErr(e1)
  2056. }
  2057. return
  2058. }
  2059. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2060. func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  2061. _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  2062. if e1 != 0 {
  2063. err = errnoErr(e1)
  2064. }
  2065. return
  2066. }
  2067. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2068. func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
  2069. var _p0 unsafe.Pointer
  2070. if len(p) > 0 {
  2071. _p0 = unsafe.Pointer(&p[0])
  2072. } else {
  2073. _p0 = unsafe.Pointer(&_zero)
  2074. }
  2075. r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
  2076. n = int(r0)
  2077. if e1 != 0 {
  2078. err = errnoErr(e1)
  2079. }
  2080. return
  2081. }
  2082. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2083. func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
  2084. var _p0 unsafe.Pointer
  2085. if len(buf) > 0 {
  2086. _p0 = unsafe.Pointer(&buf[0])
  2087. } else {
  2088. _p0 = unsafe.Pointer(&_zero)
  2089. }
  2090. _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
  2091. if e1 != 0 {
  2092. err = errnoErr(e1)
  2093. }
  2094. return
  2095. }
  2096. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2097. func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  2098. r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  2099. n = int(r0)
  2100. if e1 != 0 {
  2101. err = errnoErr(e1)
  2102. }
  2103. return
  2104. }
  2105. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2106. func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  2107. r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  2108. n = int(r0)
  2109. if e1 != 0 {
  2110. err = errnoErr(e1)
  2111. }
  2112. return
  2113. }
  2114. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2115. func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
  2116. r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
  2117. xaddr = uintptr(r0)
  2118. if e1 != 0 {
  2119. err = errnoErr(e1)
  2120. }
  2121. return
  2122. }
  2123. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2124. func futimesat(dirfd int, path string, times *[2]Timeval) (err error) {
  2125. var _p0 *byte
  2126. _p0, err = BytePtrFromString(path)
  2127. if err != nil {
  2128. return
  2129. }
  2130. _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))
  2131. if e1 != 0 {
  2132. err = errnoErr(e1)
  2133. }
  2134. return
  2135. }
  2136. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2137. func Gettimeofday(tv *Timeval) (err error) {
  2138. _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  2139. if e1 != 0 {
  2140. err = errnoErr(e1)
  2141. }
  2142. return
  2143. }
  2144. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2145. func Time(t *Time_t) (tt Time_t, err error) {
  2146. r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0)
  2147. tt = Time_t(r0)
  2148. if e1 != 0 {
  2149. err = errnoErr(e1)
  2150. }
  2151. return
  2152. }
  2153. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2154. func Utime(path string, buf *Utimbuf) (err error) {
  2155. var _p0 *byte
  2156. _p0, err = BytePtrFromString(path)
  2157. if err != nil {
  2158. return
  2159. }
  2160. _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
  2161. if e1 != 0 {
  2162. err = errnoErr(e1)
  2163. }
  2164. return
  2165. }
  2166. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2167. func utimes(path string, times *[2]Timeval) (err error) {
  2168. var _p0 *byte
  2169. _p0, err = BytePtrFromString(path)
  2170. if err != nil {
  2171. return
  2172. }
  2173. _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
  2174. if e1 != 0 {
  2175. err = errnoErr(e1)
  2176. }
  2177. return
  2178. }
  2179. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2180. func pipe(p *[2]_C_int) (err error) {
  2181. _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
  2182. if e1 != 0 {
  2183. err = errnoErr(e1)
  2184. }
  2185. return
  2186. }
  2187. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2188. func pipe2(p *[2]_C_int, flags int) (err error) {
  2189. _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
  2190. if e1 != 0 {
  2191. err = errnoErr(e1)
  2192. }
  2193. return
  2194. }
  2195. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2196. func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
  2197. r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
  2198. n = int(r0)
  2199. if e1 != 0 {
  2200. err = errnoErr(e1)
  2201. }
  2202. return
  2203. }
  2204. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2205. func syncFileRange2(fd int, flags int, off int64, n int64) (err error) {
  2206. _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off), uintptr(n), 0, 0)
  2207. if e1 != 0 {
  2208. err = errnoErr(e1)
  2209. }
  2210. return
  2211. }
  2212. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2213. func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
  2214. var _p0 *byte
  2215. _p0, err = BytePtrFromString(cmdline)
  2216. if err != nil {
  2217. return
  2218. }
  2219. _, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  2220. if e1 != 0 {
  2221. err = errnoErr(e1)
  2222. }
  2223. return
  2224. }