zsyscall_linux_386.go 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526
  1. // go run mksyscall.go -l32 -tags linux,386 syscall_linux.go syscall_linux_386.go
  2. // Code generated by the command above; see README.md. DO NOT EDIT.
  3. //go:build linux && 386
  4. // +build linux,386
  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(mask>>32), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)))
  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(off>>32), uintptr(len), uintptr(len>>32))
  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, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
  30. n = int64(int64(r1)<<32 | 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_64, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32), uintptr(advice))
  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_FCHOWN32, 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_FSTAT64, 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_FSTATAT64, 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 Ftruncate(fd int, length int64) (err error) {
  90. _, _, e1 := Syscall(SYS_FTRUNCATE64, uintptr(fd), uintptr(length), uintptr(length>>32))
  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 Getegid() (egid int) {
  98. r0, _ := RawSyscallNoError(SYS_GETEGID32, 0, 0, 0)
  99. egid = int(r0)
  100. return
  101. }
  102. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  103. func Geteuid() (euid int) {
  104. r0, _ := RawSyscallNoError(SYS_GETEUID32, 0, 0, 0)
  105. euid = int(r0)
  106. return
  107. }
  108. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  109. func Getgid() (gid int) {
  110. r0, _ := RawSyscallNoError(SYS_GETGID32, 0, 0, 0)
  111. gid = int(r0)
  112. return
  113. }
  114. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  115. func Getuid() (uid int) {
  116. r0, _ := RawSyscallNoError(SYS_GETUID32, 0, 0, 0)
  117. uid = int(r0)
  118. return
  119. }
  120. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  121. func Ioperm(from int, num int, on int) (err error) {
  122. _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
  123. if e1 != 0 {
  124. err = errnoErr(e1)
  125. }
  126. return
  127. }
  128. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  129. func Iopl(level int) (err error) {
  130. _, _, e1 := Syscall(SYS_IOPL, uintptr(level), 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 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_LCHOWN32, 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_LSTAT64, 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 Pread(fd int, p []byte, offset int64) (n int, err error) {
  164. var _p0 unsafe.Pointer
  165. if len(p) > 0 {
  166. _p0 = unsafe.Pointer(&p[0])
  167. } else {
  168. _p0 = unsafe.Pointer(&_zero)
  169. }
  170. r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
  171. n = int(r0)
  172. if e1 != 0 {
  173. err = errnoErr(e1)
  174. }
  175. return
  176. }
  177. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  178. func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  179. var _p0 unsafe.Pointer
  180. if len(p) > 0 {
  181. _p0 = unsafe.Pointer(&p[0])
  182. } else {
  183. _p0 = unsafe.Pointer(&_zero)
  184. }
  185. r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
  186. n = int(r0)
  187. if e1 != 0 {
  188. err = errnoErr(e1)
  189. }
  190. return
  191. }
  192. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  193. func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
  194. var _p0 *byte
  195. _p0, err = BytePtrFromString(oldpath)
  196. if err != nil {
  197. return
  198. }
  199. var _p1 *byte
  200. _p1, err = BytePtrFromString(newpath)
  201. if err != nil {
  202. return
  203. }
  204. _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
  205. if e1 != 0 {
  206. err = errnoErr(e1)
  207. }
  208. return
  209. }
  210. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  211. func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
  212. r0, _, e1 := Syscall6(SYS_SENDFILE64, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
  213. written = int(r0)
  214. if e1 != 0 {
  215. err = errnoErr(e1)
  216. }
  217. return
  218. }
  219. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  220. func setfsgid(gid int) (prev int, err error) {
  221. r0, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0)
  222. prev = int(r0)
  223. if e1 != 0 {
  224. err = errnoErr(e1)
  225. }
  226. return
  227. }
  228. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  229. func setfsuid(uid int) (prev int, err error) {
  230. r0, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0)
  231. prev = int(r0)
  232. if e1 != 0 {
  233. err = errnoErr(e1)
  234. }
  235. return
  236. }
  237. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  238. func Setregid(rgid int, egid int) (err error) {
  239. _, _, e1 := RawSyscall(SYS_SETREGID32, uintptr(rgid), uintptr(egid), 0)
  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 Setresgid(rgid int, egid int, sgid int) (err error) {
  247. _, _, e1 := RawSyscall(SYS_SETRESGID32, uintptr(rgid), uintptr(egid), uintptr(sgid))
  248. if e1 != 0 {
  249. err = errnoErr(e1)
  250. }
  251. return
  252. }
  253. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  254. func Setresuid(ruid int, euid int, suid int) (err error) {
  255. _, _, e1 := RawSyscall(SYS_SETRESUID32, uintptr(ruid), uintptr(euid), uintptr(suid))
  256. if e1 != 0 {
  257. err = errnoErr(e1)
  258. }
  259. return
  260. }
  261. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  262. func Setreuid(ruid int, euid int) (err error) {
  263. _, _, e1 := RawSyscall(SYS_SETREUID32, uintptr(ruid), uintptr(euid), 0)
  264. if e1 != 0 {
  265. err = errnoErr(e1)
  266. }
  267. return
  268. }
  269. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  270. func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
  271. r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
  272. n = 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 Stat(path string, stat *Stat_t) (err error) {
  280. var _p0 *byte
  281. _p0, err = BytePtrFromString(path)
  282. if err != nil {
  283. return
  284. }
  285. _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  286. if e1 != 0 {
  287. err = errnoErr(e1)
  288. }
  289. return
  290. }
  291. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  292. func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
  293. _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32), uintptr(flags))
  294. if e1 != 0 {
  295. err = errnoErr(e1)
  296. }
  297. return
  298. }
  299. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  300. func Truncate(path string, length int64) (err error) {
  301. var _p0 *byte
  302. _p0, err = BytePtrFromString(path)
  303. if err != nil {
  304. return
  305. }
  306. _, _, e1 := Syscall(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
  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 Ustat(dev int, ubuf *Ustat_t) (err error) {
  314. _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
  315. if e1 != 0 {
  316. err = errnoErr(e1)
  317. }
  318. return
  319. }
  320. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  321. func getgroups(n int, list *_Gid_t) (nn int, err error) {
  322. r0, _, e1 := RawSyscall(SYS_GETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  323. nn = int(r0)
  324. if e1 != 0 {
  325. err = errnoErr(e1)
  326. }
  327. return
  328. }
  329. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  330. func setgroups(n int, list *_Gid_t) (err error) {
  331. _, _, e1 := RawSyscall(SYS_SETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
  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 Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
  339. r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
  340. n = int(r0)
  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 mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) {
  348. r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset))
  349. xaddr = uintptr(r0)
  350. if e1 != 0 {
  351. err = errnoErr(e1)
  352. }
  353. return
  354. }
  355. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  356. func Pause() (err error) {
  357. _, _, e1 := Syscall(SYS_PAUSE, 0, 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 getrlimit(resource int, rlim *rlimit32) (err error) {
  365. _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 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 setrlimit(resource int, rlim *rlimit32) (err error) {
  373. _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 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 futimesat(dirfd int, path string, times *[2]Timeval) (err error) {
  381. var _p0 *byte
  382. _p0, err = BytePtrFromString(path)
  383. if err != nil {
  384. return
  385. }
  386. _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))
  387. if e1 != 0 {
  388. err = errnoErr(e1)
  389. }
  390. return
  391. }
  392. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  393. func Gettimeofday(tv *Timeval) (err error) {
  394. _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  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 Time(t *Time_t) (tt Time_t, err error) {
  402. r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0)
  403. tt = Time_t(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 Utime(path string, buf *Utimbuf) (err error) {
  411. var _p0 *byte
  412. _p0, err = BytePtrFromString(path)
  413. if err != nil {
  414. return
  415. }
  416. _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
  417. if e1 != 0 {
  418. err = errnoErr(e1)
  419. }
  420. return
  421. }
  422. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  423. func utimes(path string, times *[2]Timeval) (err error) {
  424. var _p0 *byte
  425. _p0, err = BytePtrFromString(path)
  426. if err != nil {
  427. return
  428. }
  429. _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
  430. if e1 != 0 {
  431. err = errnoErr(e1)
  432. }
  433. return
  434. }