zsyscall_linux_s390x.go 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535
  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. //go:build linux && s390x
  4. // +build linux,s390x
  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_GETRLIMIT, 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 Lchown(path string, uid int, gid int) (err error) {
  138. var _p0 *byte
  139. _p0, err = BytePtrFromString(path)
  140. if err != nil {
  141. return
  142. }
  143. _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  144. if e1 != 0 {
  145. err = errnoErr(e1)
  146. }
  147. return
  148. }
  149. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  150. func Lstat(path string, stat *Stat_t) (err error) {
  151. var _p0 *byte
  152. _p0, err = BytePtrFromString(path)
  153. if err != nil {
  154. return
  155. }
  156. _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  157. if e1 != 0 {
  158. err = errnoErr(e1)
  159. }
  160. return
  161. }
  162. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  163. func Pause() (err error) {
  164. _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
  165. if e1 != 0 {
  166. err = errnoErr(e1)
  167. }
  168. return
  169. }
  170. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  171. func Pread(fd int, p []byte, offset int64) (n int, err error) {
  172. var _p0 unsafe.Pointer
  173. if len(p) > 0 {
  174. _p0 = unsafe.Pointer(&p[0])
  175. } else {
  176. _p0 = unsafe.Pointer(&_zero)
  177. }
  178. r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  179. n = int(r0)
  180. if e1 != 0 {
  181. err = errnoErr(e1)
  182. }
  183. return
  184. }
  185. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  186. func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  187. var _p0 unsafe.Pointer
  188. if len(p) > 0 {
  189. _p0 = unsafe.Pointer(&p[0])
  190. } else {
  191. _p0 = unsafe.Pointer(&_zero)
  192. }
  193. r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
  194. n = int(r0)
  195. if e1 != 0 {
  196. err = errnoErr(e1)
  197. }
  198. return
  199. }
  200. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  201. func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
  202. var _p0 *byte
  203. _p0, err = BytePtrFromString(oldpath)
  204. if err != nil {
  205. return
  206. }
  207. var _p1 *byte
  208. _p1, err = BytePtrFromString(newpath)
  209. if err != nil {
  210. return
  211. }
  212. _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
  213. if e1 != 0 {
  214. err = errnoErr(e1)
  215. }
  216. return
  217. }
  218. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  219. func Seek(fd int, offset int64, whence int) (off int64, err error) {
  220. r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
  221. off = int64(r0)
  222. if e1 != 0 {
  223. err = errnoErr(e1)
  224. }
  225. return
  226. }
  227. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  228. func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
  229. r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
  230. n = int(r0)
  231. if e1 != 0 {
  232. err = errnoErr(e1)
  233. }
  234. return
  235. }
  236. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  237. func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
  238. r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
  239. written = int(r0)
  240. if e1 != 0 {
  241. err = errnoErr(e1)
  242. }
  243. return
  244. }
  245. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  246. func setfsgid(gid int) (prev int, err error) {
  247. r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
  248. prev = int(r0)
  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 setfsuid(uid int) (prev int, err error) {
  256. r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
  257. prev = int(r0)
  258. if e1 != 0 {
  259. err = errnoErr(e1)
  260. }
  261. return
  262. }
  263. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  264. func Setregid(rgid int, egid int) (err error) {
  265. _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
  266. if e1 != 0 {
  267. err = errnoErr(e1)
  268. }
  269. return
  270. }
  271. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  272. func Setresgid(rgid int, egid int, sgid int) (err error) {
  273. _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
  274. if e1 != 0 {
  275. err = errnoErr(e1)
  276. }
  277. return
  278. }
  279. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  280. func Setresuid(ruid int, euid int, suid int) (err error) {
  281. _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
  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 Setrlimit(resource int, rlim *Rlimit) (err error) {
  289. _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 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 Setreuid(ruid int, euid int) (err error) {
  297. _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 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 Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
  305. r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
  306. n = int64(r0)
  307. if e1 != 0 {
  308. err = errnoErr(e1)
  309. }
  310. return
  311. }
  312. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  313. func Stat(path string, stat *Stat_t) (err error) {
  314. var _p0 *byte
  315. _p0, err = BytePtrFromString(path)
  316. if err != nil {
  317. return
  318. }
  319. _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  320. if e1 != 0 {
  321. err = errnoErr(e1)
  322. }
  323. return
  324. }
  325. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  326. func Statfs(path string, buf *Statfs_t) (err error) {
  327. var _p0 *byte
  328. _p0, err = BytePtrFromString(path)
  329. if err != nil {
  330. return
  331. }
  332. _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
  333. if e1 != 0 {
  334. err = errnoErr(e1)
  335. }
  336. return
  337. }
  338. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  339. func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
  340. _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
  341. if e1 != 0 {
  342. err = errnoErr(e1)
  343. }
  344. return
  345. }
  346. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  347. func Truncate(path string, length int64) (err error) {
  348. var _p0 *byte
  349. _p0, err = BytePtrFromString(path)
  350. if err != nil {
  351. return
  352. }
  353. _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
  354. if e1 != 0 {
  355. err = errnoErr(e1)
  356. }
  357. return
  358. }
  359. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  360. func Ustat(dev int, ubuf *Ustat_t) (err error) {
  361. _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
  362. if e1 != 0 {
  363. err = errnoErr(e1)
  364. }
  365. return
  366. }
  367. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  368. func getgroups(n int, list *_Gid_t) (nn int, err error) {
  369. r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  370. nn = int(r0)
  371. if e1 != 0 {
  372. err = errnoErr(e1)
  373. }
  374. return
  375. }
  376. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  377. func setgroups(n int, list *_Gid_t) (err error) {
  378. _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  379. if e1 != 0 {
  380. err = errnoErr(e1)
  381. }
  382. return
  383. }
  384. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  385. func futimesat(dirfd int, path string, times *[2]Timeval) (err error) {
  386. var _p0 *byte
  387. _p0, err = BytePtrFromString(path)
  388. if err != nil {
  389. return
  390. }
  391. _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))
  392. if e1 != 0 {
  393. err = errnoErr(e1)
  394. }
  395. return
  396. }
  397. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  398. func Gettimeofday(tv *Timeval) (err error) {
  399. _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  400. if e1 != 0 {
  401. err = errnoErr(e1)
  402. }
  403. return
  404. }
  405. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  406. func Utime(path string, buf *Utimbuf) (err error) {
  407. var _p0 *byte
  408. _p0, err = BytePtrFromString(path)
  409. if err != nil {
  410. return
  411. }
  412. _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
  413. if e1 != 0 {
  414. err = errnoErr(e1)
  415. }
  416. return
  417. }
  418. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  419. func utimes(path string, times *[2]Timeval) (err error) {
  420. var _p0 *byte
  421. _p0, err = BytePtrFromString(path)
  422. if err != nil {
  423. return
  424. }
  425. _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
  426. if e1 != 0 {
  427. err = errnoErr(e1)
  428. }
  429. return
  430. }
  431. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  432. func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
  433. var _p0 *byte
  434. _p0, err = BytePtrFromString(cmdline)
  435. if err != nil {
  436. return
  437. }
  438. _, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  439. if e1 != 0 {
  440. err = errnoErr(e1)
  441. }
  442. return
  443. }