zsyscall_linux_ppc64le.go 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755
  1. // go run mksyscall.go -tags linux,ppc64le syscall_linux.go syscall_linux_ppc64x.go
  2. // Code generated by the command above; see README.md. DO NOT EDIT.
  3. //go:build linux && ppc64le
  4. // +build linux,ppc64le
  5. package unix
  6. import (
  7. "syscall"
  8. "unsafe"
  9. )
  10. var _ syscall.Errno
  11. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  12. func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
  13. _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
  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 Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
  21. _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 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 Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
  29. r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
  30. n = int64(r0)
  31. if e1 != 0 {
  32. err = errnoErr(e1)
  33. }
  34. return
  35. }
  36. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  37. func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
  38. var _p0 unsafe.Pointer
  39. if len(events) > 0 {
  40. _p0 = unsafe.Pointer(&events[0])
  41. } else {
  42. _p0 = unsafe.Pointer(&_zero)
  43. }
  44. r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
  45. n = int(r0)
  46. if e1 != 0 {
  47. err = errnoErr(e1)
  48. }
  49. return
  50. }
  51. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  52. func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
  53. _, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
  54. if e1 != 0 {
  55. err = errnoErr(e1)
  56. }
  57. return
  58. }
  59. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  60. func Fchown(fd int, uid int, gid int) (err error) {
  61. _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
  62. if e1 != 0 {
  63. err = errnoErr(e1)
  64. }
  65. return
  66. }
  67. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  68. func Fstat(fd int, stat *Stat_t) (err error) {
  69. _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  70. if e1 != 0 {
  71. err = errnoErr(e1)
  72. }
  73. return
  74. }
  75. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  76. func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
  77. var _p0 *byte
  78. _p0, err = BytePtrFromString(path)
  79. if err != nil {
  80. return
  81. }
  82. _, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
  83. if e1 != 0 {
  84. err = errnoErr(e1)
  85. }
  86. return
  87. }
  88. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  89. func Fstatfs(fd int, buf *Statfs_t) (err error) {
  90. _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
  91. if e1 != 0 {
  92. err = errnoErr(e1)
  93. }
  94. return
  95. }
  96. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  97. func Ftruncate(fd int, length int64) (err error) {
  98. _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
  99. if e1 != 0 {
  100. err = errnoErr(e1)
  101. }
  102. return
  103. }
  104. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  105. func Getegid() (egid int) {
  106. r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)
  107. egid = int(r0)
  108. return
  109. }
  110. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  111. func Geteuid() (euid int) {
  112. r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)
  113. euid = int(r0)
  114. return
  115. }
  116. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  117. func Getgid() (gid int) {
  118. r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)
  119. gid = int(r0)
  120. return
  121. }
  122. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  123. func Getrlimit(resource int, rlim *Rlimit) (err error) {
  124. _, _, e1 := RawSyscall(SYS_UGETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  125. if e1 != 0 {
  126. err = errnoErr(e1)
  127. }
  128. return
  129. }
  130. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  131. func Getuid() (uid int) {
  132. r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)
  133. uid = int(r0)
  134. return
  135. }
  136. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  137. func Ioperm(from int, num int, on int) (err error) {
  138. _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
  139. if e1 != 0 {
  140. err = errnoErr(e1)
  141. }
  142. return
  143. }
  144. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  145. func Iopl(level int) (err error) {
  146. _, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0)
  147. if e1 != 0 {
  148. err = errnoErr(e1)
  149. }
  150. return
  151. }
  152. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  153. func Lchown(path string, uid int, gid int) (err error) {
  154. var _p0 *byte
  155. _p0, err = BytePtrFromString(path)
  156. if err != nil {
  157. return
  158. }
  159. _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  160. if e1 != 0 {
  161. err = errnoErr(e1)
  162. }
  163. return
  164. }
  165. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  166. func Listen(s int, n int) (err error) {
  167. _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
  168. if e1 != 0 {
  169. err = errnoErr(e1)
  170. }
  171. return
  172. }
  173. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  174. func Lstat(path string, stat *Stat_t) (err error) {
  175. var _p0 *byte
  176. _p0, err = BytePtrFromString(path)
  177. if err != nil {
  178. return
  179. }
  180. _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  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 Pause() (err error) {
  188. _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
  189. if e1 != 0 {
  190. err = errnoErr(e1)
  191. }
  192. return
  193. }
  194. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  195. func Pread(fd int, p []byte, offset int64) (n int, err error) {
  196. var _p0 unsafe.Pointer
  197. if len(p) > 0 {
  198. _p0 = unsafe.Pointer(&p[0])
  199. } else {
  200. _p0 = unsafe.Pointer(&_zero)
  201. }
  202. r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  203. n = int(r0)
  204. if e1 != 0 {
  205. err = errnoErr(e1)
  206. }
  207. return
  208. }
  209. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  210. func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  211. var _p0 unsafe.Pointer
  212. if len(p) > 0 {
  213. _p0 = unsafe.Pointer(&p[0])
  214. } else {
  215. _p0 = unsafe.Pointer(&_zero)
  216. }
  217. r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  218. n = int(r0)
  219. if e1 != 0 {
  220. err = errnoErr(e1)
  221. }
  222. return
  223. }
  224. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  225. func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
  226. var _p0 *byte
  227. _p0, err = BytePtrFromString(oldpath)
  228. if err != nil {
  229. return
  230. }
  231. var _p1 *byte
  232. _p1, err = BytePtrFromString(newpath)
  233. if err != nil {
  234. return
  235. }
  236. _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
  237. if e1 != 0 {
  238. err = errnoErr(e1)
  239. }
  240. return
  241. }
  242. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  243. func Seek(fd int, offset int64, whence int) (off int64, err error) {
  244. r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
  245. off = int64(r0)
  246. if e1 != 0 {
  247. err = errnoErr(e1)
  248. }
  249. return
  250. }
  251. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  252. func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
  253. r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
  254. n = int(r0)
  255. if e1 != 0 {
  256. err = errnoErr(e1)
  257. }
  258. return
  259. }
  260. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  261. func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
  262. r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
  263. written = int(r0)
  264. if e1 != 0 {
  265. err = errnoErr(e1)
  266. }
  267. return
  268. }
  269. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  270. func setfsgid(gid int) (prev int, err error) {
  271. r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
  272. prev = int(r0)
  273. if e1 != 0 {
  274. err = errnoErr(e1)
  275. }
  276. return
  277. }
  278. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  279. func setfsuid(uid int) (prev int, err error) {
  280. r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
  281. prev = int(r0)
  282. if e1 != 0 {
  283. err = errnoErr(e1)
  284. }
  285. return
  286. }
  287. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  288. func Setregid(rgid int, egid int) (err error) {
  289. _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
  290. if e1 != 0 {
  291. err = errnoErr(e1)
  292. }
  293. return
  294. }
  295. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  296. func Setresgid(rgid int, egid int, sgid int) (err error) {
  297. _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
  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 Setresuid(ruid int, euid int, suid int) (err error) {
  305. _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
  306. if e1 != 0 {
  307. err = errnoErr(e1)
  308. }
  309. return
  310. }
  311. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  312. func Setrlimit(resource int, rlim *Rlimit) (err error) {
  313. _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
  314. if e1 != 0 {
  315. err = errnoErr(e1)
  316. }
  317. return
  318. }
  319. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  320. func Setreuid(ruid int, euid int) (err error) {
  321. _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
  322. if e1 != 0 {
  323. err = errnoErr(e1)
  324. }
  325. return
  326. }
  327. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  328. func Shutdown(fd int, how int) (err error) {
  329. _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
  330. if e1 != 0 {
  331. err = errnoErr(e1)
  332. }
  333. return
  334. }
  335. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  336. func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
  337. r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
  338. n = int64(r0)
  339. if e1 != 0 {
  340. err = errnoErr(e1)
  341. }
  342. return
  343. }
  344. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  345. func Stat(path string, stat *Stat_t) (err error) {
  346. var _p0 *byte
  347. _p0, err = BytePtrFromString(path)
  348. if err != nil {
  349. return
  350. }
  351. _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  352. if e1 != 0 {
  353. err = errnoErr(e1)
  354. }
  355. return
  356. }
  357. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  358. func Statfs(path string, buf *Statfs_t) (err error) {
  359. var _p0 *byte
  360. _p0, err = BytePtrFromString(path)
  361. if err != nil {
  362. return
  363. }
  364. _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
  365. if e1 != 0 {
  366. err = errnoErr(e1)
  367. }
  368. return
  369. }
  370. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  371. func Truncate(path string, length int64) (err error) {
  372. var _p0 *byte
  373. _p0, err = BytePtrFromString(path)
  374. if err != nil {
  375. return
  376. }
  377. _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
  378. if e1 != 0 {
  379. err = errnoErr(e1)
  380. }
  381. return
  382. }
  383. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  384. func Ustat(dev int, ubuf *Ustat_t) (err error) {
  385. _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
  386. if e1 != 0 {
  387. err = errnoErr(e1)
  388. }
  389. return
  390. }
  391. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  392. func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
  393. r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  394. fd = int(r0)
  395. if e1 != 0 {
  396. err = errnoErr(e1)
  397. }
  398. return
  399. }
  400. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  401. func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
  402. r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
  403. fd = int(r0)
  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 bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  411. _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
  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 connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  419. _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
  420. if e1 != 0 {
  421. err = errnoErr(e1)
  422. }
  423. return
  424. }
  425. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  426. func getgroups(n int, list *_Gid_t) (nn int, err error) {
  427. r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  428. nn = int(r0)
  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 setgroups(n int, list *_Gid_t) (err error) {
  436. _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  437. if e1 != 0 {
  438. err = errnoErr(e1)
  439. }
  440. return
  441. }
  442. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  443. func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
  444. _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
  445. if e1 != 0 {
  446. err = errnoErr(e1)
  447. }
  448. return
  449. }
  450. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  451. func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
  452. _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
  453. if e1 != 0 {
  454. err = errnoErr(e1)
  455. }
  456. return
  457. }
  458. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  459. func socket(domain int, typ int, proto int) (fd int, err error) {
  460. r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
  461. fd = int(r0)
  462. if e1 != 0 {
  463. err = errnoErr(e1)
  464. }
  465. return
  466. }
  467. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  468. func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
  469. _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
  470. if e1 != 0 {
  471. err = errnoErr(e1)
  472. }
  473. return
  474. }
  475. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  476. func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  477. _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  478. if e1 != 0 {
  479. err = errnoErr(e1)
  480. }
  481. return
  482. }
  483. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  484. func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  485. _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  486. if e1 != 0 {
  487. err = errnoErr(e1)
  488. }
  489. return
  490. }
  491. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  492. func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
  493. var _p0 unsafe.Pointer
  494. if len(p) > 0 {
  495. _p0 = unsafe.Pointer(&p[0])
  496. } else {
  497. _p0 = unsafe.Pointer(&_zero)
  498. }
  499. r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
  500. n = int(r0)
  501. if e1 != 0 {
  502. err = errnoErr(e1)
  503. }
  504. return
  505. }
  506. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  507. func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
  508. var _p0 unsafe.Pointer
  509. if len(buf) > 0 {
  510. _p0 = unsafe.Pointer(&buf[0])
  511. } else {
  512. _p0 = unsafe.Pointer(&_zero)
  513. }
  514. _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
  515. if e1 != 0 {
  516. err = errnoErr(e1)
  517. }
  518. return
  519. }
  520. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  521. func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  522. r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  523. n = int(r0)
  524. if e1 != 0 {
  525. err = errnoErr(e1)
  526. }
  527. return
  528. }
  529. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  530. func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  531. r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  532. n = int(r0)
  533. if e1 != 0 {
  534. err = errnoErr(e1)
  535. }
  536. return
  537. }
  538. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  539. func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
  540. r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
  541. xaddr = uintptr(r0)
  542. if e1 != 0 {
  543. err = errnoErr(e1)
  544. }
  545. return
  546. }
  547. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  548. func futimesat(dirfd int, path string, times *[2]Timeval) (err error) {
  549. var _p0 *byte
  550. _p0, err = BytePtrFromString(path)
  551. if err != nil {
  552. return
  553. }
  554. _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))
  555. if e1 != 0 {
  556. err = errnoErr(e1)
  557. }
  558. return
  559. }
  560. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  561. func Gettimeofday(tv *Timeval) (err error) {
  562. _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  563. if e1 != 0 {
  564. err = errnoErr(e1)
  565. }
  566. return
  567. }
  568. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  569. func Time(t *Time_t) (tt Time_t, err error) {
  570. r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0)
  571. tt = Time_t(r0)
  572. if e1 != 0 {
  573. err = errnoErr(e1)
  574. }
  575. return
  576. }
  577. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  578. func Utime(path string, buf *Utimbuf) (err error) {
  579. var _p0 *byte
  580. _p0, err = BytePtrFromString(path)
  581. if err != nil {
  582. return
  583. }
  584. _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
  585. if e1 != 0 {
  586. err = errnoErr(e1)
  587. }
  588. return
  589. }
  590. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  591. func utimes(path string, times *[2]Timeval) (err error) {
  592. var _p0 *byte
  593. _p0, err = BytePtrFromString(path)
  594. if err != nil {
  595. return
  596. }
  597. _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
  598. if e1 != 0 {
  599. err = errnoErr(e1)
  600. }
  601. return
  602. }
  603. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  604. func syncFileRange2(fd int, flags int, off int64, n int64) (err error) {
  605. _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off), uintptr(n), 0, 0)
  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 kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
  613. var _p0 *byte
  614. _p0, err = BytePtrFromString(cmdline)
  615. if err != nil {
  616. return
  617. }
  618. _, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  619. if e1 != 0 {
  620. err = errnoErr(e1)
  621. }
  622. return
  623. }