zsyscall_linux_amd64.go 60 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467
  1. // go run mksyscall.go -tags linux,amd64 syscall_linux.go syscall_linux_amd64.go
  2. // Code generated by the command above; see README.md. DO NOT EDIT.
  3. // +build linux,amd64
  4. package unix
  5. import (
  6. "syscall"
  7. "unsafe"
  8. )
  9. var _ syscall.Errno
  10. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  11. func 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 fcntl(fd int, cmd int, arg int) (val int, err error) {
  563. r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
  564. val = int(r0)
  565. if e1 != 0 {
  566. err = errnoErr(e1)
  567. }
  568. return
  569. }
  570. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  571. func Fdatasync(fd int) (err error) {
  572. _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
  573. if e1 != 0 {
  574. err = errnoErr(e1)
  575. }
  576. return
  577. }
  578. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  579. func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
  580. var _p0 *byte
  581. _p0, err = BytePtrFromString(attr)
  582. if err != nil {
  583. return
  584. }
  585. var _p1 unsafe.Pointer
  586. if len(dest) > 0 {
  587. _p1 = unsafe.Pointer(&dest[0])
  588. } else {
  589. _p1 = unsafe.Pointer(&_zero)
  590. }
  591. r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
  592. sz = int(r0)
  593. if e1 != 0 {
  594. err = errnoErr(e1)
  595. }
  596. return
  597. }
  598. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  599. func FinitModule(fd int, params string, flags int) (err error) {
  600. var _p0 *byte
  601. _p0, err = BytePtrFromString(params)
  602. if err != nil {
  603. return
  604. }
  605. _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
  606. if e1 != 0 {
  607. err = errnoErr(e1)
  608. }
  609. return
  610. }
  611. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  612. func Flistxattr(fd int, dest []byte) (sz int, err error) {
  613. var _p0 unsafe.Pointer
  614. if len(dest) > 0 {
  615. _p0 = unsafe.Pointer(&dest[0])
  616. } else {
  617. _p0 = unsafe.Pointer(&_zero)
  618. }
  619. r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
  620. sz = int(r0)
  621. if e1 != 0 {
  622. err = errnoErr(e1)
  623. }
  624. return
  625. }
  626. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  627. func Flock(fd int, how int) (err error) {
  628. _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
  629. if e1 != 0 {
  630. err = errnoErr(e1)
  631. }
  632. return
  633. }
  634. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  635. func Fremovexattr(fd int, attr string) (err error) {
  636. var _p0 *byte
  637. _p0, err = BytePtrFromString(attr)
  638. if err != nil {
  639. return
  640. }
  641. _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
  642. if e1 != 0 {
  643. err = errnoErr(e1)
  644. }
  645. return
  646. }
  647. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  648. func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
  649. var _p0 *byte
  650. _p0, err = BytePtrFromString(attr)
  651. if err != nil {
  652. return
  653. }
  654. var _p1 unsafe.Pointer
  655. if len(dest) > 0 {
  656. _p1 = unsafe.Pointer(&dest[0])
  657. } else {
  658. _p1 = unsafe.Pointer(&_zero)
  659. }
  660. _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
  661. if e1 != 0 {
  662. err = errnoErr(e1)
  663. }
  664. return
  665. }
  666. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  667. func Fsync(fd int) (err error) {
  668. _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
  669. if e1 != 0 {
  670. err = errnoErr(e1)
  671. }
  672. return
  673. }
  674. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  675. func Getdents(fd int, buf []byte) (n int, err error) {
  676. var _p0 unsafe.Pointer
  677. if len(buf) > 0 {
  678. _p0 = unsafe.Pointer(&buf[0])
  679. } else {
  680. _p0 = unsafe.Pointer(&_zero)
  681. }
  682. r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
  683. n = 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 Getpgid(pid int) (pgid int, err error) {
  691. r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
  692. pgid = int(r0)
  693. if e1 != 0 {
  694. err = errnoErr(e1)
  695. }
  696. return
  697. }
  698. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  699. func Getpid() (pid int) {
  700. r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
  701. pid = int(r0)
  702. return
  703. }
  704. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  705. func Getppid() (ppid int) {
  706. r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
  707. ppid = int(r0)
  708. return
  709. }
  710. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  711. func Getpriority(which int, who int) (prio int, err error) {
  712. r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
  713. prio = int(r0)
  714. if e1 != 0 {
  715. err = errnoErr(e1)
  716. }
  717. return
  718. }
  719. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  720. func Getrandom(buf []byte, flags int) (n int, err error) {
  721. var _p0 unsafe.Pointer
  722. if len(buf) > 0 {
  723. _p0 = unsafe.Pointer(&buf[0])
  724. } else {
  725. _p0 = unsafe.Pointer(&_zero)
  726. }
  727. r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
  728. n = int(r0)
  729. if e1 != 0 {
  730. err = errnoErr(e1)
  731. }
  732. return
  733. }
  734. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  735. func Getrusage(who int, rusage *Rusage) (err error) {
  736. _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
  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 Getsid(pid int) (sid int, err error) {
  744. r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
  745. sid = int(r0)
  746. if e1 != 0 {
  747. err = errnoErr(e1)
  748. }
  749. return
  750. }
  751. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  752. func Gettid() (tid int) {
  753. r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
  754. tid = int(r0)
  755. return
  756. }
  757. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  758. func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
  759. var _p0 *byte
  760. _p0, err = BytePtrFromString(path)
  761. if err != nil {
  762. return
  763. }
  764. var _p1 *byte
  765. _p1, err = BytePtrFromString(attr)
  766. if err != nil {
  767. return
  768. }
  769. var _p2 unsafe.Pointer
  770. if len(dest) > 0 {
  771. _p2 = unsafe.Pointer(&dest[0])
  772. } else {
  773. _p2 = unsafe.Pointer(&_zero)
  774. }
  775. r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
  776. sz = int(r0)
  777. if e1 != 0 {
  778. err = errnoErr(e1)
  779. }
  780. return
  781. }
  782. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  783. func InitModule(moduleImage []byte, params string) (err error) {
  784. var _p0 unsafe.Pointer
  785. if len(moduleImage) > 0 {
  786. _p0 = unsafe.Pointer(&moduleImage[0])
  787. } else {
  788. _p0 = unsafe.Pointer(&_zero)
  789. }
  790. var _p1 *byte
  791. _p1, err = BytePtrFromString(params)
  792. if err != nil {
  793. return
  794. }
  795. _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
  796. if e1 != 0 {
  797. err = errnoErr(e1)
  798. }
  799. return
  800. }
  801. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  802. func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
  803. var _p0 *byte
  804. _p0, err = BytePtrFromString(pathname)
  805. if err != nil {
  806. return
  807. }
  808. r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
  809. watchdesc = 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 InotifyInit1(flags int) (fd int, err error) {
  817. r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
  818. fd = 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 InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
  826. r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
  827. success = int(r0)
  828. if e1 != 0 {
  829. err = errnoErr(e1)
  830. }
  831. return
  832. }
  833. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  834. func Kill(pid int, sig syscall.Signal) (err error) {
  835. _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
  836. if e1 != 0 {
  837. err = errnoErr(e1)
  838. }
  839. return
  840. }
  841. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  842. func Klogctl(typ int, buf []byte) (n int, err error) {
  843. var _p0 unsafe.Pointer
  844. if len(buf) > 0 {
  845. _p0 = unsafe.Pointer(&buf[0])
  846. } else {
  847. _p0 = unsafe.Pointer(&_zero)
  848. }
  849. r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
  850. n = int(r0)
  851. if e1 != 0 {
  852. err = errnoErr(e1)
  853. }
  854. return
  855. }
  856. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  857. func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
  858. var _p0 *byte
  859. _p0, err = BytePtrFromString(path)
  860. if err != nil {
  861. return
  862. }
  863. var _p1 *byte
  864. _p1, err = BytePtrFromString(attr)
  865. if err != nil {
  866. return
  867. }
  868. var _p2 unsafe.Pointer
  869. if len(dest) > 0 {
  870. _p2 = unsafe.Pointer(&dest[0])
  871. } else {
  872. _p2 = unsafe.Pointer(&_zero)
  873. }
  874. r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
  875. sz = int(r0)
  876. if e1 != 0 {
  877. err = errnoErr(e1)
  878. }
  879. return
  880. }
  881. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  882. func Listxattr(path string, dest []byte) (sz int, err error) {
  883. var _p0 *byte
  884. _p0, err = BytePtrFromString(path)
  885. if err != nil {
  886. return
  887. }
  888. var _p1 unsafe.Pointer
  889. if len(dest) > 0 {
  890. _p1 = unsafe.Pointer(&dest[0])
  891. } else {
  892. _p1 = unsafe.Pointer(&_zero)
  893. }
  894. r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
  895. sz = int(r0)
  896. if e1 != 0 {
  897. err = errnoErr(e1)
  898. }
  899. return
  900. }
  901. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  902. func Llistxattr(path string, dest []byte) (sz int, err error) {
  903. var _p0 *byte
  904. _p0, err = BytePtrFromString(path)
  905. if err != nil {
  906. return
  907. }
  908. var _p1 unsafe.Pointer
  909. if len(dest) > 0 {
  910. _p1 = unsafe.Pointer(&dest[0])
  911. } else {
  912. _p1 = unsafe.Pointer(&_zero)
  913. }
  914. r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
  915. sz = int(r0)
  916. if e1 != 0 {
  917. err = errnoErr(e1)
  918. }
  919. return
  920. }
  921. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  922. func Lremovexattr(path string, attr string) (err error) {
  923. var _p0 *byte
  924. _p0, err = BytePtrFromString(path)
  925. if err != nil {
  926. return
  927. }
  928. var _p1 *byte
  929. _p1, err = BytePtrFromString(attr)
  930. if err != nil {
  931. return
  932. }
  933. _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  934. if e1 != 0 {
  935. err = errnoErr(e1)
  936. }
  937. return
  938. }
  939. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  940. func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
  941. var _p0 *byte
  942. _p0, err = BytePtrFromString(path)
  943. if err != nil {
  944. return
  945. }
  946. var _p1 *byte
  947. _p1, err = BytePtrFromString(attr)
  948. if err != nil {
  949. return
  950. }
  951. var _p2 unsafe.Pointer
  952. if len(data) > 0 {
  953. _p2 = unsafe.Pointer(&data[0])
  954. } else {
  955. _p2 = unsafe.Pointer(&_zero)
  956. }
  957. _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
  958. if e1 != 0 {
  959. err = errnoErr(e1)
  960. }
  961. return
  962. }
  963. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  964. func MemfdCreate(name string, flags int) (fd int, err error) {
  965. var _p0 *byte
  966. _p0, err = BytePtrFromString(name)
  967. if err != nil {
  968. return
  969. }
  970. r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  971. fd = int(r0)
  972. if e1 != 0 {
  973. err = errnoErr(e1)
  974. }
  975. return
  976. }
  977. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  978. func Mkdirat(dirfd int, path string, mode uint32) (err error) {
  979. var _p0 *byte
  980. _p0, err = BytePtrFromString(path)
  981. if err != nil {
  982. return
  983. }
  984. _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  985. if e1 != 0 {
  986. err = errnoErr(e1)
  987. }
  988. return
  989. }
  990. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  991. func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
  992. var _p0 *byte
  993. _p0, err = BytePtrFromString(path)
  994. if err != nil {
  995. return
  996. }
  997. _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
  998. if e1 != 0 {
  999. err = errnoErr(e1)
  1000. }
  1001. return
  1002. }
  1003. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1004. func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
  1005. _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
  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 PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
  1013. r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
  1014. fd = int(r0)
  1015. if e1 != 0 {
  1016. err = errnoErr(e1)
  1017. }
  1018. return
  1019. }
  1020. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1021. func PivotRoot(newroot string, putold string) (err error) {
  1022. var _p0 *byte
  1023. _p0, err = BytePtrFromString(newroot)
  1024. if err != nil {
  1025. return
  1026. }
  1027. var _p1 *byte
  1028. _p1, err = BytePtrFromString(putold)
  1029. if err != nil {
  1030. return
  1031. }
  1032. _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1033. if e1 != 0 {
  1034. err = errnoErr(e1)
  1035. }
  1036. return
  1037. }
  1038. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1039. func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
  1040. _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
  1041. if e1 != 0 {
  1042. err = errnoErr(e1)
  1043. }
  1044. return
  1045. }
  1046. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1047. func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
  1048. _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
  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 Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
  1056. 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)))
  1057. n = int(r0)
  1058. if e1 != 0 {
  1059. err = errnoErr(e1)
  1060. }
  1061. return
  1062. }
  1063. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1064. func read(fd int, p []byte) (n int, err error) {
  1065. var _p0 unsafe.Pointer
  1066. if len(p) > 0 {
  1067. _p0 = unsafe.Pointer(&p[0])
  1068. } else {
  1069. _p0 = unsafe.Pointer(&_zero)
  1070. }
  1071. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1072. n = int(r0)
  1073. if e1 != 0 {
  1074. err = errnoErr(e1)
  1075. }
  1076. return
  1077. }
  1078. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1079. func Removexattr(path string, attr string) (err error) {
  1080. var _p0 *byte
  1081. _p0, err = BytePtrFromString(path)
  1082. if err != nil {
  1083. return
  1084. }
  1085. var _p1 *byte
  1086. _p1, err = BytePtrFromString(attr)
  1087. if err != nil {
  1088. return
  1089. }
  1090. _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1091. if e1 != 0 {
  1092. err = errnoErr(e1)
  1093. }
  1094. return
  1095. }
  1096. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1097. func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
  1098. var _p0 *byte
  1099. _p0, err = BytePtrFromString(oldpath)
  1100. if err != nil {
  1101. return
  1102. }
  1103. var _p1 *byte
  1104. _p1, err = BytePtrFromString(newpath)
  1105. if err != nil {
  1106. return
  1107. }
  1108. _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
  1109. if e1 != 0 {
  1110. err = errnoErr(e1)
  1111. }
  1112. return
  1113. }
  1114. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1115. func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
  1116. var _p0 *byte
  1117. _p0, err = BytePtrFromString(keyType)
  1118. if err != nil {
  1119. return
  1120. }
  1121. var _p1 *byte
  1122. _p1, err = BytePtrFromString(description)
  1123. if err != nil {
  1124. return
  1125. }
  1126. var _p2 *byte
  1127. _p2, err = BytePtrFromString(callback)
  1128. if err != nil {
  1129. return
  1130. }
  1131. r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
  1132. id = int(r0)
  1133. if e1 != 0 {
  1134. err = errnoErr(e1)
  1135. }
  1136. return
  1137. }
  1138. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1139. func Setdomainname(p []byte) (err error) {
  1140. var _p0 unsafe.Pointer
  1141. if len(p) > 0 {
  1142. _p0 = unsafe.Pointer(&p[0])
  1143. } else {
  1144. _p0 = unsafe.Pointer(&_zero)
  1145. }
  1146. _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
  1147. if e1 != 0 {
  1148. err = errnoErr(e1)
  1149. }
  1150. return
  1151. }
  1152. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1153. func Sethostname(p []byte) (err error) {
  1154. var _p0 unsafe.Pointer
  1155. if len(p) > 0 {
  1156. _p0 = unsafe.Pointer(&p[0])
  1157. } else {
  1158. _p0 = unsafe.Pointer(&_zero)
  1159. }
  1160. _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
  1161. if e1 != 0 {
  1162. err = errnoErr(e1)
  1163. }
  1164. return
  1165. }
  1166. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1167. func Setpgid(pid int, pgid int) (err error) {
  1168. _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
  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 Setsid() (pid int, err error) {
  1176. r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
  1177. pid = int(r0)
  1178. if e1 != 0 {
  1179. err = errnoErr(e1)
  1180. }
  1181. return
  1182. }
  1183. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1184. func Settimeofday(tv *Timeval) (err error) {
  1185. _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  1186. if e1 != 0 {
  1187. err = errnoErr(e1)
  1188. }
  1189. return
  1190. }
  1191. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1192. func Setns(fd int, nstype int) (err error) {
  1193. _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
  1194. if e1 != 0 {
  1195. err = errnoErr(e1)
  1196. }
  1197. return
  1198. }
  1199. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1200. func Setpriority(which int, who int, prio int) (err error) {
  1201. _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
  1202. if e1 != 0 {
  1203. err = errnoErr(e1)
  1204. }
  1205. return
  1206. }
  1207. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1208. func Setxattr(path string, attr string, data []byte, flags int) (err error) {
  1209. var _p0 *byte
  1210. _p0, err = BytePtrFromString(path)
  1211. if err != nil {
  1212. return
  1213. }
  1214. var _p1 *byte
  1215. _p1, err = BytePtrFromString(attr)
  1216. if err != nil {
  1217. return
  1218. }
  1219. var _p2 unsafe.Pointer
  1220. if len(data) > 0 {
  1221. _p2 = unsafe.Pointer(&data[0])
  1222. } else {
  1223. _p2 = unsafe.Pointer(&_zero)
  1224. }
  1225. _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
  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 signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
  1233. r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
  1234. newfd = int(r0)
  1235. if e1 != 0 {
  1236. err = errnoErr(e1)
  1237. }
  1238. return
  1239. }
  1240. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1241. func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
  1242. var _p0 *byte
  1243. _p0, err = BytePtrFromString(path)
  1244. if err != nil {
  1245. return
  1246. }
  1247. _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
  1248. if e1 != 0 {
  1249. err = errnoErr(e1)
  1250. }
  1251. return
  1252. }
  1253. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1254. func Sync() {
  1255. SyscallNoError(SYS_SYNC, 0, 0, 0)
  1256. return
  1257. }
  1258. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1259. func Syncfs(fd int) (err error) {
  1260. _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
  1261. if e1 != 0 {
  1262. err = errnoErr(e1)
  1263. }
  1264. return
  1265. }
  1266. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1267. func Sysinfo(info *Sysinfo_t) (err error) {
  1268. _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
  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 Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
  1276. r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
  1277. n = int64(r0)
  1278. if e1 != 0 {
  1279. err = errnoErr(e1)
  1280. }
  1281. return
  1282. }
  1283. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1284. func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
  1285. _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
  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 Times(tms *Tms) (ticks uintptr, err error) {
  1293. r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
  1294. ticks = uintptr(r0)
  1295. if e1 != 0 {
  1296. err = errnoErr(e1)
  1297. }
  1298. return
  1299. }
  1300. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1301. func Umask(mask int) (oldmask int) {
  1302. r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
  1303. oldmask = int(r0)
  1304. return
  1305. }
  1306. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1307. func Uname(buf *Utsname) (err error) {
  1308. _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
  1309. if e1 != 0 {
  1310. err = errnoErr(e1)
  1311. }
  1312. return
  1313. }
  1314. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1315. func Unmount(target string, flags int) (err error) {
  1316. var _p0 *byte
  1317. _p0, err = BytePtrFromString(target)
  1318. if err != nil {
  1319. return
  1320. }
  1321. _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  1322. if e1 != 0 {
  1323. err = errnoErr(e1)
  1324. }
  1325. return
  1326. }
  1327. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1328. func Unshare(flags int) (err error) {
  1329. _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
  1330. if e1 != 0 {
  1331. err = errnoErr(e1)
  1332. }
  1333. return
  1334. }
  1335. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1336. func write(fd int, p []byte) (n int, err error) {
  1337. var _p0 unsafe.Pointer
  1338. if len(p) > 0 {
  1339. _p0 = unsafe.Pointer(&p[0])
  1340. } else {
  1341. _p0 = unsafe.Pointer(&_zero)
  1342. }
  1343. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1344. n = int(r0)
  1345. if e1 != 0 {
  1346. err = errnoErr(e1)
  1347. }
  1348. return
  1349. }
  1350. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1351. func exitThread(code int) (err error) {
  1352. _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
  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 readlen(fd int, p *byte, np int) (n int, err error) {
  1360. r0, _, e1 := Syscall(SYS_READ, 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 writelen(fd int, p *byte, np int) (n int, err error) {
  1369. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
  1370. n = int(r0)
  1371. if e1 != 0 {
  1372. err = errnoErr(e1)
  1373. }
  1374. return
  1375. }
  1376. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1377. func munmap(addr uintptr, length uintptr) (err error) {
  1378. _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
  1379. if e1 != 0 {
  1380. err = errnoErr(e1)
  1381. }
  1382. return
  1383. }
  1384. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1385. func Madvise(b []byte, advice int) (err error) {
  1386. var _p0 unsafe.Pointer
  1387. if len(b) > 0 {
  1388. _p0 = unsafe.Pointer(&b[0])
  1389. } else {
  1390. _p0 = unsafe.Pointer(&_zero)
  1391. }
  1392. _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
  1393. if e1 != 0 {
  1394. err = errnoErr(e1)
  1395. }
  1396. return
  1397. }
  1398. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1399. func Mprotect(b []byte, prot int) (err error) {
  1400. var _p0 unsafe.Pointer
  1401. if len(b) > 0 {
  1402. _p0 = unsafe.Pointer(&b[0])
  1403. } else {
  1404. _p0 = unsafe.Pointer(&_zero)
  1405. }
  1406. _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
  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 Mlock(b []byte) (err error) {
  1414. var _p0 unsafe.Pointer
  1415. if len(b) > 0 {
  1416. _p0 = unsafe.Pointer(&b[0])
  1417. } else {
  1418. _p0 = unsafe.Pointer(&_zero)
  1419. }
  1420. _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
  1421. if e1 != 0 {
  1422. err = errnoErr(e1)
  1423. }
  1424. return
  1425. }
  1426. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1427. func Mlockall(flags int) (err error) {
  1428. _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
  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 Msync(b []byte, flags int) (err error) {
  1436. var _p0 unsafe.Pointer
  1437. if len(b) > 0 {
  1438. _p0 = unsafe.Pointer(&b[0])
  1439. } else {
  1440. _p0 = unsafe.Pointer(&_zero)
  1441. }
  1442. _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
  1443. if e1 != 0 {
  1444. err = errnoErr(e1)
  1445. }
  1446. return
  1447. }
  1448. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1449. func Munlock(b []byte) (err error) {
  1450. var _p0 unsafe.Pointer
  1451. if len(b) > 0 {
  1452. _p0 = unsafe.Pointer(&b[0])
  1453. } else {
  1454. _p0 = unsafe.Pointer(&_zero)
  1455. }
  1456. _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
  1457. if e1 != 0 {
  1458. err = errnoErr(e1)
  1459. }
  1460. return
  1461. }
  1462. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1463. func Munlockall() (err error) {
  1464. _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
  1465. if e1 != 0 {
  1466. err = errnoErr(e1)
  1467. }
  1468. return
  1469. }
  1470. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1471. func faccessat(dirfd int, path string, mode uint32) (err error) {
  1472. var _p0 *byte
  1473. _p0, err = BytePtrFromString(path)
  1474. if err != nil {
  1475. return
  1476. }
  1477. _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  1478. if e1 != 0 {
  1479. err = errnoErr(e1)
  1480. }
  1481. return
  1482. }
  1483. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1484. func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
  1485. var _p0 *byte
  1486. _p0, err = BytePtrFromString(pathname)
  1487. if err != nil {
  1488. return
  1489. }
  1490. _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
  1491. if e1 != 0 {
  1492. err = errnoErr(e1)
  1493. }
  1494. return
  1495. }
  1496. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1497. func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
  1498. r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags))
  1499. fd = int(r0)
  1500. if e1 != 0 {
  1501. err = errnoErr(e1)
  1502. }
  1503. return
  1504. }
  1505. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1506. func Dup2(oldfd int, newfd int) (err error) {
  1507. _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
  1508. if e1 != 0 {
  1509. err = errnoErr(e1)
  1510. }
  1511. return
  1512. }
  1513. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1514. func EpollCreate(size int) (fd int, err error) {
  1515. r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
  1516. fd = int(r0)
  1517. if e1 != 0 {
  1518. err = errnoErr(e1)
  1519. }
  1520. return
  1521. }
  1522. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1523. func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
  1524. var _p0 unsafe.Pointer
  1525. if len(events) > 0 {
  1526. _p0 = unsafe.Pointer(&events[0])
  1527. } else {
  1528. _p0 = unsafe.Pointer(&_zero)
  1529. }
  1530. r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
  1531. n = int(r0)
  1532. if e1 != 0 {
  1533. err = errnoErr(e1)
  1534. }
  1535. return
  1536. }
  1537. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1538. func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
  1539. _, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
  1540. if e1 != 0 {
  1541. err = errnoErr(e1)
  1542. }
  1543. return
  1544. }
  1545. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1546. func Fchown(fd int, uid int, gid int) (err error) {
  1547. _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
  1548. if e1 != 0 {
  1549. err = errnoErr(e1)
  1550. }
  1551. return
  1552. }
  1553. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1554. func Fstat(fd int, stat *Stat_t) (err error) {
  1555. _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  1556. if e1 != 0 {
  1557. err = errnoErr(e1)
  1558. }
  1559. return
  1560. }
  1561. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1562. func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
  1563. var _p0 *byte
  1564. _p0, err = BytePtrFromString(path)
  1565. if err != nil {
  1566. return
  1567. }
  1568. _, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
  1569. if e1 != 0 {
  1570. err = errnoErr(e1)
  1571. }
  1572. return
  1573. }
  1574. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1575. func Fstatfs(fd int, buf *Statfs_t) (err error) {
  1576. _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
  1577. if e1 != 0 {
  1578. err = errnoErr(e1)
  1579. }
  1580. return
  1581. }
  1582. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1583. func Ftruncate(fd int, length int64) (err error) {
  1584. _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
  1585. if e1 != 0 {
  1586. err = errnoErr(e1)
  1587. }
  1588. return
  1589. }
  1590. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1591. func Getegid() (egid int) {
  1592. r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)
  1593. egid = int(r0)
  1594. return
  1595. }
  1596. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1597. func Geteuid() (euid int) {
  1598. r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)
  1599. euid = int(r0)
  1600. return
  1601. }
  1602. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1603. func Getgid() (gid int) {
  1604. r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)
  1605. gid = int(r0)
  1606. return
  1607. }
  1608. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1609. func Getrlimit(resource int, rlim *Rlimit) (err error) {
  1610. _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  1611. if e1 != 0 {
  1612. err = errnoErr(e1)
  1613. }
  1614. return
  1615. }
  1616. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1617. func Getuid() (uid int) {
  1618. r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)
  1619. uid = int(r0)
  1620. return
  1621. }
  1622. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1623. func inotifyInit() (fd int, err error) {
  1624. r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
  1625. fd = int(r0)
  1626. if e1 != 0 {
  1627. err = errnoErr(e1)
  1628. }
  1629. return
  1630. }
  1631. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1632. func Ioperm(from int, num int, on int) (err error) {
  1633. _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
  1634. if e1 != 0 {
  1635. err = errnoErr(e1)
  1636. }
  1637. return
  1638. }
  1639. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1640. func Iopl(level int) (err error) {
  1641. _, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0)
  1642. if e1 != 0 {
  1643. err = errnoErr(e1)
  1644. }
  1645. return
  1646. }
  1647. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1648. func Lchown(path string, uid int, gid int) (err error) {
  1649. var _p0 *byte
  1650. _p0, err = BytePtrFromString(path)
  1651. if err != nil {
  1652. return
  1653. }
  1654. _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  1655. if e1 != 0 {
  1656. err = errnoErr(e1)
  1657. }
  1658. return
  1659. }
  1660. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1661. func Listen(s int, n int) (err error) {
  1662. _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
  1663. if e1 != 0 {
  1664. err = errnoErr(e1)
  1665. }
  1666. return
  1667. }
  1668. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1669. func Pause() (err error) {
  1670. _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
  1671. if e1 != 0 {
  1672. err = errnoErr(e1)
  1673. }
  1674. return
  1675. }
  1676. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1677. func Pread(fd int, p []byte, offset int64) (n int, err error) {
  1678. var _p0 unsafe.Pointer
  1679. if len(p) > 0 {
  1680. _p0 = unsafe.Pointer(&p[0])
  1681. } else {
  1682. _p0 = unsafe.Pointer(&_zero)
  1683. }
  1684. r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  1685. n = int(r0)
  1686. if e1 != 0 {
  1687. err = errnoErr(e1)
  1688. }
  1689. return
  1690. }
  1691. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1692. func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  1693. var _p0 unsafe.Pointer
  1694. if len(p) > 0 {
  1695. _p0 = unsafe.Pointer(&p[0])
  1696. } else {
  1697. _p0 = unsafe.Pointer(&_zero)
  1698. }
  1699. r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  1700. n = int(r0)
  1701. if e1 != 0 {
  1702. err = errnoErr(e1)
  1703. }
  1704. return
  1705. }
  1706. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1707. func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
  1708. var _p0 *byte
  1709. _p0, err = BytePtrFromString(oldpath)
  1710. if err != nil {
  1711. return
  1712. }
  1713. var _p1 *byte
  1714. _p1, err = BytePtrFromString(newpath)
  1715. if err != nil {
  1716. return
  1717. }
  1718. _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
  1719. if e1 != 0 {
  1720. err = errnoErr(e1)
  1721. }
  1722. return
  1723. }
  1724. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1725. func Seek(fd int, offset int64, whence int) (off int64, err error) {
  1726. r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
  1727. off = int64(r0)
  1728. if e1 != 0 {
  1729. err = errnoErr(e1)
  1730. }
  1731. return
  1732. }
  1733. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1734. func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
  1735. r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
  1736. written = int(r0)
  1737. if e1 != 0 {
  1738. err = errnoErr(e1)
  1739. }
  1740. return
  1741. }
  1742. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1743. func Setfsgid(gid int) (err error) {
  1744. _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
  1745. if e1 != 0 {
  1746. err = errnoErr(e1)
  1747. }
  1748. return
  1749. }
  1750. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1751. func Setfsuid(uid int) (err error) {
  1752. _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
  1753. if e1 != 0 {
  1754. err = errnoErr(e1)
  1755. }
  1756. return
  1757. }
  1758. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1759. func Setregid(rgid int, egid int) (err error) {
  1760. _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
  1761. if e1 != 0 {
  1762. err = errnoErr(e1)
  1763. }
  1764. return
  1765. }
  1766. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1767. func Setresgid(rgid int, egid int, sgid int) (err error) {
  1768. _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
  1769. if e1 != 0 {
  1770. err = errnoErr(e1)
  1771. }
  1772. return
  1773. }
  1774. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1775. func Setresuid(ruid int, euid int, suid int) (err error) {
  1776. _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
  1777. if e1 != 0 {
  1778. err = errnoErr(e1)
  1779. }
  1780. return
  1781. }
  1782. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1783. func Setrlimit(resource int, rlim *Rlimit) (err error) {
  1784. _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  1785. if e1 != 0 {
  1786. err = errnoErr(e1)
  1787. }
  1788. return
  1789. }
  1790. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1791. func Setreuid(ruid int, euid int) (err error) {
  1792. _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
  1793. if e1 != 0 {
  1794. err = errnoErr(e1)
  1795. }
  1796. return
  1797. }
  1798. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1799. func Shutdown(fd int, how int) (err error) {
  1800. _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
  1801. if e1 != 0 {
  1802. err = errnoErr(e1)
  1803. }
  1804. return
  1805. }
  1806. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1807. func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
  1808. r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
  1809. n = int64(r0)
  1810. if e1 != 0 {
  1811. err = errnoErr(e1)
  1812. }
  1813. return
  1814. }
  1815. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1816. func Statfs(path string, buf *Statfs_t) (err error) {
  1817. var _p0 *byte
  1818. _p0, err = BytePtrFromString(path)
  1819. if err != nil {
  1820. return
  1821. }
  1822. _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
  1823. if e1 != 0 {
  1824. err = errnoErr(e1)
  1825. }
  1826. return
  1827. }
  1828. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1829. func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
  1830. _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
  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 Truncate(path string, length int64) (err error) {
  1838. var _p0 *byte
  1839. _p0, err = BytePtrFromString(path)
  1840. if err != nil {
  1841. return
  1842. }
  1843. _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
  1844. if e1 != 0 {
  1845. err = errnoErr(e1)
  1846. }
  1847. return
  1848. }
  1849. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1850. func Ustat(dev int, ubuf *Ustat_t) (err error) {
  1851. _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
  1852. if e1 != 0 {
  1853. err = errnoErr(e1)
  1854. }
  1855. return
  1856. }
  1857. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1858. func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
  1859. r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1860. fd = int(r0)
  1861. if e1 != 0 {
  1862. err = errnoErr(e1)
  1863. }
  1864. return
  1865. }
  1866. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1867. func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
  1868. r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
  1869. fd = int(r0)
  1870. if e1 != 0 {
  1871. err = errnoErr(e1)
  1872. }
  1873. return
  1874. }
  1875. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1876. func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  1877. _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
  1878. if e1 != 0 {
  1879. err = errnoErr(e1)
  1880. }
  1881. return
  1882. }
  1883. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1884. func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  1885. _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
  1886. if e1 != 0 {
  1887. err = errnoErr(e1)
  1888. }
  1889. return
  1890. }
  1891. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1892. func getgroups(n int, list *_Gid_t) (nn int, err error) {
  1893. r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  1894. nn = int(r0)
  1895. if e1 != 0 {
  1896. err = errnoErr(e1)
  1897. }
  1898. return
  1899. }
  1900. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1901. func setgroups(n int, list *_Gid_t) (err error) {
  1902. _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  1903. if e1 != 0 {
  1904. err = errnoErr(e1)
  1905. }
  1906. return
  1907. }
  1908. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1909. func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
  1910. _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
  1911. if e1 != 0 {
  1912. err = errnoErr(e1)
  1913. }
  1914. return
  1915. }
  1916. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1917. func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
  1918. _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
  1919. if e1 != 0 {
  1920. err = errnoErr(e1)
  1921. }
  1922. return
  1923. }
  1924. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1925. func socket(domain int, typ int, proto int) (fd int, err error) {
  1926. r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
  1927. fd = int(r0)
  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 socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
  1935. _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
  1936. if e1 != 0 {
  1937. err = errnoErr(e1)
  1938. }
  1939. return
  1940. }
  1941. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1942. func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  1943. _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1944. if e1 != 0 {
  1945. err = errnoErr(e1)
  1946. }
  1947. return
  1948. }
  1949. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1950. func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  1951. _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  1952. if e1 != 0 {
  1953. err = errnoErr(e1)
  1954. }
  1955. return
  1956. }
  1957. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1958. func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
  1959. var _p0 unsafe.Pointer
  1960. if len(p) > 0 {
  1961. _p0 = unsafe.Pointer(&p[0])
  1962. } else {
  1963. _p0 = unsafe.Pointer(&_zero)
  1964. }
  1965. r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
  1966. n = int(r0)
  1967. if e1 != 0 {
  1968. err = errnoErr(e1)
  1969. }
  1970. return
  1971. }
  1972. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1973. func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
  1974. var _p0 unsafe.Pointer
  1975. if len(buf) > 0 {
  1976. _p0 = unsafe.Pointer(&buf[0])
  1977. } else {
  1978. _p0 = unsafe.Pointer(&_zero)
  1979. }
  1980. _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
  1981. if e1 != 0 {
  1982. err = errnoErr(e1)
  1983. }
  1984. return
  1985. }
  1986. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1987. func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  1988. r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  1989. n = int(r0)
  1990. if e1 != 0 {
  1991. err = errnoErr(e1)
  1992. }
  1993. return
  1994. }
  1995. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1996. func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  1997. r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  1998. n = int(r0)
  1999. if e1 != 0 {
  2000. err = errnoErr(e1)
  2001. }
  2002. return
  2003. }
  2004. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2005. func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
  2006. r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
  2007. xaddr = uintptr(r0)
  2008. if e1 != 0 {
  2009. err = errnoErr(e1)
  2010. }
  2011. return
  2012. }
  2013. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2014. func futimesat(dirfd int, path string, times *[2]Timeval) (err error) {
  2015. var _p0 *byte
  2016. _p0, err = BytePtrFromString(path)
  2017. if err != nil {
  2018. return
  2019. }
  2020. _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))
  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 Utime(path string, buf *Utimbuf) (err error) {
  2028. var _p0 *byte
  2029. _p0, err = BytePtrFromString(path)
  2030. if err != nil {
  2031. return
  2032. }
  2033. _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
  2034. if e1 != 0 {
  2035. err = errnoErr(e1)
  2036. }
  2037. return
  2038. }
  2039. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2040. func utimes(path string, times *[2]Timeval) (err error) {
  2041. var _p0 *byte
  2042. _p0, err = BytePtrFromString(path)
  2043. if err != nil {
  2044. return
  2045. }
  2046. _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
  2047. if e1 != 0 {
  2048. err = errnoErr(e1)
  2049. }
  2050. return
  2051. }
  2052. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2053. func pipe(p *[2]_C_int) (err error) {
  2054. _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
  2055. if e1 != 0 {
  2056. err = errnoErr(e1)
  2057. }
  2058. return
  2059. }
  2060. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2061. func pipe2(p *[2]_C_int, flags int) (err error) {
  2062. _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
  2063. if e1 != 0 {
  2064. err = errnoErr(e1)
  2065. }
  2066. return
  2067. }
  2068. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2069. func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
  2070. r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
  2071. n = int(r0)
  2072. if e1 != 0 {
  2073. err = errnoErr(e1)
  2074. }
  2075. return
  2076. }
  2077. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  2078. func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
  2079. var _p0 *byte
  2080. _p0, err = BytePtrFromString(cmdline)
  2081. if err != nil {
  2082. return
  2083. }
  2084. _, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  2085. if e1 != 0 {
  2086. err = errnoErr(e1)
  2087. }
  2088. return
  2089. }