zsyscall_linux_s390x.go 52 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198
  1. // go run mksyscall.go -tags linux,s390x syscall_linux.go syscall_linux_s390x.go
  2. // Code generated by the command above; see README.md. DO NOT EDIT.
  3. // +build linux,s390x
  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 fchmodat(dirfd int, path string, mode uint32) (err error) {
  12. var _p0 *byte
  13. _p0, err = BytePtrFromString(path)
  14. if err != nil {
  15. return
  16. }
  17. _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  18. if e1 != 0 {
  19. err = errnoErr(e1)
  20. }
  21. return
  22. }
  23. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  24. func ioctl(fd int, req uint, arg uintptr) (err error) {
  25. _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
  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 Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
  33. var _p0 *byte
  34. _p0, err = BytePtrFromString(oldpath)
  35. if err != nil {
  36. return
  37. }
  38. var _p1 *byte
  39. _p1, err = BytePtrFromString(newpath)
  40. if err != nil {
  41. return
  42. }
  43. _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
  44. if e1 != 0 {
  45. err = errnoErr(e1)
  46. }
  47. return
  48. }
  49. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  50. func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
  51. var _p0 *byte
  52. _p0, err = BytePtrFromString(path)
  53. if err != nil {
  54. return
  55. }
  56. r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
  57. fd = int(r0)
  58. if e1 != 0 {
  59. err = errnoErr(e1)
  60. }
  61. return
  62. }
  63. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  64. func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
  65. r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
  66. n = int(r0)
  67. if e1 != 0 {
  68. err = errnoErr(e1)
  69. }
  70. return
  71. }
  72. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  73. func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
  74. var _p0 *byte
  75. _p0, err = BytePtrFromString(path)
  76. if err != nil {
  77. return
  78. }
  79. var _p1 unsafe.Pointer
  80. if len(buf) > 0 {
  81. _p1 = unsafe.Pointer(&buf[0])
  82. } else {
  83. _p1 = unsafe.Pointer(&_zero)
  84. }
  85. r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
  86. n = int(r0)
  87. if e1 != 0 {
  88. err = errnoErr(e1)
  89. }
  90. return
  91. }
  92. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  93. func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
  94. var _p0 *byte
  95. _p0, err = BytePtrFromString(oldpath)
  96. if err != nil {
  97. return
  98. }
  99. var _p1 *byte
  100. _p1, err = BytePtrFromString(newpath)
  101. if err != nil {
  102. return
  103. }
  104. _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
  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 Unlinkat(dirfd int, path string, flags int) (err error) {
  112. var _p0 *byte
  113. _p0, err = BytePtrFromString(path)
  114. if err != nil {
  115. return
  116. }
  117. _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
  118. if e1 != 0 {
  119. err = errnoErr(e1)
  120. }
  121. return
  122. }
  123. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  124. func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
  125. var _p0 *byte
  126. _p0, err = BytePtrFromString(path)
  127. if err != nil {
  128. return
  129. }
  130. _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
  131. if e1 != 0 {
  132. err = errnoErr(e1)
  133. }
  134. return
  135. }
  136. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  137. func Getcwd(buf []byte) (n int, err error) {
  138. var _p0 unsafe.Pointer
  139. if len(buf) > 0 {
  140. _p0 = unsafe.Pointer(&buf[0])
  141. } else {
  142. _p0 = unsafe.Pointer(&_zero)
  143. }
  144. r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
  145. n = int(r0)
  146. if e1 != 0 {
  147. err = errnoErr(e1)
  148. }
  149. return
  150. }
  151. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  152. func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
  153. r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
  154. wpid = int(r0)
  155. if e1 != 0 {
  156. err = errnoErr(e1)
  157. }
  158. return
  159. }
  160. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  161. func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
  162. r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
  163. ret = int(r0)
  164. if e1 != 0 {
  165. err = errnoErr(e1)
  166. }
  167. return
  168. }
  169. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  170. func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
  171. var _p0 unsafe.Pointer
  172. if len(buf) > 0 {
  173. _p0 = unsafe.Pointer(&buf[0])
  174. } else {
  175. _p0 = unsafe.Pointer(&_zero)
  176. }
  177. r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
  178. ret = int(r0)
  179. if e1 != 0 {
  180. err = errnoErr(e1)
  181. }
  182. return
  183. }
  184. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  185. func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
  186. var _p0 *byte
  187. _p0, err = BytePtrFromString(arg2)
  188. if err != nil {
  189. return
  190. }
  191. r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
  192. ret = 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 keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
  200. var _p0 *byte
  201. _p0, err = BytePtrFromString(arg3)
  202. if err != nil {
  203. return
  204. }
  205. var _p1 *byte
  206. _p1, err = BytePtrFromString(arg4)
  207. if err != nil {
  208. return
  209. }
  210. r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
  211. ret = int(r0)
  212. if e1 != 0 {
  213. err = errnoErr(e1)
  214. }
  215. return
  216. }
  217. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  218. func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
  219. var _p0 unsafe.Pointer
  220. if len(payload) > 0 {
  221. _p0 = unsafe.Pointer(&payload[0])
  222. } else {
  223. _p0 = unsafe.Pointer(&_zero)
  224. }
  225. _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
  226. if e1 != 0 {
  227. err = errnoErr(e1)
  228. }
  229. return
  230. }
  231. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  232. func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
  233. var _p0 unsafe.Pointer
  234. if len(buf) > 0 {
  235. _p0 = unsafe.Pointer(&buf[0])
  236. } else {
  237. _p0 = unsafe.Pointer(&_zero)
  238. }
  239. r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
  240. ret = int(r0)
  241. if e1 != 0 {
  242. err = errnoErr(e1)
  243. }
  244. return
  245. }
  246. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  247. func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
  248. _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
  249. if e1 != 0 {
  250. err = errnoErr(e1)
  251. }
  252. return
  253. }
  254. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  255. func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
  256. var _p0 *byte
  257. _p0, err = BytePtrFromString(arg)
  258. if err != nil {
  259. return
  260. }
  261. _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
  262. if e1 != 0 {
  263. err = errnoErr(e1)
  264. }
  265. return
  266. }
  267. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  268. func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
  269. var _p0 *byte
  270. _p0, err = BytePtrFromString(source)
  271. if err != nil {
  272. return
  273. }
  274. var _p1 *byte
  275. _p1, err = BytePtrFromString(target)
  276. if err != nil {
  277. return
  278. }
  279. var _p2 *byte
  280. _p2, err = BytePtrFromString(fstype)
  281. if err != nil {
  282. return
  283. }
  284. _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
  285. if e1 != 0 {
  286. err = errnoErr(e1)
  287. }
  288. return
  289. }
  290. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  291. func Acct(path string) (err error) {
  292. var _p0 *byte
  293. _p0, err = BytePtrFromString(path)
  294. if err != nil {
  295. return
  296. }
  297. _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
  298. if e1 != 0 {
  299. err = errnoErr(e1)
  300. }
  301. return
  302. }
  303. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  304. func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
  305. var _p0 *byte
  306. _p0, err = BytePtrFromString(keyType)
  307. if err != nil {
  308. return
  309. }
  310. var _p1 *byte
  311. _p1, err = BytePtrFromString(description)
  312. if err != nil {
  313. return
  314. }
  315. var _p2 unsafe.Pointer
  316. if len(payload) > 0 {
  317. _p2 = unsafe.Pointer(&payload[0])
  318. } else {
  319. _p2 = unsafe.Pointer(&_zero)
  320. }
  321. r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
  322. id = int(r0)
  323. if e1 != 0 {
  324. err = errnoErr(e1)
  325. }
  326. return
  327. }
  328. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  329. func Adjtimex(buf *Timex) (state int, err error) {
  330. r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
  331. state = int(r0)
  332. if e1 != 0 {
  333. err = errnoErr(e1)
  334. }
  335. return
  336. }
  337. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  338. func Chdir(path string) (err error) {
  339. var _p0 *byte
  340. _p0, err = BytePtrFromString(path)
  341. if err != nil {
  342. return
  343. }
  344. _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
  345. if e1 != 0 {
  346. err = errnoErr(e1)
  347. }
  348. return
  349. }
  350. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  351. func Chroot(path string) (err error) {
  352. var _p0 *byte
  353. _p0, err = BytePtrFromString(path)
  354. if err != nil {
  355. return
  356. }
  357. _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
  358. if e1 != 0 {
  359. err = errnoErr(e1)
  360. }
  361. return
  362. }
  363. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  364. func ClockGetres(clockid int32, res *Timespec) (err error) {
  365. _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
  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 ClockGettime(clockid int32, time *Timespec) (err error) {
  373. _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
  374. if e1 != 0 {
  375. err = errnoErr(e1)
  376. }
  377. return
  378. }
  379. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  380. func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
  381. _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
  382. if e1 != 0 {
  383. err = errnoErr(e1)
  384. }
  385. return
  386. }
  387. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  388. func Close(fd int) (err error) {
  389. _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
  390. if e1 != 0 {
  391. err = errnoErr(e1)
  392. }
  393. return
  394. }
  395. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  396. func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
  397. r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
  398. n = int(r0)
  399. if e1 != 0 {
  400. err = errnoErr(e1)
  401. }
  402. return
  403. }
  404. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  405. func DeleteModule(name string, flags int) (err error) {
  406. var _p0 *byte
  407. _p0, err = BytePtrFromString(name)
  408. if err != nil {
  409. return
  410. }
  411. _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 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 Dup(oldfd int) (fd int, err error) {
  419. r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
  420. fd = int(r0)
  421. if e1 != 0 {
  422. err = errnoErr(e1)
  423. }
  424. return
  425. }
  426. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  427. func Dup3(oldfd int, newfd int, flags int) (err error) {
  428. _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
  429. if e1 != 0 {
  430. err = errnoErr(e1)
  431. }
  432. return
  433. }
  434. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  435. func EpollCreate1(flag int) (fd int, err error) {
  436. r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
  437. fd = int(r0)
  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 EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
  445. _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 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 Eventfd(initval uint, flags int) (fd int, err error) {
  453. r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0)
  454. fd = int(r0)
  455. if e1 != 0 {
  456. err = errnoErr(e1)
  457. }
  458. return
  459. }
  460. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  461. func Exit(code int) {
  462. SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
  463. return
  464. }
  465. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  466. func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
  467. _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
  468. if e1 != 0 {
  469. err = errnoErr(e1)
  470. }
  471. return
  472. }
  473. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  474. func Fchdir(fd int) (err error) {
  475. _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
  476. if e1 != 0 {
  477. err = errnoErr(e1)
  478. }
  479. return
  480. }
  481. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  482. func Fchmod(fd int, mode uint32) (err error) {
  483. _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
  484. if e1 != 0 {
  485. err = errnoErr(e1)
  486. }
  487. return
  488. }
  489. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  490. func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
  491. var _p0 *byte
  492. _p0, err = BytePtrFromString(path)
  493. if err != nil {
  494. return
  495. }
  496. _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
  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 fcntl(fd int, cmd int, arg int) (val int, err error) {
  504. r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
  505. val = int(r0)
  506. if e1 != 0 {
  507. err = errnoErr(e1)
  508. }
  509. return
  510. }
  511. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  512. func Fdatasync(fd int) (err error) {
  513. _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
  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 Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
  521. var _p0 *byte
  522. _p0, err = BytePtrFromString(attr)
  523. if err != nil {
  524. return
  525. }
  526. var _p1 unsafe.Pointer
  527. if len(dest) > 0 {
  528. _p1 = unsafe.Pointer(&dest[0])
  529. } else {
  530. _p1 = unsafe.Pointer(&_zero)
  531. }
  532. r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
  533. sz = int(r0)
  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 FinitModule(fd int, params string, flags int) (err error) {
  541. var _p0 *byte
  542. _p0, err = BytePtrFromString(params)
  543. if err != nil {
  544. return
  545. }
  546. _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
  547. if e1 != 0 {
  548. err = errnoErr(e1)
  549. }
  550. return
  551. }
  552. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  553. func Flistxattr(fd int, dest []byte) (sz int, err error) {
  554. var _p0 unsafe.Pointer
  555. if len(dest) > 0 {
  556. _p0 = unsafe.Pointer(&dest[0])
  557. } else {
  558. _p0 = unsafe.Pointer(&_zero)
  559. }
  560. r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
  561. sz = int(r0)
  562. if e1 != 0 {
  563. err = errnoErr(e1)
  564. }
  565. return
  566. }
  567. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  568. func Flock(fd int, how int) (err error) {
  569. _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
  570. if e1 != 0 {
  571. err = errnoErr(e1)
  572. }
  573. return
  574. }
  575. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  576. func Fremovexattr(fd int, attr string) (err error) {
  577. var _p0 *byte
  578. _p0, err = BytePtrFromString(attr)
  579. if err != nil {
  580. return
  581. }
  582. _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
  583. if e1 != 0 {
  584. err = errnoErr(e1)
  585. }
  586. return
  587. }
  588. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  589. func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
  590. var _p0 *byte
  591. _p0, err = BytePtrFromString(attr)
  592. if err != nil {
  593. return
  594. }
  595. var _p1 unsafe.Pointer
  596. if len(dest) > 0 {
  597. _p1 = unsafe.Pointer(&dest[0])
  598. } else {
  599. _p1 = unsafe.Pointer(&_zero)
  600. }
  601. _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
  602. if e1 != 0 {
  603. err = errnoErr(e1)
  604. }
  605. return
  606. }
  607. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  608. func Fsync(fd int) (err error) {
  609. _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
  610. if e1 != 0 {
  611. err = errnoErr(e1)
  612. }
  613. return
  614. }
  615. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  616. func Getdents(fd int, buf []byte) (n int, err error) {
  617. var _p0 unsafe.Pointer
  618. if len(buf) > 0 {
  619. _p0 = unsafe.Pointer(&buf[0])
  620. } else {
  621. _p0 = unsafe.Pointer(&_zero)
  622. }
  623. r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
  624. n = int(r0)
  625. if e1 != 0 {
  626. err = errnoErr(e1)
  627. }
  628. return
  629. }
  630. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  631. func Getpgid(pid int) (pgid int, err error) {
  632. r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
  633. pgid = int(r0)
  634. if e1 != 0 {
  635. err = errnoErr(e1)
  636. }
  637. return
  638. }
  639. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  640. func Getpid() (pid int) {
  641. r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
  642. pid = int(r0)
  643. return
  644. }
  645. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  646. func Getppid() (ppid int) {
  647. r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
  648. ppid = int(r0)
  649. return
  650. }
  651. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  652. func Getpriority(which int, who int) (prio int, err error) {
  653. r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
  654. prio = int(r0)
  655. if e1 != 0 {
  656. err = errnoErr(e1)
  657. }
  658. return
  659. }
  660. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  661. func Getrandom(buf []byte, flags int) (n int, err error) {
  662. var _p0 unsafe.Pointer
  663. if len(buf) > 0 {
  664. _p0 = unsafe.Pointer(&buf[0])
  665. } else {
  666. _p0 = unsafe.Pointer(&_zero)
  667. }
  668. r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
  669. n = int(r0)
  670. if e1 != 0 {
  671. err = errnoErr(e1)
  672. }
  673. return
  674. }
  675. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  676. func Getrusage(who int, rusage *Rusage) (err error) {
  677. _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
  678. if e1 != 0 {
  679. err = errnoErr(e1)
  680. }
  681. return
  682. }
  683. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  684. func Getsid(pid int) (sid int, err error) {
  685. r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
  686. sid = int(r0)
  687. if e1 != 0 {
  688. err = errnoErr(e1)
  689. }
  690. return
  691. }
  692. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  693. func Gettid() (tid int) {
  694. r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
  695. tid = int(r0)
  696. return
  697. }
  698. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  699. func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
  700. var _p0 *byte
  701. _p0, err = BytePtrFromString(path)
  702. if err != nil {
  703. return
  704. }
  705. var _p1 *byte
  706. _p1, err = BytePtrFromString(attr)
  707. if err != nil {
  708. return
  709. }
  710. var _p2 unsafe.Pointer
  711. if len(dest) > 0 {
  712. _p2 = unsafe.Pointer(&dest[0])
  713. } else {
  714. _p2 = unsafe.Pointer(&_zero)
  715. }
  716. r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
  717. sz = int(r0)
  718. if e1 != 0 {
  719. err = errnoErr(e1)
  720. }
  721. return
  722. }
  723. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  724. func InitModule(moduleImage []byte, params string) (err error) {
  725. var _p0 unsafe.Pointer
  726. if len(moduleImage) > 0 {
  727. _p0 = unsafe.Pointer(&moduleImage[0])
  728. } else {
  729. _p0 = unsafe.Pointer(&_zero)
  730. }
  731. var _p1 *byte
  732. _p1, err = BytePtrFromString(params)
  733. if err != nil {
  734. return
  735. }
  736. _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
  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 InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
  744. var _p0 *byte
  745. _p0, err = BytePtrFromString(pathname)
  746. if err != nil {
  747. return
  748. }
  749. r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
  750. watchdesc = int(r0)
  751. if e1 != 0 {
  752. err = errnoErr(e1)
  753. }
  754. return
  755. }
  756. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  757. func InotifyInit1(flags int) (fd int, err error) {
  758. r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
  759. fd = int(r0)
  760. if e1 != 0 {
  761. err = errnoErr(e1)
  762. }
  763. return
  764. }
  765. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  766. func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
  767. r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
  768. success = int(r0)
  769. if e1 != 0 {
  770. err = errnoErr(e1)
  771. }
  772. return
  773. }
  774. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  775. func Kill(pid int, sig syscall.Signal) (err error) {
  776. _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
  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 Klogctl(typ int, buf []byte) (n int, err error) {
  784. var _p0 unsafe.Pointer
  785. if len(buf) > 0 {
  786. _p0 = unsafe.Pointer(&buf[0])
  787. } else {
  788. _p0 = unsafe.Pointer(&_zero)
  789. }
  790. r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
  791. n = int(r0)
  792. if e1 != 0 {
  793. err = errnoErr(e1)
  794. }
  795. return
  796. }
  797. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  798. func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
  799. var _p0 *byte
  800. _p0, err = BytePtrFromString(path)
  801. if err != nil {
  802. return
  803. }
  804. var _p1 *byte
  805. _p1, err = BytePtrFromString(attr)
  806. if err != nil {
  807. return
  808. }
  809. var _p2 unsafe.Pointer
  810. if len(dest) > 0 {
  811. _p2 = unsafe.Pointer(&dest[0])
  812. } else {
  813. _p2 = unsafe.Pointer(&_zero)
  814. }
  815. r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
  816. sz = int(r0)
  817. if e1 != 0 {
  818. err = errnoErr(e1)
  819. }
  820. return
  821. }
  822. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  823. func Listxattr(path string, dest []byte) (sz int, err error) {
  824. var _p0 *byte
  825. _p0, err = BytePtrFromString(path)
  826. if err != nil {
  827. return
  828. }
  829. var _p1 unsafe.Pointer
  830. if len(dest) > 0 {
  831. _p1 = unsafe.Pointer(&dest[0])
  832. } else {
  833. _p1 = unsafe.Pointer(&_zero)
  834. }
  835. r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
  836. sz = int(r0)
  837. if e1 != 0 {
  838. err = errnoErr(e1)
  839. }
  840. return
  841. }
  842. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  843. func Llistxattr(path string, dest []byte) (sz int, err error) {
  844. var _p0 *byte
  845. _p0, err = BytePtrFromString(path)
  846. if err != nil {
  847. return
  848. }
  849. var _p1 unsafe.Pointer
  850. if len(dest) > 0 {
  851. _p1 = unsafe.Pointer(&dest[0])
  852. } else {
  853. _p1 = unsafe.Pointer(&_zero)
  854. }
  855. r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
  856. sz = int(r0)
  857. if e1 != 0 {
  858. err = errnoErr(e1)
  859. }
  860. return
  861. }
  862. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  863. func Lremovexattr(path string, attr string) (err error) {
  864. var _p0 *byte
  865. _p0, err = BytePtrFromString(path)
  866. if err != nil {
  867. return
  868. }
  869. var _p1 *byte
  870. _p1, err = BytePtrFromString(attr)
  871. if err != nil {
  872. return
  873. }
  874. _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  875. if e1 != 0 {
  876. err = errnoErr(e1)
  877. }
  878. return
  879. }
  880. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  881. func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
  882. var _p0 *byte
  883. _p0, err = BytePtrFromString(path)
  884. if err != nil {
  885. return
  886. }
  887. var _p1 *byte
  888. _p1, err = BytePtrFromString(attr)
  889. if err != nil {
  890. return
  891. }
  892. var _p2 unsafe.Pointer
  893. if len(data) > 0 {
  894. _p2 = unsafe.Pointer(&data[0])
  895. } else {
  896. _p2 = unsafe.Pointer(&_zero)
  897. }
  898. _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
  899. if e1 != 0 {
  900. err = errnoErr(e1)
  901. }
  902. return
  903. }
  904. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  905. func MemfdCreate(name string, flags int) (fd int, err error) {
  906. var _p0 *byte
  907. _p0, err = BytePtrFromString(name)
  908. if err != nil {
  909. return
  910. }
  911. r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  912. fd = int(r0)
  913. if e1 != 0 {
  914. err = errnoErr(e1)
  915. }
  916. return
  917. }
  918. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  919. func Mkdirat(dirfd int, path string, mode uint32) (err error) {
  920. var _p0 *byte
  921. _p0, err = BytePtrFromString(path)
  922. if err != nil {
  923. return
  924. }
  925. _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  926. if e1 != 0 {
  927. err = errnoErr(e1)
  928. }
  929. return
  930. }
  931. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  932. func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
  933. var _p0 *byte
  934. _p0, err = BytePtrFromString(path)
  935. if err != nil {
  936. return
  937. }
  938. _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
  939. if e1 != 0 {
  940. err = errnoErr(e1)
  941. }
  942. return
  943. }
  944. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  945. func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
  946. _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
  947. if e1 != 0 {
  948. err = errnoErr(e1)
  949. }
  950. return
  951. }
  952. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  953. func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
  954. r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
  955. fd = int(r0)
  956. if e1 != 0 {
  957. err = errnoErr(e1)
  958. }
  959. return
  960. }
  961. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  962. func PivotRoot(newroot string, putold string) (err error) {
  963. var _p0 *byte
  964. _p0, err = BytePtrFromString(newroot)
  965. if err != nil {
  966. return
  967. }
  968. var _p1 *byte
  969. _p1, err = BytePtrFromString(putold)
  970. if err != nil {
  971. return
  972. }
  973. _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  974. if e1 != 0 {
  975. err = errnoErr(e1)
  976. }
  977. return
  978. }
  979. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  980. func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
  981. _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
  982. if e1 != 0 {
  983. err = errnoErr(e1)
  984. }
  985. return
  986. }
  987. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  988. func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
  989. _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
  990. if e1 != 0 {
  991. err = errnoErr(e1)
  992. }
  993. return
  994. }
  995. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  996. func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
  997. 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)))
  998. n = int(r0)
  999. if e1 != 0 {
  1000. err = errnoErr(e1)
  1001. }
  1002. return
  1003. }
  1004. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1005. func read(fd int, p []byte) (n int, err error) {
  1006. var _p0 unsafe.Pointer
  1007. if len(p) > 0 {
  1008. _p0 = unsafe.Pointer(&p[0])
  1009. } else {
  1010. _p0 = unsafe.Pointer(&_zero)
  1011. }
  1012. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1013. n = int(r0)
  1014. if e1 != 0 {
  1015. err = errnoErr(e1)
  1016. }
  1017. return
  1018. }
  1019. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1020. func Removexattr(path string, attr string) (err error) {
  1021. var _p0 *byte
  1022. _p0, err = BytePtrFromString(path)
  1023. if err != nil {
  1024. return
  1025. }
  1026. var _p1 *byte
  1027. _p1, err = BytePtrFromString(attr)
  1028. if err != nil {
  1029. return
  1030. }
  1031. _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1032. if e1 != 0 {
  1033. err = errnoErr(e1)
  1034. }
  1035. return
  1036. }
  1037. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1038. func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
  1039. var _p0 *byte
  1040. _p0, err = BytePtrFromString(oldpath)
  1041. if err != nil {
  1042. return
  1043. }
  1044. var _p1 *byte
  1045. _p1, err = BytePtrFromString(newpath)
  1046. if err != nil {
  1047. return
  1048. }
  1049. _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
  1050. if e1 != 0 {
  1051. err = errnoErr(e1)
  1052. }
  1053. return
  1054. }
  1055. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1056. func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
  1057. var _p0 *byte
  1058. _p0, err = BytePtrFromString(keyType)
  1059. if err != nil {
  1060. return
  1061. }
  1062. var _p1 *byte
  1063. _p1, err = BytePtrFromString(description)
  1064. if err != nil {
  1065. return
  1066. }
  1067. var _p2 *byte
  1068. _p2, err = BytePtrFromString(callback)
  1069. if err != nil {
  1070. return
  1071. }
  1072. r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
  1073. id = int(r0)
  1074. if e1 != 0 {
  1075. err = errnoErr(e1)
  1076. }
  1077. return
  1078. }
  1079. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1080. func Setdomainname(p []byte) (err error) {
  1081. var _p0 unsafe.Pointer
  1082. if len(p) > 0 {
  1083. _p0 = unsafe.Pointer(&p[0])
  1084. } else {
  1085. _p0 = unsafe.Pointer(&_zero)
  1086. }
  1087. _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
  1088. if e1 != 0 {
  1089. err = errnoErr(e1)
  1090. }
  1091. return
  1092. }
  1093. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1094. func Sethostname(p []byte) (err error) {
  1095. var _p0 unsafe.Pointer
  1096. if len(p) > 0 {
  1097. _p0 = unsafe.Pointer(&p[0])
  1098. } else {
  1099. _p0 = unsafe.Pointer(&_zero)
  1100. }
  1101. _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
  1102. if e1 != 0 {
  1103. err = errnoErr(e1)
  1104. }
  1105. return
  1106. }
  1107. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1108. func Setpgid(pid int, pgid int) (err error) {
  1109. _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
  1110. if e1 != 0 {
  1111. err = errnoErr(e1)
  1112. }
  1113. return
  1114. }
  1115. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1116. func Setsid() (pid int, err error) {
  1117. r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
  1118. pid = int(r0)
  1119. if e1 != 0 {
  1120. err = errnoErr(e1)
  1121. }
  1122. return
  1123. }
  1124. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1125. func Settimeofday(tv *Timeval) (err error) {
  1126. _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  1127. if e1 != 0 {
  1128. err = errnoErr(e1)
  1129. }
  1130. return
  1131. }
  1132. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1133. func Setns(fd int, nstype int) (err error) {
  1134. _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
  1135. if e1 != 0 {
  1136. err = errnoErr(e1)
  1137. }
  1138. return
  1139. }
  1140. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1141. func Setpriority(which int, who int, prio int) (err error) {
  1142. _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
  1143. if e1 != 0 {
  1144. err = errnoErr(e1)
  1145. }
  1146. return
  1147. }
  1148. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1149. func Setxattr(path string, attr string, data []byte, flags int) (err error) {
  1150. var _p0 *byte
  1151. _p0, err = BytePtrFromString(path)
  1152. if err != nil {
  1153. return
  1154. }
  1155. var _p1 *byte
  1156. _p1, err = BytePtrFromString(attr)
  1157. if err != nil {
  1158. return
  1159. }
  1160. var _p2 unsafe.Pointer
  1161. if len(data) > 0 {
  1162. _p2 = unsafe.Pointer(&data[0])
  1163. } else {
  1164. _p2 = unsafe.Pointer(&_zero)
  1165. }
  1166. _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
  1167. if e1 != 0 {
  1168. err = errnoErr(e1)
  1169. }
  1170. return
  1171. }
  1172. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1173. func Signalfd(fd int, mask *Sigset_t, flags int) {
  1174. SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags))
  1175. return
  1176. }
  1177. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1178. func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
  1179. var _p0 *byte
  1180. _p0, err = BytePtrFromString(path)
  1181. if err != nil {
  1182. return
  1183. }
  1184. _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
  1185. if e1 != 0 {
  1186. err = errnoErr(e1)
  1187. }
  1188. return
  1189. }
  1190. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1191. func Sync() {
  1192. SyscallNoError(SYS_SYNC, 0, 0, 0)
  1193. return
  1194. }
  1195. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1196. func Syncfs(fd int) (err error) {
  1197. _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 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 Sysinfo(info *Sysinfo_t) (err error) {
  1205. _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 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 Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
  1213. r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
  1214. n = int64(r0)
  1215. if e1 != 0 {
  1216. err = errnoErr(e1)
  1217. }
  1218. return
  1219. }
  1220. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1221. func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
  1222. _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
  1223. if e1 != 0 {
  1224. err = errnoErr(e1)
  1225. }
  1226. return
  1227. }
  1228. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1229. func Times(tms *Tms) (ticks uintptr, err error) {
  1230. r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
  1231. ticks = uintptr(r0)
  1232. if e1 != 0 {
  1233. err = errnoErr(e1)
  1234. }
  1235. return
  1236. }
  1237. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1238. func Umask(mask int) (oldmask int) {
  1239. r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
  1240. oldmask = int(r0)
  1241. return
  1242. }
  1243. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1244. func Uname(buf *Utsname) (err error) {
  1245. _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
  1246. if e1 != 0 {
  1247. err = errnoErr(e1)
  1248. }
  1249. return
  1250. }
  1251. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1252. func Unmount(target string, flags int) (err error) {
  1253. var _p0 *byte
  1254. _p0, err = BytePtrFromString(target)
  1255. if err != nil {
  1256. return
  1257. }
  1258. _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  1259. if e1 != 0 {
  1260. err = errnoErr(e1)
  1261. }
  1262. return
  1263. }
  1264. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1265. func Unshare(flags int) (err error) {
  1266. _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
  1267. if e1 != 0 {
  1268. err = errnoErr(e1)
  1269. }
  1270. return
  1271. }
  1272. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1273. func write(fd int, p []byte) (n int, err error) {
  1274. var _p0 unsafe.Pointer
  1275. if len(p) > 0 {
  1276. _p0 = unsafe.Pointer(&p[0])
  1277. } else {
  1278. _p0 = unsafe.Pointer(&_zero)
  1279. }
  1280. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1281. n = int(r0)
  1282. if e1 != 0 {
  1283. err = errnoErr(e1)
  1284. }
  1285. return
  1286. }
  1287. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1288. func exitThread(code int) (err error) {
  1289. _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
  1290. if e1 != 0 {
  1291. err = errnoErr(e1)
  1292. }
  1293. return
  1294. }
  1295. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1296. func readlen(fd int, p *byte, np int) (n int, err error) {
  1297. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
  1298. n = int(r0)
  1299. if e1 != 0 {
  1300. err = errnoErr(e1)
  1301. }
  1302. return
  1303. }
  1304. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1305. func writelen(fd int, p *byte, np int) (n int, err error) {
  1306. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
  1307. n = int(r0)
  1308. if e1 != 0 {
  1309. err = errnoErr(e1)
  1310. }
  1311. return
  1312. }
  1313. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1314. func munmap(addr uintptr, length uintptr) (err error) {
  1315. _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
  1316. if e1 != 0 {
  1317. err = errnoErr(e1)
  1318. }
  1319. return
  1320. }
  1321. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1322. func Madvise(b []byte, advice int) (err error) {
  1323. var _p0 unsafe.Pointer
  1324. if len(b) > 0 {
  1325. _p0 = unsafe.Pointer(&b[0])
  1326. } else {
  1327. _p0 = unsafe.Pointer(&_zero)
  1328. }
  1329. _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
  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 Mprotect(b []byte, prot int) (err error) {
  1337. var _p0 unsafe.Pointer
  1338. if len(b) > 0 {
  1339. _p0 = unsafe.Pointer(&b[0])
  1340. } else {
  1341. _p0 = unsafe.Pointer(&_zero)
  1342. }
  1343. _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
  1344. if e1 != 0 {
  1345. err = errnoErr(e1)
  1346. }
  1347. return
  1348. }
  1349. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1350. func Mlock(b []byte) (err error) {
  1351. var _p0 unsafe.Pointer
  1352. if len(b) > 0 {
  1353. _p0 = unsafe.Pointer(&b[0])
  1354. } else {
  1355. _p0 = unsafe.Pointer(&_zero)
  1356. }
  1357. _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 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 Mlockall(flags int) (err error) {
  1365. _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
  1366. if e1 != 0 {
  1367. err = errnoErr(e1)
  1368. }
  1369. return
  1370. }
  1371. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1372. func Msync(b []byte, flags int) (err error) {
  1373. var _p0 unsafe.Pointer
  1374. if len(b) > 0 {
  1375. _p0 = unsafe.Pointer(&b[0])
  1376. } else {
  1377. _p0 = unsafe.Pointer(&_zero)
  1378. }
  1379. _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
  1380. if e1 != 0 {
  1381. err = errnoErr(e1)
  1382. }
  1383. return
  1384. }
  1385. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1386. func Munlock(b []byte) (err error) {
  1387. var _p0 unsafe.Pointer
  1388. if len(b) > 0 {
  1389. _p0 = unsafe.Pointer(&b[0])
  1390. } else {
  1391. _p0 = unsafe.Pointer(&_zero)
  1392. }
  1393. _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
  1394. if e1 != 0 {
  1395. err = errnoErr(e1)
  1396. }
  1397. return
  1398. }
  1399. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1400. func Munlockall() (err error) {
  1401. _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
  1402. if e1 != 0 {
  1403. err = errnoErr(e1)
  1404. }
  1405. return
  1406. }
  1407. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1408. func faccessat(dirfd int, path string, mode uint32) (err error) {
  1409. var _p0 *byte
  1410. _p0, err = BytePtrFromString(path)
  1411. if err != nil {
  1412. return
  1413. }
  1414. _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
  1415. if e1 != 0 {
  1416. err = errnoErr(e1)
  1417. }
  1418. return
  1419. }
  1420. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1421. func Dup2(oldfd int, newfd int) (err error) {
  1422. _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
  1423. if e1 != 0 {
  1424. err = errnoErr(e1)
  1425. }
  1426. return
  1427. }
  1428. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1429. func EpollCreate(size int) (fd int, err error) {
  1430. r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
  1431. fd = int(r0)
  1432. if e1 != 0 {
  1433. err = errnoErr(e1)
  1434. }
  1435. return
  1436. }
  1437. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1438. func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
  1439. var _p0 unsafe.Pointer
  1440. if len(events) > 0 {
  1441. _p0 = unsafe.Pointer(&events[0])
  1442. } else {
  1443. _p0 = unsafe.Pointer(&_zero)
  1444. }
  1445. r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
  1446. n = int(r0)
  1447. if e1 != 0 {
  1448. err = errnoErr(e1)
  1449. }
  1450. return
  1451. }
  1452. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1453. func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
  1454. _, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
  1455. if e1 != 0 {
  1456. err = errnoErr(e1)
  1457. }
  1458. return
  1459. }
  1460. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1461. func Fchown(fd int, uid int, gid int) (err error) {
  1462. _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
  1463. if e1 != 0 {
  1464. err = errnoErr(e1)
  1465. }
  1466. return
  1467. }
  1468. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1469. func Fstat(fd int, stat *Stat_t) (err error) {
  1470. _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  1471. if e1 != 0 {
  1472. err = errnoErr(e1)
  1473. }
  1474. return
  1475. }
  1476. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1477. func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
  1478. var _p0 *byte
  1479. _p0, err = BytePtrFromString(path)
  1480. if err != nil {
  1481. return
  1482. }
  1483. _, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
  1484. if e1 != 0 {
  1485. err = errnoErr(e1)
  1486. }
  1487. return
  1488. }
  1489. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1490. func Fstatfs(fd int, buf *Statfs_t) (err error) {
  1491. _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
  1492. if e1 != 0 {
  1493. err = errnoErr(e1)
  1494. }
  1495. return
  1496. }
  1497. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1498. func Ftruncate(fd int, length int64) (err error) {
  1499. _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
  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 Getegid() (egid int) {
  1507. r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)
  1508. egid = int(r0)
  1509. return
  1510. }
  1511. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1512. func Geteuid() (euid int) {
  1513. r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)
  1514. euid = int(r0)
  1515. return
  1516. }
  1517. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1518. func Getgid() (gid int) {
  1519. r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)
  1520. gid = int(r0)
  1521. return
  1522. }
  1523. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1524. func Getrlimit(resource int, rlim *Rlimit) (err error) {
  1525. _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  1526. if e1 != 0 {
  1527. err = errnoErr(e1)
  1528. }
  1529. return
  1530. }
  1531. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1532. func Getuid() (uid int) {
  1533. r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)
  1534. uid = int(r0)
  1535. return
  1536. }
  1537. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1538. func InotifyInit() (fd int, err error) {
  1539. r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
  1540. fd = int(r0)
  1541. if e1 != 0 {
  1542. err = errnoErr(e1)
  1543. }
  1544. return
  1545. }
  1546. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1547. func Lchown(path string, uid int, gid int) (err error) {
  1548. var _p0 *byte
  1549. _p0, err = BytePtrFromString(path)
  1550. if err != nil {
  1551. return
  1552. }
  1553. _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  1554. if e1 != 0 {
  1555. err = errnoErr(e1)
  1556. }
  1557. return
  1558. }
  1559. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1560. func Lstat(path string, stat *Stat_t) (err error) {
  1561. var _p0 *byte
  1562. _p0, err = BytePtrFromString(path)
  1563. if err != nil {
  1564. return
  1565. }
  1566. _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1567. if e1 != 0 {
  1568. err = errnoErr(e1)
  1569. }
  1570. return
  1571. }
  1572. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1573. func Pause() (err error) {
  1574. _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 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 Pread(fd int, p []byte, offset int64) (n int, err error) {
  1582. var _p0 unsafe.Pointer
  1583. if len(p) > 0 {
  1584. _p0 = unsafe.Pointer(&p[0])
  1585. } else {
  1586. _p0 = unsafe.Pointer(&_zero)
  1587. }
  1588. r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  1589. n = int(r0)
  1590. if e1 != 0 {
  1591. err = errnoErr(e1)
  1592. }
  1593. return
  1594. }
  1595. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1596. func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  1597. var _p0 unsafe.Pointer
  1598. if len(p) > 0 {
  1599. _p0 = unsafe.Pointer(&p[0])
  1600. } else {
  1601. _p0 = unsafe.Pointer(&_zero)
  1602. }
  1603. r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  1604. n = int(r0)
  1605. if e1 != 0 {
  1606. err = errnoErr(e1)
  1607. }
  1608. return
  1609. }
  1610. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1611. func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
  1612. var _p0 *byte
  1613. _p0, err = BytePtrFromString(oldpath)
  1614. if err != nil {
  1615. return
  1616. }
  1617. var _p1 *byte
  1618. _p1, err = BytePtrFromString(newpath)
  1619. if err != nil {
  1620. return
  1621. }
  1622. _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
  1623. if e1 != 0 {
  1624. err = errnoErr(e1)
  1625. }
  1626. return
  1627. }
  1628. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1629. func Seek(fd int, offset int64, whence int) (off int64, err error) {
  1630. r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
  1631. off = int64(r0)
  1632. if e1 != 0 {
  1633. err = errnoErr(e1)
  1634. }
  1635. return
  1636. }
  1637. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1638. func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
  1639. r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
  1640. n = int(r0)
  1641. if e1 != 0 {
  1642. err = errnoErr(e1)
  1643. }
  1644. return
  1645. }
  1646. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1647. func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
  1648. r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
  1649. written = int(r0)
  1650. if e1 != 0 {
  1651. err = errnoErr(e1)
  1652. }
  1653. return
  1654. }
  1655. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1656. func Setfsgid(gid int) (err error) {
  1657. _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
  1658. if e1 != 0 {
  1659. err = errnoErr(e1)
  1660. }
  1661. return
  1662. }
  1663. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1664. func Setfsuid(uid int) (err error) {
  1665. _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
  1666. if e1 != 0 {
  1667. err = errnoErr(e1)
  1668. }
  1669. return
  1670. }
  1671. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1672. func Setregid(rgid int, egid int) (err error) {
  1673. _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
  1674. if e1 != 0 {
  1675. err = errnoErr(e1)
  1676. }
  1677. return
  1678. }
  1679. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1680. func Setresgid(rgid int, egid int, sgid int) (err error) {
  1681. _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
  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 Setresuid(ruid int, euid int, suid int) (err error) {
  1689. _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
  1690. if e1 != 0 {
  1691. err = errnoErr(e1)
  1692. }
  1693. return
  1694. }
  1695. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1696. func Setrlimit(resource int, rlim *Rlimit) (err error) {
  1697. _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  1698. if e1 != 0 {
  1699. err = errnoErr(e1)
  1700. }
  1701. return
  1702. }
  1703. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1704. func Setreuid(ruid int, euid int) (err error) {
  1705. _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
  1706. if e1 != 0 {
  1707. err = errnoErr(e1)
  1708. }
  1709. return
  1710. }
  1711. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1712. func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
  1713. r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
  1714. n = int64(r0)
  1715. if e1 != 0 {
  1716. err = errnoErr(e1)
  1717. }
  1718. return
  1719. }
  1720. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1721. func Stat(path string, stat *Stat_t) (err error) {
  1722. var _p0 *byte
  1723. _p0, err = BytePtrFromString(path)
  1724. if err != nil {
  1725. return
  1726. }
  1727. _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  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 Statfs(path string, buf *Statfs_t) (err error) {
  1735. var _p0 *byte
  1736. _p0, err = BytePtrFromString(path)
  1737. if err != nil {
  1738. return
  1739. }
  1740. _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
  1741. if e1 != 0 {
  1742. err = errnoErr(e1)
  1743. }
  1744. return
  1745. }
  1746. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1747. func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
  1748. _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
  1749. if e1 != 0 {
  1750. err = errnoErr(e1)
  1751. }
  1752. return
  1753. }
  1754. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1755. func Truncate(path string, length int64) (err error) {
  1756. var _p0 *byte
  1757. _p0, err = BytePtrFromString(path)
  1758. if err != nil {
  1759. return
  1760. }
  1761. _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
  1762. if e1 != 0 {
  1763. err = errnoErr(e1)
  1764. }
  1765. return
  1766. }
  1767. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1768. func Ustat(dev int, ubuf *Ustat_t) (err error) {
  1769. _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
  1770. if e1 != 0 {
  1771. err = errnoErr(e1)
  1772. }
  1773. return
  1774. }
  1775. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1776. func getgroups(n int, list *_Gid_t) (nn int, err error) {
  1777. r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  1778. nn = int(r0)
  1779. if e1 != 0 {
  1780. err = errnoErr(e1)
  1781. }
  1782. return
  1783. }
  1784. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1785. func setgroups(n int, list *_Gid_t) (err error) {
  1786. _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  1787. if e1 != 0 {
  1788. err = errnoErr(e1)
  1789. }
  1790. return
  1791. }
  1792. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1793. func futimesat(dirfd int, path string, times *[2]Timeval) (err error) {
  1794. var _p0 *byte
  1795. _p0, err = BytePtrFromString(path)
  1796. if err != nil {
  1797. return
  1798. }
  1799. _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))
  1800. if e1 != 0 {
  1801. err = errnoErr(e1)
  1802. }
  1803. return
  1804. }
  1805. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1806. func Gettimeofday(tv *Timeval) (err error) {
  1807. _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  1808. if e1 != 0 {
  1809. err = errnoErr(e1)
  1810. }
  1811. return
  1812. }
  1813. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1814. func Utime(path string, buf *Utimbuf) (err error) {
  1815. var _p0 *byte
  1816. _p0, err = BytePtrFromString(path)
  1817. if err != nil {
  1818. return
  1819. }
  1820. _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
  1821. if e1 != 0 {
  1822. err = errnoErr(e1)
  1823. }
  1824. return
  1825. }
  1826. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1827. func utimes(path string, times *[2]Timeval) (err error) {
  1828. var _p0 *byte
  1829. _p0, err = BytePtrFromString(path)
  1830. if err != nil {
  1831. return
  1832. }
  1833. _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
  1834. if e1 != 0 {
  1835. err = errnoErr(e1)
  1836. }
  1837. return
  1838. }
  1839. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1840. func pipe2(p *[2]_C_int, flags int) (err error) {
  1841. _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
  1842. if e1 != 0 {
  1843. err = errnoErr(e1)
  1844. }
  1845. return
  1846. }
  1847. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1848. func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
  1849. r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
  1850. n = int(r0)
  1851. if e1 != 0 {
  1852. err = errnoErr(e1)
  1853. }
  1854. return
  1855. }
  1856. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1857. func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
  1858. var _p0 *byte
  1859. _p0, err = BytePtrFromString(cmdline)
  1860. if err != nil {
  1861. return
  1862. }
  1863. _, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  1864. if e1 != 0 {
  1865. err = errnoErr(e1)
  1866. }
  1867. return
  1868. }