zsyscall_openbsd_arm.go 35 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508
  1. // mksyscall.pl -l32 -openbsd -arm -tags openbsd,arm syscall_bsd.go syscall_openbsd.go syscall_openbsd_arm.go
  2. // Code generated by the command above; see README.md. DO NOT EDIT.
  3. // +build openbsd,arm
  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 getgroups(ngid int, gid *_Gid_t) (n int, err error) {
  12. r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
  13. n = int(r0)
  14. if e1 != 0 {
  15. err = errnoErr(e1)
  16. }
  17. return
  18. }
  19. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  20. func setgroups(ngid int, gid *_Gid_t) (err error) {
  21. _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 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 wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
  29. r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
  30. wpid = int(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 accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
  38. r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  39. fd = int(r0)
  40. if e1 != 0 {
  41. err = errnoErr(e1)
  42. }
  43. return
  44. }
  45. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  46. func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  47. _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
  48. if e1 != 0 {
  49. err = errnoErr(e1)
  50. }
  51. return
  52. }
  53. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  54. func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  55. _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
  56. if e1 != 0 {
  57. err = errnoErr(e1)
  58. }
  59. return
  60. }
  61. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  62. func socket(domain int, typ int, proto int) (fd int, err error) {
  63. r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
  64. fd = int(r0)
  65. if e1 != 0 {
  66. err = errnoErr(e1)
  67. }
  68. return
  69. }
  70. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  71. func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
  72. _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
  73. if e1 != 0 {
  74. err = errnoErr(e1)
  75. }
  76. return
  77. }
  78. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  79. func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
  80. _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
  81. if e1 != 0 {
  82. err = errnoErr(e1)
  83. }
  84. return
  85. }
  86. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  87. func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  88. _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  89. if e1 != 0 {
  90. err = errnoErr(e1)
  91. }
  92. return
  93. }
  94. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  95. func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  96. _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
  97. if e1 != 0 {
  98. err = errnoErr(e1)
  99. }
  100. return
  101. }
  102. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  103. func Shutdown(s int, how int) (err error) {
  104. _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
  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 socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
  112. _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
  113. if e1 != 0 {
  114. err = errnoErr(e1)
  115. }
  116. return
  117. }
  118. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  119. func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
  120. var _p0 unsafe.Pointer
  121. if len(p) > 0 {
  122. _p0 = unsafe.Pointer(&p[0])
  123. } else {
  124. _p0 = unsafe.Pointer(&_zero)
  125. }
  126. r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
  127. n = int(r0)
  128. if e1 != 0 {
  129. err = errnoErr(e1)
  130. }
  131. return
  132. }
  133. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  134. func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
  135. var _p0 unsafe.Pointer
  136. if len(buf) > 0 {
  137. _p0 = unsafe.Pointer(&buf[0])
  138. } else {
  139. _p0 = unsafe.Pointer(&_zero)
  140. }
  141. _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
  142. if e1 != 0 {
  143. err = errnoErr(e1)
  144. }
  145. return
  146. }
  147. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  148. func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  149. r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  150. n = int(r0)
  151. if e1 != 0 {
  152. err = errnoErr(e1)
  153. }
  154. return
  155. }
  156. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  157. func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  158. r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
  159. n = int(r0)
  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 kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
  167. r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
  168. n = int(r0)
  169. if e1 != 0 {
  170. err = errnoErr(e1)
  171. }
  172. return
  173. }
  174. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  175. func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
  176. var _p0 unsafe.Pointer
  177. if len(mib) > 0 {
  178. _p0 = unsafe.Pointer(&mib[0])
  179. } else {
  180. _p0 = unsafe.Pointer(&_zero)
  181. }
  182. _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
  183. if e1 != 0 {
  184. err = errnoErr(e1)
  185. }
  186. return
  187. }
  188. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  189. func utimes(path string, timeval *[2]Timeval) (err error) {
  190. var _p0 *byte
  191. _p0, err = BytePtrFromString(path)
  192. if err != nil {
  193. return
  194. }
  195. _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
  196. if e1 != 0 {
  197. err = errnoErr(e1)
  198. }
  199. return
  200. }
  201. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  202. func futimes(fd int, timeval *[2]Timeval) (err error) {
  203. _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
  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 fcntl(fd int, cmd int, arg int) (val int, err error) {
  211. r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
  212. val = int(r0)
  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 poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
  220. r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
  221. n = int(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 Madvise(b []byte, behav int) (err error) {
  229. var _p0 unsafe.Pointer
  230. if len(b) > 0 {
  231. _p0 = unsafe.Pointer(&b[0])
  232. } else {
  233. _p0 = unsafe.Pointer(&_zero)
  234. }
  235. _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
  236. if e1 != 0 {
  237. err = errnoErr(e1)
  238. }
  239. return
  240. }
  241. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  242. func Mlock(b []byte) (err error) {
  243. var _p0 unsafe.Pointer
  244. if len(b) > 0 {
  245. _p0 = unsafe.Pointer(&b[0])
  246. } else {
  247. _p0 = unsafe.Pointer(&_zero)
  248. }
  249. _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
  250. if e1 != 0 {
  251. err = errnoErr(e1)
  252. }
  253. return
  254. }
  255. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  256. func Mlockall(flags int) (err error) {
  257. _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
  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 Mprotect(b []byte, prot int) (err error) {
  265. var _p0 unsafe.Pointer
  266. if len(b) > 0 {
  267. _p0 = unsafe.Pointer(&b[0])
  268. } else {
  269. _p0 = unsafe.Pointer(&_zero)
  270. }
  271. _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
  272. if e1 != 0 {
  273. err = errnoErr(e1)
  274. }
  275. return
  276. }
  277. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  278. func Msync(b []byte, flags int) (err error) {
  279. var _p0 unsafe.Pointer
  280. if len(b) > 0 {
  281. _p0 = unsafe.Pointer(&b[0])
  282. } else {
  283. _p0 = unsafe.Pointer(&_zero)
  284. }
  285. _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
  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 Munlock(b []byte) (err error) {
  293. var _p0 unsafe.Pointer
  294. if len(b) > 0 {
  295. _p0 = unsafe.Pointer(&b[0])
  296. } else {
  297. _p0 = unsafe.Pointer(&_zero)
  298. }
  299. _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
  300. if e1 != 0 {
  301. err = errnoErr(e1)
  302. }
  303. return
  304. }
  305. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  306. func Munlockall() (err error) {
  307. _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
  308. if e1 != 0 {
  309. err = errnoErr(e1)
  310. }
  311. return
  312. }
  313. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  314. func pipe(p *[2]_C_int) (err error) {
  315. _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
  316. if e1 != 0 {
  317. err = errnoErr(e1)
  318. }
  319. return
  320. }
  321. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  322. func getdents(fd int, buf []byte) (n int, err error) {
  323. var _p0 unsafe.Pointer
  324. if len(buf) > 0 {
  325. _p0 = unsafe.Pointer(&buf[0])
  326. } else {
  327. _p0 = unsafe.Pointer(&_zero)
  328. }
  329. r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
  330. n = int(r0)
  331. if e1 != 0 {
  332. err = errnoErr(e1)
  333. }
  334. return
  335. }
  336. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  337. func Getcwd(buf []byte) (n int, err error) {
  338. var _p0 unsafe.Pointer
  339. if len(buf) > 0 {
  340. _p0 = unsafe.Pointer(&buf[0])
  341. } else {
  342. _p0 = unsafe.Pointer(&_zero)
  343. }
  344. r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
  345. n = int(r0)
  346. if e1 != 0 {
  347. err = errnoErr(e1)
  348. }
  349. return
  350. }
  351. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  352. func ioctl(fd int, req uint, arg uintptr) (err error) {
  353. _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
  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 Access(path string, mode uint32) (err error) {
  361. var _p0 *byte
  362. _p0, err = BytePtrFromString(path)
  363. if err != nil {
  364. return
  365. }
  366. _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  367. if e1 != 0 {
  368. err = errnoErr(e1)
  369. }
  370. return
  371. }
  372. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  373. func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
  374. _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
  375. if e1 != 0 {
  376. err = errnoErr(e1)
  377. }
  378. return
  379. }
  380. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  381. func Chdir(path string) (err error) {
  382. var _p0 *byte
  383. _p0, err = BytePtrFromString(path)
  384. if err != nil {
  385. return
  386. }
  387. _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
  388. if e1 != 0 {
  389. err = errnoErr(e1)
  390. }
  391. return
  392. }
  393. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  394. func Chflags(path string, flags int) (err error) {
  395. var _p0 *byte
  396. _p0, err = BytePtrFromString(path)
  397. if err != nil {
  398. return
  399. }
  400. _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  401. if e1 != 0 {
  402. err = errnoErr(e1)
  403. }
  404. return
  405. }
  406. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  407. func Chmod(path string, mode uint32) (err error) {
  408. var _p0 *byte
  409. _p0, err = BytePtrFromString(path)
  410. if err != nil {
  411. return
  412. }
  413. _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  414. if e1 != 0 {
  415. err = errnoErr(e1)
  416. }
  417. return
  418. }
  419. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  420. func Chown(path string, uid int, gid int) (err error) {
  421. var _p0 *byte
  422. _p0, err = BytePtrFromString(path)
  423. if err != nil {
  424. return
  425. }
  426. _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  427. if e1 != 0 {
  428. err = errnoErr(e1)
  429. }
  430. return
  431. }
  432. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  433. func Chroot(path string) (err error) {
  434. var _p0 *byte
  435. _p0, err = BytePtrFromString(path)
  436. if err != nil {
  437. return
  438. }
  439. _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
  440. if e1 != 0 {
  441. err = errnoErr(e1)
  442. }
  443. return
  444. }
  445. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  446. func Close(fd int) (err error) {
  447. _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
  448. if e1 != 0 {
  449. err = errnoErr(e1)
  450. }
  451. return
  452. }
  453. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  454. func Dup(fd int) (nfd int, err error) {
  455. r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
  456. nfd = int(r0)
  457. if e1 != 0 {
  458. err = errnoErr(e1)
  459. }
  460. return
  461. }
  462. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  463. func Dup2(from int, to int) (err error) {
  464. _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
  465. if e1 != 0 {
  466. err = errnoErr(e1)
  467. }
  468. return
  469. }
  470. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  471. func Exit(code int) {
  472. Syscall(SYS_EXIT, uintptr(code), 0, 0)
  473. return
  474. }
  475. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  476. func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
  477. var _p0 *byte
  478. _p0, err = BytePtrFromString(path)
  479. if err != nil {
  480. return
  481. }
  482. _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
  483. if e1 != 0 {
  484. err = errnoErr(e1)
  485. }
  486. return
  487. }
  488. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  489. func Fchdir(fd int) (err error) {
  490. _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
  491. if e1 != 0 {
  492. err = errnoErr(e1)
  493. }
  494. return
  495. }
  496. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  497. func Fchflags(fd int, flags int) (err error) {
  498. _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
  499. if e1 != 0 {
  500. err = errnoErr(e1)
  501. }
  502. return
  503. }
  504. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  505. func Fchmod(fd int, mode uint32) (err error) {
  506. _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
  507. if e1 != 0 {
  508. err = errnoErr(e1)
  509. }
  510. return
  511. }
  512. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  513. func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
  514. var _p0 *byte
  515. _p0, err = BytePtrFromString(path)
  516. if err != nil {
  517. return
  518. }
  519. _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
  520. if e1 != 0 {
  521. err = errnoErr(e1)
  522. }
  523. return
  524. }
  525. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  526. func Fchown(fd int, uid int, gid int) (err error) {
  527. _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
  528. if e1 != 0 {
  529. err = errnoErr(e1)
  530. }
  531. return
  532. }
  533. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  534. func Flock(fd int, how int) (err error) {
  535. _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
  536. if e1 != 0 {
  537. err = errnoErr(e1)
  538. }
  539. return
  540. }
  541. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  542. func Fpathconf(fd int, name int) (val int, err error) {
  543. r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
  544. val = int(r0)
  545. if e1 != 0 {
  546. err = errnoErr(e1)
  547. }
  548. return
  549. }
  550. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  551. func Fstat(fd int, stat *Stat_t) (err error) {
  552. _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  553. if e1 != 0 {
  554. err = errnoErr(e1)
  555. }
  556. return
  557. }
  558. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  559. func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
  560. var _p0 *byte
  561. _p0, err = BytePtrFromString(path)
  562. if err != nil {
  563. return
  564. }
  565. _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
  566. if e1 != 0 {
  567. err = errnoErr(e1)
  568. }
  569. return
  570. }
  571. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  572. func Fstatfs(fd int, stat *Statfs_t) (err error) {
  573. _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  574. if e1 != 0 {
  575. err = errnoErr(e1)
  576. }
  577. return
  578. }
  579. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  580. func Fsync(fd int) (err error) {
  581. _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
  582. if e1 != 0 {
  583. err = errnoErr(e1)
  584. }
  585. return
  586. }
  587. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  588. func Ftruncate(fd int, length int64) (err error) {
  589. _, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0)
  590. if e1 != 0 {
  591. err = errnoErr(e1)
  592. }
  593. return
  594. }
  595. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  596. func Getegid() (egid int) {
  597. r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
  598. egid = int(r0)
  599. return
  600. }
  601. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  602. func Geteuid() (uid int) {
  603. r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
  604. uid = int(r0)
  605. return
  606. }
  607. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  608. func Getgid() (gid int) {
  609. r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
  610. gid = int(r0)
  611. return
  612. }
  613. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  614. func Getpgid(pid int) (pgid int, err error) {
  615. r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
  616. pgid = int(r0)
  617. if e1 != 0 {
  618. err = errnoErr(e1)
  619. }
  620. return
  621. }
  622. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  623. func Getpgrp() (pgrp int) {
  624. r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
  625. pgrp = int(r0)
  626. return
  627. }
  628. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  629. func Getpid() (pid int) {
  630. r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
  631. pid = int(r0)
  632. return
  633. }
  634. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  635. func Getppid() (ppid int) {
  636. r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
  637. ppid = int(r0)
  638. return
  639. }
  640. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  641. func Getpriority(which int, who int) (prio int, err error) {
  642. r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
  643. prio = int(r0)
  644. if e1 != 0 {
  645. err = errnoErr(e1)
  646. }
  647. return
  648. }
  649. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  650. func Getrlimit(which int, lim *Rlimit) (err error) {
  651. _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
  652. if e1 != 0 {
  653. err = errnoErr(e1)
  654. }
  655. return
  656. }
  657. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  658. func Getrtable() (rtable int, err error) {
  659. r0, _, e1 := RawSyscall(SYS_GETRTABLE, 0, 0, 0)
  660. rtable = int(r0)
  661. if e1 != 0 {
  662. err = errnoErr(e1)
  663. }
  664. return
  665. }
  666. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  667. func Getrusage(who int, rusage *Rusage) (err error) {
  668. _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
  669. if e1 != 0 {
  670. err = errnoErr(e1)
  671. }
  672. return
  673. }
  674. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  675. func Getsid(pid int) (sid int, err error) {
  676. r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
  677. sid = int(r0)
  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 Gettimeofday(tv *Timeval) (err error) {
  685. _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
  686. if e1 != 0 {
  687. err = errnoErr(e1)
  688. }
  689. return
  690. }
  691. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  692. func Getuid() (uid int) {
  693. r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
  694. uid = int(r0)
  695. return
  696. }
  697. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  698. func Issetugid() (tainted bool) {
  699. r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
  700. tainted = bool(r0 != 0)
  701. return
  702. }
  703. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  704. func Kill(pid int, signum syscall.Signal) (err error) {
  705. _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
  706. if e1 != 0 {
  707. err = errnoErr(e1)
  708. }
  709. return
  710. }
  711. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  712. func Kqueue() (fd int, err error) {
  713. r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
  714. fd = int(r0)
  715. if e1 != 0 {
  716. err = errnoErr(e1)
  717. }
  718. return
  719. }
  720. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  721. func Lchown(path string, uid int, gid int) (err error) {
  722. var _p0 *byte
  723. _p0, err = BytePtrFromString(path)
  724. if err != nil {
  725. return
  726. }
  727. _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  728. if e1 != 0 {
  729. err = errnoErr(e1)
  730. }
  731. return
  732. }
  733. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  734. func Link(path string, link string) (err error) {
  735. var _p0 *byte
  736. _p0, err = BytePtrFromString(path)
  737. if err != nil {
  738. return
  739. }
  740. var _p1 *byte
  741. _p1, err = BytePtrFromString(link)
  742. if err != nil {
  743. return
  744. }
  745. _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  746. if e1 != 0 {
  747. err = errnoErr(e1)
  748. }
  749. return
  750. }
  751. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  752. func Listen(s int, backlog int) (err error) {
  753. _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
  754. if e1 != 0 {
  755. err = errnoErr(e1)
  756. }
  757. return
  758. }
  759. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  760. func Lstat(path string, stat *Stat_t) (err error) {
  761. var _p0 *byte
  762. _p0, err = BytePtrFromString(path)
  763. if err != nil {
  764. return
  765. }
  766. _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  767. if e1 != 0 {
  768. err = errnoErr(e1)
  769. }
  770. return
  771. }
  772. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  773. func Mkdir(path string, mode uint32) (err error) {
  774. var _p0 *byte
  775. _p0, err = BytePtrFromString(path)
  776. if err != nil {
  777. return
  778. }
  779. _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  780. if e1 != 0 {
  781. err = errnoErr(e1)
  782. }
  783. return
  784. }
  785. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  786. func Mkfifo(path string, mode uint32) (err error) {
  787. var _p0 *byte
  788. _p0, err = BytePtrFromString(path)
  789. if err != nil {
  790. return
  791. }
  792. _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  793. if e1 != 0 {
  794. err = errnoErr(e1)
  795. }
  796. return
  797. }
  798. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  799. func Mknod(path string, mode uint32, dev int) (err error) {
  800. var _p0 *byte
  801. _p0, err = BytePtrFromString(path)
  802. if err != nil {
  803. return
  804. }
  805. _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
  806. if e1 != 0 {
  807. err = errnoErr(e1)
  808. }
  809. return
  810. }
  811. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  812. func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
  813. _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
  814. if e1 != 0 {
  815. err = errnoErr(e1)
  816. }
  817. return
  818. }
  819. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  820. func Open(path string, mode int, perm uint32) (fd int, err error) {
  821. var _p0 *byte
  822. _p0, err = BytePtrFromString(path)
  823. if err != nil {
  824. return
  825. }
  826. r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
  827. fd = int(r0)
  828. if e1 != 0 {
  829. err = errnoErr(e1)
  830. }
  831. return
  832. }
  833. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  834. func Pathconf(path string, name int) (val int, err error) {
  835. var _p0 *byte
  836. _p0, err = BytePtrFromString(path)
  837. if err != nil {
  838. return
  839. }
  840. r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
  841. val = int(r0)
  842. if e1 != 0 {
  843. err = errnoErr(e1)
  844. }
  845. return
  846. }
  847. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  848. func Pread(fd int, p []byte, offset int64) (n int, err error) {
  849. var _p0 unsafe.Pointer
  850. if len(p) > 0 {
  851. _p0 = unsafe.Pointer(&p[0])
  852. } else {
  853. _p0 = unsafe.Pointer(&_zero)
  854. }
  855. r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
  856. n = 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 Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  864. var _p0 unsafe.Pointer
  865. if len(p) > 0 {
  866. _p0 = unsafe.Pointer(&p[0])
  867. } else {
  868. _p0 = unsafe.Pointer(&_zero)
  869. }
  870. r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
  871. n = int(r0)
  872. if e1 != 0 {
  873. err = errnoErr(e1)
  874. }
  875. return
  876. }
  877. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  878. func read(fd int, p []byte) (n int, err error) {
  879. var _p0 unsafe.Pointer
  880. if len(p) > 0 {
  881. _p0 = unsafe.Pointer(&p[0])
  882. } else {
  883. _p0 = unsafe.Pointer(&_zero)
  884. }
  885. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  886. n = int(r0)
  887. if e1 != 0 {
  888. err = errnoErr(e1)
  889. }
  890. return
  891. }
  892. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  893. func Readlink(path string, buf []byte) (n int, err error) {
  894. var _p0 *byte
  895. _p0, err = BytePtrFromString(path)
  896. if err != nil {
  897. return
  898. }
  899. var _p1 unsafe.Pointer
  900. if len(buf) > 0 {
  901. _p1 = unsafe.Pointer(&buf[0])
  902. } else {
  903. _p1 = unsafe.Pointer(&_zero)
  904. }
  905. r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
  906. n = int(r0)
  907. if e1 != 0 {
  908. err = errnoErr(e1)
  909. }
  910. return
  911. }
  912. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  913. func Rename(from string, to string) (err error) {
  914. var _p0 *byte
  915. _p0, err = BytePtrFromString(from)
  916. if err != nil {
  917. return
  918. }
  919. var _p1 *byte
  920. _p1, err = BytePtrFromString(to)
  921. if err != nil {
  922. return
  923. }
  924. _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  925. if e1 != 0 {
  926. err = errnoErr(e1)
  927. }
  928. return
  929. }
  930. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  931. func Revoke(path string) (err error) {
  932. var _p0 *byte
  933. _p0, err = BytePtrFromString(path)
  934. if err != nil {
  935. return
  936. }
  937. _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
  938. if e1 != 0 {
  939. err = errnoErr(e1)
  940. }
  941. return
  942. }
  943. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  944. func Rmdir(path string) (err error) {
  945. var _p0 *byte
  946. _p0, err = BytePtrFromString(path)
  947. if err != nil {
  948. return
  949. }
  950. _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
  951. if e1 != 0 {
  952. err = errnoErr(e1)
  953. }
  954. return
  955. }
  956. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  957. func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
  958. r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0)
  959. newoffset = int64(int64(r1)<<32 | int64(r0))
  960. if e1 != 0 {
  961. err = errnoErr(e1)
  962. }
  963. return
  964. }
  965. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  966. func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
  967. _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
  968. if e1 != 0 {
  969. err = errnoErr(e1)
  970. }
  971. return
  972. }
  973. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  974. func Setegid(egid int) (err error) {
  975. _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
  976. if e1 != 0 {
  977. err = errnoErr(e1)
  978. }
  979. return
  980. }
  981. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  982. func Seteuid(euid int) (err error) {
  983. _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
  984. if e1 != 0 {
  985. err = errnoErr(e1)
  986. }
  987. return
  988. }
  989. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  990. func Setgid(gid int) (err error) {
  991. _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
  992. if e1 != 0 {
  993. err = errnoErr(e1)
  994. }
  995. return
  996. }
  997. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  998. func Setlogin(name string) (err error) {
  999. var _p0 *byte
  1000. _p0, err = BytePtrFromString(name)
  1001. if err != nil {
  1002. return
  1003. }
  1004. _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1005. if e1 != 0 {
  1006. err = errnoErr(e1)
  1007. }
  1008. return
  1009. }
  1010. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1011. func Setpgid(pid int, pgid int) (err error) {
  1012. _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
  1013. if e1 != 0 {
  1014. err = errnoErr(e1)
  1015. }
  1016. return
  1017. }
  1018. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1019. func Setpriority(which int, who int, prio int) (err error) {
  1020. _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
  1021. if e1 != 0 {
  1022. err = errnoErr(e1)
  1023. }
  1024. return
  1025. }
  1026. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1027. func Setregid(rgid int, egid int) (err error) {
  1028. _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
  1029. if e1 != 0 {
  1030. err = errnoErr(e1)
  1031. }
  1032. return
  1033. }
  1034. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1035. func Setreuid(ruid int, euid int) (err error) {
  1036. _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
  1037. if e1 != 0 {
  1038. err = errnoErr(e1)
  1039. }
  1040. return
  1041. }
  1042. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1043. func Setresgid(rgid int, egid int, sgid int) (err error) {
  1044. _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
  1045. if e1 != 0 {
  1046. err = errnoErr(e1)
  1047. }
  1048. return
  1049. }
  1050. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1051. func Setresuid(ruid int, euid int, suid int) (err error) {
  1052. _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
  1053. if e1 != 0 {
  1054. err = errnoErr(e1)
  1055. }
  1056. return
  1057. }
  1058. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1059. func Setrlimit(which int, lim *Rlimit) (err error) {
  1060. _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
  1061. if e1 != 0 {
  1062. err = errnoErr(e1)
  1063. }
  1064. return
  1065. }
  1066. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1067. func Setrtable(rtable int) (err error) {
  1068. _, _, e1 := RawSyscall(SYS_SETRTABLE, uintptr(rtable), 0, 0)
  1069. if e1 != 0 {
  1070. err = errnoErr(e1)
  1071. }
  1072. return
  1073. }
  1074. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1075. func Setsid() (pid int, err error) {
  1076. r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
  1077. pid = int(r0)
  1078. if e1 != 0 {
  1079. err = errnoErr(e1)
  1080. }
  1081. return
  1082. }
  1083. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1084. func Settimeofday(tp *Timeval) (err error) {
  1085. _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
  1086. if e1 != 0 {
  1087. err = errnoErr(e1)
  1088. }
  1089. return
  1090. }
  1091. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1092. func Setuid(uid int) (err error) {
  1093. _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
  1094. if e1 != 0 {
  1095. err = errnoErr(e1)
  1096. }
  1097. return
  1098. }
  1099. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1100. func Stat(path string, stat *Stat_t) (err error) {
  1101. var _p0 *byte
  1102. _p0, err = BytePtrFromString(path)
  1103. if err != nil {
  1104. return
  1105. }
  1106. _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1107. if e1 != 0 {
  1108. err = errnoErr(e1)
  1109. }
  1110. return
  1111. }
  1112. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1113. func Statfs(path string, stat *Statfs_t) (err error) {
  1114. var _p0 *byte
  1115. _p0, err = BytePtrFromString(path)
  1116. if err != nil {
  1117. return
  1118. }
  1119. _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1120. if e1 != 0 {
  1121. err = errnoErr(e1)
  1122. }
  1123. return
  1124. }
  1125. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1126. func Symlink(path string, link string) (err error) {
  1127. var _p0 *byte
  1128. _p0, err = BytePtrFromString(path)
  1129. if err != nil {
  1130. return
  1131. }
  1132. var _p1 *byte
  1133. _p1, err = BytePtrFromString(link)
  1134. if err != nil {
  1135. return
  1136. }
  1137. _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1138. if e1 != 0 {
  1139. err = errnoErr(e1)
  1140. }
  1141. return
  1142. }
  1143. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1144. func Sync() (err error) {
  1145. _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
  1146. if e1 != 0 {
  1147. err = errnoErr(e1)
  1148. }
  1149. return
  1150. }
  1151. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1152. func Truncate(path string, length int64) (err error) {
  1153. var _p0 *byte
  1154. _p0, err = BytePtrFromString(path)
  1155. if err != nil {
  1156. return
  1157. }
  1158. _, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)
  1159. if e1 != 0 {
  1160. err = errnoErr(e1)
  1161. }
  1162. return
  1163. }
  1164. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1165. func Umask(newmask int) (oldmask int) {
  1166. r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
  1167. oldmask = int(r0)
  1168. return
  1169. }
  1170. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1171. func Unlink(path string) (err error) {
  1172. var _p0 *byte
  1173. _p0, err = BytePtrFromString(path)
  1174. if err != nil {
  1175. return
  1176. }
  1177. _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1178. if e1 != 0 {
  1179. err = errnoErr(e1)
  1180. }
  1181. return
  1182. }
  1183. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1184. func Unmount(path string, flags int) (err error) {
  1185. var _p0 *byte
  1186. _p0, err = BytePtrFromString(path)
  1187. if err != nil {
  1188. return
  1189. }
  1190. _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  1191. if e1 != 0 {
  1192. err = errnoErr(e1)
  1193. }
  1194. return
  1195. }
  1196. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1197. func write(fd int, p []byte) (n int, err error) {
  1198. var _p0 unsafe.Pointer
  1199. if len(p) > 0 {
  1200. _p0 = unsafe.Pointer(&p[0])
  1201. } else {
  1202. _p0 = unsafe.Pointer(&_zero)
  1203. }
  1204. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1205. n = int(r0)
  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 mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
  1213. r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0)
  1214. ret = uintptr(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 munmap(addr uintptr, length uintptr) (err error) {
  1222. _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
  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 readlen(fd int, buf *byte, nbuf int) (n int, err error) {
  1230. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1231. n = int(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 writelen(fd int, buf *byte, nbuf int) (n int, err error) {
  1239. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1240. n = int(r0)
  1241. if e1 != 0 {
  1242. err = errnoErr(e1)
  1243. }
  1244. return
  1245. }
  1246. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1247. func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
  1248. var _p0 *byte
  1249. _p0, err = BytePtrFromString(path)
  1250. if err != nil {
  1251. return
  1252. }
  1253. _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
  1254. if e1 != 0 {
  1255. err = errnoErr(e1)
  1256. }
  1257. return
  1258. }