zsyscall_linux.go 48 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019
  1. // Code generated by mkmerge.go; DO NOT EDIT.
  2. //go:build linux
  3. // +build linux
  4. package unix
  5. import (
  6. "syscall"
  7. "unsafe"
  8. )
  9. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  10. func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
  11. r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0)
  12. fd = int(r0)
  13. if e1 != 0 {
  14. err = errnoErr(e1)
  15. }
  16. return
  17. }
  18. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  19. func fchmodat(dirfd int, path string, mode uint32) (err error) {
  20. var _p0 *byte
  21. _p0, err = BytePtrFromString(path)
  22. if err != nil {
  23. return
  24. }
  25. _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  26. if e1 != 0 {
  27. err = errnoErr(e1)
  28. }
  29. return
  30. }
  31. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  32. func ioctl(fd int, req uint, arg uintptr) (err error) {
  33. _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
  34. if e1 != 0 {
  35. err = errnoErr(e1)
  36. }
  37. return
  38. }
  39. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  40. func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
  41. _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
  42. if e1 != 0 {
  43. err = errnoErr(e1)
  44. }
  45. return
  46. }
  47. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  48. func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
  49. var _p0 *byte
  50. _p0, err = BytePtrFromString(oldpath)
  51. if err != nil {
  52. return
  53. }
  54. var _p1 *byte
  55. _p1, err = BytePtrFromString(newpath)
  56. if err != nil {
  57. return
  58. }
  59. _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
  60. if e1 != 0 {
  61. err = errnoErr(e1)
  62. }
  63. return
  64. }
  65. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  66. func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
  67. var _p0 *byte
  68. _p0, err = BytePtrFromString(path)
  69. if err != nil {
  70. return
  71. }
  72. r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
  73. fd = int(r0)
  74. if e1 != 0 {
  75. err = errnoErr(e1)
  76. }
  77. return
  78. }
  79. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  80. func openat2(dirfd int, path string, open_how *OpenHow, size int) (fd int, err error) {
  81. var _p0 *byte
  82. _p0, err = BytePtrFromString(path)
  83. if err != nil {
  84. return
  85. }
  86. r0, _, e1 := Syscall6(SYS_OPENAT2, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(open_how)), uintptr(size), 0, 0)
  87. fd = int(r0)
  88. if e1 != 0 {
  89. err = errnoErr(e1)
  90. }
  91. return
  92. }
  93. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  94. func pipe2(p *[2]_C_int, flags int) (err error) {
  95. _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
  96. if e1 != 0 {
  97. err = errnoErr(e1)
  98. }
  99. return
  100. }
  101. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  102. func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
  103. r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
  104. n = int(r0)
  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 Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
  112. var _p0 *byte
  113. _p0, err = BytePtrFromString(path)
  114. if err != nil {
  115. return
  116. }
  117. var _p1 unsafe.Pointer
  118. if len(buf) > 0 {
  119. _p1 = unsafe.Pointer(&buf[0])
  120. } else {
  121. _p1 = unsafe.Pointer(&_zero)
  122. }
  123. r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
  124. n = int(r0)
  125. if e1 != 0 {
  126. err = errnoErr(e1)
  127. }
  128. return
  129. }
  130. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  131. func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
  132. var _p0 *byte
  133. _p0, err = BytePtrFromString(oldpath)
  134. if err != nil {
  135. return
  136. }
  137. var _p1 *byte
  138. _p1, err = BytePtrFromString(newpath)
  139. if err != nil {
  140. return
  141. }
  142. _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
  143. if e1 != 0 {
  144. err = errnoErr(e1)
  145. }
  146. return
  147. }
  148. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  149. func Unlinkat(dirfd int, path string, flags int) (err error) {
  150. var _p0 *byte
  151. _p0, err = BytePtrFromString(path)
  152. if err != nil {
  153. return
  154. }
  155. _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
  156. if e1 != 0 {
  157. err = errnoErr(e1)
  158. }
  159. return
  160. }
  161. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  162. func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
  163. var _p0 *byte
  164. _p0, err = BytePtrFromString(path)
  165. if err != nil {
  166. return
  167. }
  168. _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
  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 Getcwd(buf []byte) (n int, err error) {
  176. var _p0 unsafe.Pointer
  177. if len(buf) > 0 {
  178. _p0 = unsafe.Pointer(&buf[0])
  179. } else {
  180. _p0 = unsafe.Pointer(&_zero)
  181. }
  182. r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
  183. n = int(r0)
  184. if e1 != 0 {
  185. err = errnoErr(e1)
  186. }
  187. return
  188. }
  189. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  190. func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
  191. r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
  192. wpid = int(r0)
  193. if e1 != 0 {
  194. err = errnoErr(e1)
  195. }
  196. return
  197. }
  198. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  199. func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
  200. r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
  201. ret = int(r0)
  202. if e1 != 0 {
  203. err = errnoErr(e1)
  204. }
  205. return
  206. }
  207. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  208. func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
  209. var _p0 unsafe.Pointer
  210. if len(buf) > 0 {
  211. _p0 = unsafe.Pointer(&buf[0])
  212. } else {
  213. _p0 = unsafe.Pointer(&_zero)
  214. }
  215. r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
  216. ret = int(r0)
  217. if e1 != 0 {
  218. err = errnoErr(e1)
  219. }
  220. return
  221. }
  222. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  223. func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
  224. var _p0 *byte
  225. _p0, err = BytePtrFromString(arg2)
  226. if err != nil {
  227. return
  228. }
  229. r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
  230. ret = int(r0)
  231. if e1 != 0 {
  232. err = errnoErr(e1)
  233. }
  234. return
  235. }
  236. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  237. func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
  238. var _p0 *byte
  239. _p0, err = BytePtrFromString(arg3)
  240. if err != nil {
  241. return
  242. }
  243. var _p1 *byte
  244. _p1, err = BytePtrFromString(arg4)
  245. if err != nil {
  246. return
  247. }
  248. r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
  249. ret = int(r0)
  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 keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
  257. var _p0 unsafe.Pointer
  258. if len(payload) > 0 {
  259. _p0 = unsafe.Pointer(&payload[0])
  260. } else {
  261. _p0 = unsafe.Pointer(&_zero)
  262. }
  263. _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
  264. if e1 != 0 {
  265. err = errnoErr(e1)
  266. }
  267. return
  268. }
  269. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  270. func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
  271. var _p0 unsafe.Pointer
  272. if len(buf) > 0 {
  273. _p0 = unsafe.Pointer(&buf[0])
  274. } else {
  275. _p0 = unsafe.Pointer(&_zero)
  276. }
  277. r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
  278. ret = int(r0)
  279. if e1 != 0 {
  280. err = errnoErr(e1)
  281. }
  282. return
  283. }
  284. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  285. func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
  286. var _p0 *byte
  287. _p0, err = BytePtrFromString(keyType)
  288. if err != nil {
  289. return
  290. }
  291. var _p1 *byte
  292. _p1, err = BytePtrFromString(restriction)
  293. if err != nil {
  294. return
  295. }
  296. _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
  297. if e1 != 0 {
  298. err = errnoErr(e1)
  299. }
  300. return
  301. }
  302. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  303. func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
  304. _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 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 ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
  312. _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
  313. if e1 != 0 {
  314. err = errnoErr(e1)
  315. }
  316. return
  317. }
  318. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  319. func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
  320. var _p0 *byte
  321. _p0, err = BytePtrFromString(arg)
  322. if err != nil {
  323. return
  324. }
  325. _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
  326. if e1 != 0 {
  327. err = errnoErr(e1)
  328. }
  329. return
  330. }
  331. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  332. func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
  333. var _p0 *byte
  334. _p0, err = BytePtrFromString(source)
  335. if err != nil {
  336. return
  337. }
  338. var _p1 *byte
  339. _p1, err = BytePtrFromString(target)
  340. if err != nil {
  341. return
  342. }
  343. var _p2 *byte
  344. _p2, err = BytePtrFromString(fstype)
  345. if err != nil {
  346. return
  347. }
  348. _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
  349. if e1 != 0 {
  350. err = errnoErr(e1)
  351. }
  352. return
  353. }
  354. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  355. func Acct(path string) (err error) {
  356. var _p0 *byte
  357. _p0, err = BytePtrFromString(path)
  358. if err != nil {
  359. return
  360. }
  361. _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
  362. if e1 != 0 {
  363. err = errnoErr(e1)
  364. }
  365. return
  366. }
  367. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  368. func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
  369. var _p0 *byte
  370. _p0, err = BytePtrFromString(keyType)
  371. if err != nil {
  372. return
  373. }
  374. var _p1 *byte
  375. _p1, err = BytePtrFromString(description)
  376. if err != nil {
  377. return
  378. }
  379. var _p2 unsafe.Pointer
  380. if len(payload) > 0 {
  381. _p2 = unsafe.Pointer(&payload[0])
  382. } else {
  383. _p2 = unsafe.Pointer(&_zero)
  384. }
  385. r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
  386. id = int(r0)
  387. if e1 != 0 {
  388. err = errnoErr(e1)
  389. }
  390. return
  391. }
  392. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  393. func Adjtimex(buf *Timex) (state int, err error) {
  394. r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
  395. state = int(r0)
  396. if e1 != 0 {
  397. err = errnoErr(e1)
  398. }
  399. return
  400. }
  401. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  402. func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
  403. _, _, e1 := RawSyscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 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 Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
  411. _, _, e1 := RawSyscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
  412. if e1 != 0 {
  413. err = errnoErr(e1)
  414. }
  415. return
  416. }
  417. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  418. func Chdir(path string) (err error) {
  419. var _p0 *byte
  420. _p0, err = BytePtrFromString(path)
  421. if err != nil {
  422. return
  423. }
  424. _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 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 Chroot(path string) (err error) {
  432. var _p0 *byte
  433. _p0, err = BytePtrFromString(path)
  434. if err != nil {
  435. return
  436. }
  437. _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
  438. if e1 != 0 {
  439. err = errnoErr(e1)
  440. }
  441. return
  442. }
  443. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  444. func ClockGetres(clockid int32, res *Timespec) (err error) {
  445. _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
  446. if e1 != 0 {
  447. err = errnoErr(e1)
  448. }
  449. return
  450. }
  451. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  452. func ClockGettime(clockid int32, time *Timespec) (err error) {
  453. _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
  454. if e1 != 0 {
  455. err = errnoErr(e1)
  456. }
  457. return
  458. }
  459. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  460. func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
  461. _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
  462. if e1 != 0 {
  463. err = errnoErr(e1)
  464. }
  465. return
  466. }
  467. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  468. func Close(fd int) (err error) {
  469. _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
  470. if e1 != 0 {
  471. err = errnoErr(e1)
  472. }
  473. return
  474. }
  475. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  476. func CloseRange(first uint, last uint, flags uint) (err error) {
  477. _, _, e1 := Syscall(SYS_CLOSE_RANGE, uintptr(first), uintptr(last), uintptr(flags))
  478. if e1 != 0 {
  479. err = errnoErr(e1)
  480. }
  481. return
  482. }
  483. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  484. func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
  485. r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
  486. n = int(r0)
  487. if e1 != 0 {
  488. err = errnoErr(e1)
  489. }
  490. return
  491. }
  492. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  493. func DeleteModule(name string, flags int) (err error) {
  494. var _p0 *byte
  495. _p0, err = BytePtrFromString(name)
  496. if err != nil {
  497. return
  498. }
  499. _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 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 Dup(oldfd int) (fd int, err error) {
  507. r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
  508. fd = int(r0)
  509. if e1 != 0 {
  510. err = errnoErr(e1)
  511. }
  512. return
  513. }
  514. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  515. func Dup3(oldfd int, newfd int, flags int) (err error) {
  516. _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
  517. if e1 != 0 {
  518. err = errnoErr(e1)
  519. }
  520. return
  521. }
  522. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  523. func EpollCreate1(flag int) (fd int, err error) {
  524. r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
  525. fd = int(r0)
  526. if e1 != 0 {
  527. err = errnoErr(e1)
  528. }
  529. return
  530. }
  531. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  532. func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
  533. _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
  534. if e1 != 0 {
  535. err = errnoErr(e1)
  536. }
  537. return
  538. }
  539. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  540. func Eventfd(initval uint, flags int) (fd int, err error) {
  541. r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0)
  542. fd = int(r0)
  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 Exit(code int) {
  550. SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
  551. return
  552. }
  553. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  554. func Fchdir(fd int) (err error) {
  555. _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 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 Fchmod(fd int, mode uint32) (err error) {
  563. _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 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 Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
  571. var _p0 *byte
  572. _p0, err = BytePtrFromString(path)
  573. if err != nil {
  574. return
  575. }
  576. _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
  577. if e1 != 0 {
  578. err = errnoErr(e1)
  579. }
  580. return
  581. }
  582. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  583. func Fdatasync(fd int) (err error) {
  584. _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
  585. if e1 != 0 {
  586. err = errnoErr(e1)
  587. }
  588. return
  589. }
  590. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  591. func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
  592. var _p0 *byte
  593. _p0, err = BytePtrFromString(attr)
  594. if err != nil {
  595. return
  596. }
  597. var _p1 unsafe.Pointer
  598. if len(dest) > 0 {
  599. _p1 = unsafe.Pointer(&dest[0])
  600. } else {
  601. _p1 = unsafe.Pointer(&_zero)
  602. }
  603. r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
  604. sz = int(r0)
  605. if e1 != 0 {
  606. err = errnoErr(e1)
  607. }
  608. return
  609. }
  610. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  611. func FinitModule(fd int, params string, flags int) (err error) {
  612. var _p0 *byte
  613. _p0, err = BytePtrFromString(params)
  614. if err != nil {
  615. return
  616. }
  617. _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
  618. if e1 != 0 {
  619. err = errnoErr(e1)
  620. }
  621. return
  622. }
  623. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  624. func Flistxattr(fd int, dest []byte) (sz int, err error) {
  625. var _p0 unsafe.Pointer
  626. if len(dest) > 0 {
  627. _p0 = unsafe.Pointer(&dest[0])
  628. } else {
  629. _p0 = unsafe.Pointer(&_zero)
  630. }
  631. r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
  632. sz = int(r0)
  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 Flock(fd int, how int) (err error) {
  640. _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
  641. if e1 != 0 {
  642. err = errnoErr(e1)
  643. }
  644. return
  645. }
  646. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  647. func Fremovexattr(fd int, attr string) (err error) {
  648. var _p0 *byte
  649. _p0, err = BytePtrFromString(attr)
  650. if err != nil {
  651. return
  652. }
  653. _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
  654. if e1 != 0 {
  655. err = errnoErr(e1)
  656. }
  657. return
  658. }
  659. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  660. func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
  661. var _p0 *byte
  662. _p0, err = BytePtrFromString(attr)
  663. if err != nil {
  664. return
  665. }
  666. var _p1 unsafe.Pointer
  667. if len(dest) > 0 {
  668. _p1 = unsafe.Pointer(&dest[0])
  669. } else {
  670. _p1 = unsafe.Pointer(&_zero)
  671. }
  672. _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
  673. if e1 != 0 {
  674. err = errnoErr(e1)
  675. }
  676. return
  677. }
  678. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  679. func Fsync(fd int) (err error) {
  680. _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
  681. if e1 != 0 {
  682. err = errnoErr(e1)
  683. }
  684. return
  685. }
  686. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  687. func Getdents(fd int, buf []byte) (n int, err error) {
  688. var _p0 unsafe.Pointer
  689. if len(buf) > 0 {
  690. _p0 = unsafe.Pointer(&buf[0])
  691. } else {
  692. _p0 = unsafe.Pointer(&_zero)
  693. }
  694. r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
  695. n = int(r0)
  696. if e1 != 0 {
  697. err = errnoErr(e1)
  698. }
  699. return
  700. }
  701. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  702. func Getpgid(pid int) (pgid int, err error) {
  703. r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
  704. pgid = 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 Getpid() (pid int) {
  712. r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
  713. pid = int(r0)
  714. return
  715. }
  716. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  717. func Getppid() (ppid int) {
  718. r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
  719. ppid = int(r0)
  720. return
  721. }
  722. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  723. func Getpriority(which int, who int) (prio int, err error) {
  724. r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
  725. prio = int(r0)
  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 Getrandom(buf []byte, flags int) (n int, err error) {
  733. var _p0 unsafe.Pointer
  734. if len(buf) > 0 {
  735. _p0 = unsafe.Pointer(&buf[0])
  736. } else {
  737. _p0 = unsafe.Pointer(&_zero)
  738. }
  739. r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
  740. n = int(r0)
  741. if e1 != 0 {
  742. err = errnoErr(e1)
  743. }
  744. return
  745. }
  746. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  747. func Getrusage(who int, rusage *Rusage) (err error) {
  748. _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
  749. if e1 != 0 {
  750. err = errnoErr(e1)
  751. }
  752. return
  753. }
  754. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  755. func Getsid(pid int) (sid int, err error) {
  756. r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
  757. sid = int(r0)
  758. if e1 != 0 {
  759. err = errnoErr(e1)
  760. }
  761. return
  762. }
  763. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  764. func Gettid() (tid int) {
  765. r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
  766. tid = int(r0)
  767. return
  768. }
  769. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  770. func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
  771. var _p0 *byte
  772. _p0, err = BytePtrFromString(path)
  773. if err != nil {
  774. return
  775. }
  776. var _p1 *byte
  777. _p1, err = BytePtrFromString(attr)
  778. if err != nil {
  779. return
  780. }
  781. var _p2 unsafe.Pointer
  782. if len(dest) > 0 {
  783. _p2 = unsafe.Pointer(&dest[0])
  784. } else {
  785. _p2 = unsafe.Pointer(&_zero)
  786. }
  787. r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
  788. sz = int(r0)
  789. if e1 != 0 {
  790. err = errnoErr(e1)
  791. }
  792. return
  793. }
  794. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  795. func InitModule(moduleImage []byte, params string) (err error) {
  796. var _p0 unsafe.Pointer
  797. if len(moduleImage) > 0 {
  798. _p0 = unsafe.Pointer(&moduleImage[0])
  799. } else {
  800. _p0 = unsafe.Pointer(&_zero)
  801. }
  802. var _p1 *byte
  803. _p1, err = BytePtrFromString(params)
  804. if err != nil {
  805. return
  806. }
  807. _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
  808. if e1 != 0 {
  809. err = errnoErr(e1)
  810. }
  811. return
  812. }
  813. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  814. func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
  815. var _p0 *byte
  816. _p0, err = BytePtrFromString(pathname)
  817. if err != nil {
  818. return
  819. }
  820. r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
  821. watchdesc = int(r0)
  822. if e1 != 0 {
  823. err = errnoErr(e1)
  824. }
  825. return
  826. }
  827. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  828. func InotifyInit1(flags int) (fd int, err error) {
  829. r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
  830. fd = int(r0)
  831. if e1 != 0 {
  832. err = errnoErr(e1)
  833. }
  834. return
  835. }
  836. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  837. func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
  838. r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
  839. success = int(r0)
  840. if e1 != 0 {
  841. err = errnoErr(e1)
  842. }
  843. return
  844. }
  845. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  846. func Kill(pid int, sig syscall.Signal) (err error) {
  847. _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
  848. if e1 != 0 {
  849. err = errnoErr(e1)
  850. }
  851. return
  852. }
  853. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  854. func Klogctl(typ int, buf []byte) (n int, err error) {
  855. var _p0 unsafe.Pointer
  856. if len(buf) > 0 {
  857. _p0 = unsafe.Pointer(&buf[0])
  858. } else {
  859. _p0 = unsafe.Pointer(&_zero)
  860. }
  861. r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
  862. n = int(r0)
  863. if e1 != 0 {
  864. err = errnoErr(e1)
  865. }
  866. return
  867. }
  868. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  869. func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
  870. var _p0 *byte
  871. _p0, err = BytePtrFromString(path)
  872. if err != nil {
  873. return
  874. }
  875. var _p1 *byte
  876. _p1, err = BytePtrFromString(attr)
  877. if err != nil {
  878. return
  879. }
  880. var _p2 unsafe.Pointer
  881. if len(dest) > 0 {
  882. _p2 = unsafe.Pointer(&dest[0])
  883. } else {
  884. _p2 = unsafe.Pointer(&_zero)
  885. }
  886. r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
  887. sz = int(r0)
  888. if e1 != 0 {
  889. err = errnoErr(e1)
  890. }
  891. return
  892. }
  893. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  894. func Listxattr(path string, dest []byte) (sz int, err error) {
  895. var _p0 *byte
  896. _p0, err = BytePtrFromString(path)
  897. if err != nil {
  898. return
  899. }
  900. var _p1 unsafe.Pointer
  901. if len(dest) > 0 {
  902. _p1 = unsafe.Pointer(&dest[0])
  903. } else {
  904. _p1 = unsafe.Pointer(&_zero)
  905. }
  906. r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
  907. sz = int(r0)
  908. if e1 != 0 {
  909. err = errnoErr(e1)
  910. }
  911. return
  912. }
  913. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  914. func Llistxattr(path string, dest []byte) (sz int, err error) {
  915. var _p0 *byte
  916. _p0, err = BytePtrFromString(path)
  917. if err != nil {
  918. return
  919. }
  920. var _p1 unsafe.Pointer
  921. if len(dest) > 0 {
  922. _p1 = unsafe.Pointer(&dest[0])
  923. } else {
  924. _p1 = unsafe.Pointer(&_zero)
  925. }
  926. r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
  927. sz = int(r0)
  928. if e1 != 0 {
  929. err = errnoErr(e1)
  930. }
  931. return
  932. }
  933. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  934. func Lremovexattr(path string, attr string) (err error) {
  935. var _p0 *byte
  936. _p0, err = BytePtrFromString(path)
  937. if err != nil {
  938. return
  939. }
  940. var _p1 *byte
  941. _p1, err = BytePtrFromString(attr)
  942. if err != nil {
  943. return
  944. }
  945. _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  946. if e1 != 0 {
  947. err = errnoErr(e1)
  948. }
  949. return
  950. }
  951. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  952. func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
  953. var _p0 *byte
  954. _p0, err = BytePtrFromString(path)
  955. if err != nil {
  956. return
  957. }
  958. var _p1 *byte
  959. _p1, err = BytePtrFromString(attr)
  960. if err != nil {
  961. return
  962. }
  963. var _p2 unsafe.Pointer
  964. if len(data) > 0 {
  965. _p2 = unsafe.Pointer(&data[0])
  966. } else {
  967. _p2 = unsafe.Pointer(&_zero)
  968. }
  969. _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
  970. if e1 != 0 {
  971. err = errnoErr(e1)
  972. }
  973. return
  974. }
  975. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  976. func MemfdCreate(name string, flags int) (fd int, err error) {
  977. var _p0 *byte
  978. _p0, err = BytePtrFromString(name)
  979. if err != nil {
  980. return
  981. }
  982. r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  983. fd = int(r0)
  984. if e1 != 0 {
  985. err = errnoErr(e1)
  986. }
  987. return
  988. }
  989. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  990. func Mkdirat(dirfd int, path string, mode uint32) (err error) {
  991. var _p0 *byte
  992. _p0, err = BytePtrFromString(path)
  993. if err != nil {
  994. return
  995. }
  996. _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  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 Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
  1004. var _p0 *byte
  1005. _p0, err = BytePtrFromString(path)
  1006. if err != nil {
  1007. return
  1008. }
  1009. _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 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 Nanosleep(time *Timespec, leftover *Timespec) (err error) {
  1017. _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
  1018. if e1 != 0 {
  1019. err = errnoErr(e1)
  1020. }
  1021. return
  1022. }
  1023. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1024. func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
  1025. r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
  1026. fd = int(r0)
  1027. if e1 != 0 {
  1028. err = errnoErr(e1)
  1029. }
  1030. return
  1031. }
  1032. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1033. func PivotRoot(newroot string, putold string) (err error) {
  1034. var _p0 *byte
  1035. _p0, err = BytePtrFromString(newroot)
  1036. if err != nil {
  1037. return
  1038. }
  1039. var _p1 *byte
  1040. _p1, err = BytePtrFromString(putold)
  1041. if err != nil {
  1042. return
  1043. }
  1044. _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1045. if e1 != 0 {
  1046. err = errnoErr(e1)
  1047. }
  1048. return
  1049. }
  1050. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1051. func Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
  1052. _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
  1053. if e1 != 0 {
  1054. err = errnoErr(e1)
  1055. }
  1056. return
  1057. }
  1058. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1059. func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
  1060. _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
  1061. if e1 != 0 {
  1062. err = errnoErr(e1)
  1063. }
  1064. return
  1065. }
  1066. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1067. func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
  1068. 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)))
  1069. n = int(r0)
  1070. if e1 != 0 {
  1071. err = errnoErr(e1)
  1072. }
  1073. return
  1074. }
  1075. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1076. func read(fd int, p []byte) (n int, err error) {
  1077. var _p0 unsafe.Pointer
  1078. if len(p) > 0 {
  1079. _p0 = unsafe.Pointer(&p[0])
  1080. } else {
  1081. _p0 = unsafe.Pointer(&_zero)
  1082. }
  1083. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1084. n = int(r0)
  1085. if e1 != 0 {
  1086. err = errnoErr(e1)
  1087. }
  1088. return
  1089. }
  1090. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1091. func Removexattr(path string, attr string) (err error) {
  1092. var _p0 *byte
  1093. _p0, err = BytePtrFromString(path)
  1094. if err != nil {
  1095. return
  1096. }
  1097. var _p1 *byte
  1098. _p1, err = BytePtrFromString(attr)
  1099. if err != nil {
  1100. return
  1101. }
  1102. _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1103. if e1 != 0 {
  1104. err = errnoErr(e1)
  1105. }
  1106. return
  1107. }
  1108. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1109. func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
  1110. var _p0 *byte
  1111. _p0, err = BytePtrFromString(oldpath)
  1112. if err != nil {
  1113. return
  1114. }
  1115. var _p1 *byte
  1116. _p1, err = BytePtrFromString(newpath)
  1117. if err != nil {
  1118. return
  1119. }
  1120. _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
  1121. if e1 != 0 {
  1122. err = errnoErr(e1)
  1123. }
  1124. return
  1125. }
  1126. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1127. func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
  1128. var _p0 *byte
  1129. _p0, err = BytePtrFromString(keyType)
  1130. if err != nil {
  1131. return
  1132. }
  1133. var _p1 *byte
  1134. _p1, err = BytePtrFromString(description)
  1135. if err != nil {
  1136. return
  1137. }
  1138. var _p2 *byte
  1139. _p2, err = BytePtrFromString(callback)
  1140. if err != nil {
  1141. return
  1142. }
  1143. r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
  1144. id = int(r0)
  1145. if e1 != 0 {
  1146. err = errnoErr(e1)
  1147. }
  1148. return
  1149. }
  1150. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1151. func Setdomainname(p []byte) (err error) {
  1152. var _p0 unsafe.Pointer
  1153. if len(p) > 0 {
  1154. _p0 = unsafe.Pointer(&p[0])
  1155. } else {
  1156. _p0 = unsafe.Pointer(&_zero)
  1157. }
  1158. _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
  1159. if e1 != 0 {
  1160. err = errnoErr(e1)
  1161. }
  1162. return
  1163. }
  1164. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1165. func Sethostname(p []byte) (err error) {
  1166. var _p0 unsafe.Pointer
  1167. if len(p) > 0 {
  1168. _p0 = unsafe.Pointer(&p[0])
  1169. } else {
  1170. _p0 = unsafe.Pointer(&_zero)
  1171. }
  1172. _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
  1173. if e1 != 0 {
  1174. err = errnoErr(e1)
  1175. }
  1176. return
  1177. }
  1178. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1179. func Setpgid(pid int, pgid int) (err error) {
  1180. _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
  1181. if e1 != 0 {
  1182. err = errnoErr(e1)
  1183. }
  1184. return
  1185. }
  1186. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1187. func Setsid() (pid int, err error) {
  1188. r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
  1189. pid = int(r0)
  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 Settimeofday(tv *Timeval) (err error) {
  1197. _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  1198. if e1 != 0 {
  1199. err = errnoErr(e1)
  1200. }
  1201. return
  1202. }
  1203. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1204. func Setns(fd int, nstype int) (err error) {
  1205. _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
  1206. if e1 != 0 {
  1207. err = errnoErr(e1)
  1208. }
  1209. return
  1210. }
  1211. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1212. func Setpriority(which int, who int, prio int) (err error) {
  1213. _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
  1214. if e1 != 0 {
  1215. err = errnoErr(e1)
  1216. }
  1217. return
  1218. }
  1219. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1220. func Setxattr(path string, attr string, data []byte, flags int) (err error) {
  1221. var _p0 *byte
  1222. _p0, err = BytePtrFromString(path)
  1223. if err != nil {
  1224. return
  1225. }
  1226. var _p1 *byte
  1227. _p1, err = BytePtrFromString(attr)
  1228. if err != nil {
  1229. return
  1230. }
  1231. var _p2 unsafe.Pointer
  1232. if len(data) > 0 {
  1233. _p2 = unsafe.Pointer(&data[0])
  1234. } else {
  1235. _p2 = unsafe.Pointer(&_zero)
  1236. }
  1237. _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
  1238. if e1 != 0 {
  1239. err = errnoErr(e1)
  1240. }
  1241. return
  1242. }
  1243. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1244. func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
  1245. r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
  1246. newfd = int(r0)
  1247. if e1 != 0 {
  1248. err = errnoErr(e1)
  1249. }
  1250. return
  1251. }
  1252. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1253. func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
  1254. var _p0 *byte
  1255. _p0, err = BytePtrFromString(path)
  1256. if err != nil {
  1257. return
  1258. }
  1259. _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 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 Sync() {
  1267. SyscallNoError(SYS_SYNC, 0, 0, 0)
  1268. return
  1269. }
  1270. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1271. func Syncfs(fd int) (err error) {
  1272. _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
  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 Sysinfo(info *Sysinfo_t) (err error) {
  1280. _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
  1281. if e1 != 0 {
  1282. err = errnoErr(e1)
  1283. }
  1284. return
  1285. }
  1286. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1287. func TimerfdCreate(clockid int, flags int) (fd int, err error) {
  1288. r0, _, e1 := RawSyscall(SYS_TIMERFD_CREATE, uintptr(clockid), uintptr(flags), 0)
  1289. fd = int(r0)
  1290. if e1 != 0 {
  1291. err = errnoErr(e1)
  1292. }
  1293. return
  1294. }
  1295. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1296. func TimerfdGettime(fd int, currValue *ItimerSpec) (err error) {
  1297. _, _, e1 := RawSyscall(SYS_TIMERFD_GETTIME, uintptr(fd), uintptr(unsafe.Pointer(currValue)), 0)
  1298. if e1 != 0 {
  1299. err = errnoErr(e1)
  1300. }
  1301. return
  1302. }
  1303. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1304. func TimerfdSettime(fd int, flags int, newValue *ItimerSpec, oldValue *ItimerSpec) (err error) {
  1305. _, _, e1 := RawSyscall6(SYS_TIMERFD_SETTIME, uintptr(fd), uintptr(flags), uintptr(unsafe.Pointer(newValue)), uintptr(unsafe.Pointer(oldValue)), 0, 0)
  1306. if e1 != 0 {
  1307. err = errnoErr(e1)
  1308. }
  1309. return
  1310. }
  1311. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1312. func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
  1313. _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
  1314. if e1 != 0 {
  1315. err = errnoErr(e1)
  1316. }
  1317. return
  1318. }
  1319. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1320. func Times(tms *Tms) (ticks uintptr, err error) {
  1321. r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
  1322. ticks = uintptr(r0)
  1323. if e1 != 0 {
  1324. err = errnoErr(e1)
  1325. }
  1326. return
  1327. }
  1328. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1329. func Umask(mask int) (oldmask int) {
  1330. r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
  1331. oldmask = int(r0)
  1332. return
  1333. }
  1334. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1335. func Uname(buf *Utsname) (err error) {
  1336. _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
  1337. if e1 != 0 {
  1338. err = errnoErr(e1)
  1339. }
  1340. return
  1341. }
  1342. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1343. func Unmount(target string, flags int) (err error) {
  1344. var _p0 *byte
  1345. _p0, err = BytePtrFromString(target)
  1346. if err != nil {
  1347. return
  1348. }
  1349. _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  1350. if e1 != 0 {
  1351. err = errnoErr(e1)
  1352. }
  1353. return
  1354. }
  1355. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1356. func Unshare(flags int) (err error) {
  1357. _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
  1358. if e1 != 0 {
  1359. err = errnoErr(e1)
  1360. }
  1361. return
  1362. }
  1363. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1364. func write(fd int, p []byte) (n int, err error) {
  1365. var _p0 unsafe.Pointer
  1366. if len(p) > 0 {
  1367. _p0 = unsafe.Pointer(&p[0])
  1368. } else {
  1369. _p0 = unsafe.Pointer(&_zero)
  1370. }
  1371. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1372. n = int(r0)
  1373. if e1 != 0 {
  1374. err = errnoErr(e1)
  1375. }
  1376. return
  1377. }
  1378. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1379. func exitThread(code int) (err error) {
  1380. _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
  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 readlen(fd int, p *byte, np int) (n int, err error) {
  1388. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
  1389. n = 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 writelen(fd int, p *byte, np int) (n int, err error) {
  1397. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
  1398. n = int(r0)
  1399. if e1 != 0 {
  1400. err = errnoErr(e1)
  1401. }
  1402. return
  1403. }
  1404. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1405. func readv(fd int, iovs []Iovec) (n int, err error) {
  1406. var _p0 unsafe.Pointer
  1407. if len(iovs) > 0 {
  1408. _p0 = unsafe.Pointer(&iovs[0])
  1409. } else {
  1410. _p0 = unsafe.Pointer(&_zero)
  1411. }
  1412. r0, _, e1 := Syscall(SYS_READV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
  1413. n = int(r0)
  1414. if e1 != 0 {
  1415. err = errnoErr(e1)
  1416. }
  1417. return
  1418. }
  1419. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1420. func writev(fd int, iovs []Iovec) (n int, err error) {
  1421. var _p0 unsafe.Pointer
  1422. if len(iovs) > 0 {
  1423. _p0 = unsafe.Pointer(&iovs[0])
  1424. } else {
  1425. _p0 = unsafe.Pointer(&_zero)
  1426. }
  1427. r0, _, e1 := Syscall(SYS_WRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
  1428. n = int(r0)
  1429. if e1 != 0 {
  1430. err = errnoErr(e1)
  1431. }
  1432. return
  1433. }
  1434. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1435. func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
  1436. var _p0 unsafe.Pointer
  1437. if len(iovs) > 0 {
  1438. _p0 = unsafe.Pointer(&iovs[0])
  1439. } else {
  1440. _p0 = unsafe.Pointer(&_zero)
  1441. }
  1442. r0, _, e1 := Syscall6(SYS_PREADV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
  1443. n = int(r0)
  1444. if e1 != 0 {
  1445. err = errnoErr(e1)
  1446. }
  1447. return
  1448. }
  1449. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1450. func pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
  1451. var _p0 unsafe.Pointer
  1452. if len(iovs) > 0 {
  1453. _p0 = unsafe.Pointer(&iovs[0])
  1454. } else {
  1455. _p0 = unsafe.Pointer(&_zero)
  1456. }
  1457. r0, _, e1 := Syscall6(SYS_PWRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
  1458. n = int(r0)
  1459. if e1 != 0 {
  1460. err = errnoErr(e1)
  1461. }
  1462. return
  1463. }
  1464. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1465. func preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
  1466. var _p0 unsafe.Pointer
  1467. if len(iovs) > 0 {
  1468. _p0 = unsafe.Pointer(&iovs[0])
  1469. } else {
  1470. _p0 = unsafe.Pointer(&_zero)
  1471. }
  1472. r0, _, e1 := Syscall6(SYS_PREADV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
  1473. n = int(r0)
  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 pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
  1481. var _p0 unsafe.Pointer
  1482. if len(iovs) > 0 {
  1483. _p0 = unsafe.Pointer(&iovs[0])
  1484. } else {
  1485. _p0 = unsafe.Pointer(&_zero)
  1486. }
  1487. r0, _, e1 := Syscall6(SYS_PWRITEV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
  1488. n = int(r0)
  1489. if e1 != 0 {
  1490. err = errnoErr(e1)
  1491. }
  1492. return
  1493. }
  1494. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1495. func munmap(addr uintptr, length uintptr) (err error) {
  1496. _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
  1497. if e1 != 0 {
  1498. err = errnoErr(e1)
  1499. }
  1500. return
  1501. }
  1502. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1503. func Madvise(b []byte, advice int) (err error) {
  1504. var _p0 unsafe.Pointer
  1505. if len(b) > 0 {
  1506. _p0 = unsafe.Pointer(&b[0])
  1507. } else {
  1508. _p0 = unsafe.Pointer(&_zero)
  1509. }
  1510. _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
  1511. if e1 != 0 {
  1512. err = errnoErr(e1)
  1513. }
  1514. return
  1515. }
  1516. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1517. func Mprotect(b []byte, prot int) (err error) {
  1518. var _p0 unsafe.Pointer
  1519. if len(b) > 0 {
  1520. _p0 = unsafe.Pointer(&b[0])
  1521. } else {
  1522. _p0 = unsafe.Pointer(&_zero)
  1523. }
  1524. _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
  1525. if e1 != 0 {
  1526. err = errnoErr(e1)
  1527. }
  1528. return
  1529. }
  1530. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1531. func Mlock(b []byte) (err error) {
  1532. var _p0 unsafe.Pointer
  1533. if len(b) > 0 {
  1534. _p0 = unsafe.Pointer(&b[0])
  1535. } else {
  1536. _p0 = unsafe.Pointer(&_zero)
  1537. }
  1538. _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
  1539. if e1 != 0 {
  1540. err = errnoErr(e1)
  1541. }
  1542. return
  1543. }
  1544. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1545. func Mlockall(flags int) (err error) {
  1546. _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
  1547. if e1 != 0 {
  1548. err = errnoErr(e1)
  1549. }
  1550. return
  1551. }
  1552. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1553. func Msync(b []byte, flags int) (err error) {
  1554. var _p0 unsafe.Pointer
  1555. if len(b) > 0 {
  1556. _p0 = unsafe.Pointer(&b[0])
  1557. } else {
  1558. _p0 = unsafe.Pointer(&_zero)
  1559. }
  1560. _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
  1561. if e1 != 0 {
  1562. err = errnoErr(e1)
  1563. }
  1564. return
  1565. }
  1566. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1567. func Munlock(b []byte) (err error) {
  1568. var _p0 unsafe.Pointer
  1569. if len(b) > 0 {
  1570. _p0 = unsafe.Pointer(&b[0])
  1571. } else {
  1572. _p0 = unsafe.Pointer(&_zero)
  1573. }
  1574. _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
  1575. if e1 != 0 {
  1576. err = errnoErr(e1)
  1577. }
  1578. return
  1579. }
  1580. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1581. func Munlockall() (err error) {
  1582. _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
  1583. if e1 != 0 {
  1584. err = errnoErr(e1)
  1585. }
  1586. return
  1587. }
  1588. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1589. func faccessat(dirfd int, path string, mode uint32) (err error) {
  1590. var _p0 *byte
  1591. _p0, err = BytePtrFromString(path)
  1592. if err != nil {
  1593. return
  1594. }
  1595. _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  1596. if e1 != 0 {
  1597. err = errnoErr(e1)
  1598. }
  1599. return
  1600. }
  1601. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1602. func Faccessat2(dirfd int, path string, mode uint32, flags int) (err error) {
  1603. var _p0 *byte
  1604. _p0, err = BytePtrFromString(path)
  1605. if err != nil {
  1606. return
  1607. }
  1608. _, _, e1 := Syscall6(SYS_FACCESSAT2, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
  1609. if e1 != 0 {
  1610. err = errnoErr(e1)
  1611. }
  1612. return
  1613. }
  1614. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1615. func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
  1616. var _p0 *byte
  1617. _p0, err = BytePtrFromString(pathname)
  1618. if err != nil {
  1619. return
  1620. }
  1621. _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
  1622. if e1 != 0 {
  1623. err = errnoErr(e1)
  1624. }
  1625. return
  1626. }
  1627. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1628. func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
  1629. r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags))
  1630. fd = int(r0)
  1631. if e1 != 0 {
  1632. err = errnoErr(e1)
  1633. }
  1634. return
  1635. }
  1636. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1637. func ProcessVMReadv(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) {
  1638. var _p0 unsafe.Pointer
  1639. if len(localIov) > 0 {
  1640. _p0 = unsafe.Pointer(&localIov[0])
  1641. } else {
  1642. _p0 = unsafe.Pointer(&_zero)
  1643. }
  1644. var _p1 unsafe.Pointer
  1645. if len(remoteIov) > 0 {
  1646. _p1 = unsafe.Pointer(&remoteIov[0])
  1647. } else {
  1648. _p1 = unsafe.Pointer(&_zero)
  1649. }
  1650. r0, _, e1 := Syscall6(SYS_PROCESS_VM_READV, uintptr(pid), uintptr(_p0), uintptr(len(localIov)), uintptr(_p1), uintptr(len(remoteIov)), uintptr(flags))
  1651. n = int(r0)
  1652. if e1 != 0 {
  1653. err = errnoErr(e1)
  1654. }
  1655. return
  1656. }
  1657. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1658. func ProcessVMWritev(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) {
  1659. var _p0 unsafe.Pointer
  1660. if len(localIov) > 0 {
  1661. _p0 = unsafe.Pointer(&localIov[0])
  1662. } else {
  1663. _p0 = unsafe.Pointer(&_zero)
  1664. }
  1665. var _p1 unsafe.Pointer
  1666. if len(remoteIov) > 0 {
  1667. _p1 = unsafe.Pointer(&remoteIov[0])
  1668. } else {
  1669. _p1 = unsafe.Pointer(&_zero)
  1670. }
  1671. r0, _, e1 := Syscall6(SYS_PROCESS_VM_WRITEV, uintptr(pid), uintptr(_p0), uintptr(len(localIov)), uintptr(_p1), uintptr(len(remoteIov)), uintptr(flags))
  1672. n = int(r0)
  1673. if e1 != 0 {
  1674. err = errnoErr(e1)
  1675. }
  1676. return
  1677. }
  1678. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1679. func PidfdOpen(pid int, flags int) (fd int, err error) {
  1680. r0, _, e1 := Syscall(SYS_PIDFD_OPEN, uintptr(pid), uintptr(flags), 0)
  1681. fd = int(r0)
  1682. if e1 != 0 {
  1683. err = errnoErr(e1)
  1684. }
  1685. return
  1686. }
  1687. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1688. func PidfdGetfd(pidfd int, targetfd int, flags int) (fd int, err error) {
  1689. r0, _, e1 := Syscall(SYS_PIDFD_GETFD, uintptr(pidfd), uintptr(targetfd), uintptr(flags))
  1690. fd = int(r0)
  1691. if e1 != 0 {
  1692. err = errnoErr(e1)
  1693. }
  1694. return
  1695. }
  1696. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1697. func shmat(id int, addr uintptr, flag int) (ret uintptr, err error) {
  1698. r0, _, e1 := Syscall(SYS_SHMAT, uintptr(id), uintptr(addr), uintptr(flag))
  1699. ret = uintptr(r0)
  1700. if e1 != 0 {
  1701. err = errnoErr(e1)
  1702. }
  1703. return
  1704. }
  1705. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1706. func shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) {
  1707. r0, _, e1 := Syscall(SYS_SHMCTL, uintptr(id), uintptr(cmd), uintptr(unsafe.Pointer(buf)))
  1708. result = int(r0)
  1709. if e1 != 0 {
  1710. err = errnoErr(e1)
  1711. }
  1712. return
  1713. }
  1714. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1715. func shmdt(addr uintptr) (err error) {
  1716. _, _, e1 := Syscall(SYS_SHMDT, uintptr(addr), 0, 0)
  1717. if e1 != 0 {
  1718. err = errnoErr(e1)
  1719. }
  1720. return
  1721. }
  1722. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1723. func shmget(key int, size int, flag int) (id int, err error) {
  1724. r0, _, e1 := Syscall(SYS_SHMGET, uintptr(key), uintptr(size), uintptr(flag))
  1725. id = int(r0)
  1726. if e1 != 0 {
  1727. err = errnoErr(e1)
  1728. }
  1729. return
  1730. }