zsyscall_dragonfly_amd64.go 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413
  1. // mksyscall.pl -dragonfly syscall_bsd.go syscall_dragonfly.go syscall_dragonfly_amd64.go
  2. // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
  3. // +build amd64,dragonfly
  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. use(_p0)
  184. if e1 != 0 {
  185. err = errnoErr(e1)
  186. }
  187. return
  188. }
  189. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  190. func utimes(path string, timeval *[2]Timeval) (err error) {
  191. var _p0 *byte
  192. _p0, err = BytePtrFromString(path)
  193. if err != nil {
  194. return
  195. }
  196. _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
  197. use(unsafe.Pointer(_p0))
  198. if e1 != 0 {
  199. err = errnoErr(e1)
  200. }
  201. return
  202. }
  203. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  204. func futimes(fd int, timeval *[2]Timeval) (err error) {
  205. _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
  206. if e1 != 0 {
  207. err = errnoErr(e1)
  208. }
  209. return
  210. }
  211. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  212. func fcntl(fd int, cmd int, arg int) (val int, err error) {
  213. r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
  214. val = int(r0)
  215. if e1 != 0 {
  216. err = errnoErr(e1)
  217. }
  218. return
  219. }
  220. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  221. func pipe() (r int, w int, err error) {
  222. r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
  223. r = int(r0)
  224. w = int(r1)
  225. if e1 != 0 {
  226. err = errnoErr(e1)
  227. }
  228. return
  229. }
  230. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  231. func extpread(fd int, p []byte, flags int, offset int64) (n int, err error) {
  232. var _p0 unsafe.Pointer
  233. if len(p) > 0 {
  234. _p0 = unsafe.Pointer(&p[0])
  235. } else {
  236. _p0 = unsafe.Pointer(&_zero)
  237. }
  238. r0, _, e1 := Syscall6(SYS_EXTPREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(offset), 0)
  239. n = 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 extpwrite(fd int, p []byte, flags int, offset int64) (n int, err error) {
  247. var _p0 unsafe.Pointer
  248. if len(p) > 0 {
  249. _p0 = unsafe.Pointer(&p[0])
  250. } else {
  251. _p0 = unsafe.Pointer(&_zero)
  252. }
  253. r0, _, e1 := Syscall6(SYS_EXTPWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(offset), 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 Access(path string, mode uint32) (err error) {
  262. var _p0 *byte
  263. _p0, err = BytePtrFromString(path)
  264. if err != nil {
  265. return
  266. }
  267. _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  268. use(unsafe.Pointer(_p0))
  269. if e1 != 0 {
  270. err = errnoErr(e1)
  271. }
  272. return
  273. }
  274. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  275. func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
  276. _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
  277. if e1 != 0 {
  278. err = errnoErr(e1)
  279. }
  280. return
  281. }
  282. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  283. func Chdir(path string) (err error) {
  284. var _p0 *byte
  285. _p0, err = BytePtrFromString(path)
  286. if err != nil {
  287. return
  288. }
  289. _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
  290. use(unsafe.Pointer(_p0))
  291. if e1 != 0 {
  292. err = errnoErr(e1)
  293. }
  294. return
  295. }
  296. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  297. func Chflags(path string, flags int) (err error) {
  298. var _p0 *byte
  299. _p0, err = BytePtrFromString(path)
  300. if err != nil {
  301. return
  302. }
  303. _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  304. use(unsafe.Pointer(_p0))
  305. if e1 != 0 {
  306. err = errnoErr(e1)
  307. }
  308. return
  309. }
  310. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  311. func Chmod(path string, mode uint32) (err error) {
  312. var _p0 *byte
  313. _p0, err = BytePtrFromString(path)
  314. if err != nil {
  315. return
  316. }
  317. _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  318. use(unsafe.Pointer(_p0))
  319. if e1 != 0 {
  320. err = errnoErr(e1)
  321. }
  322. return
  323. }
  324. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  325. func Chown(path string, uid int, gid int) (err error) {
  326. var _p0 *byte
  327. _p0, err = BytePtrFromString(path)
  328. if err != nil {
  329. return
  330. }
  331. _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  332. use(unsafe.Pointer(_p0))
  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 Chroot(path string) (err error) {
  340. var _p0 *byte
  341. _p0, err = BytePtrFromString(path)
  342. if err != nil {
  343. return
  344. }
  345. _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
  346. use(unsafe.Pointer(_p0))
  347. if e1 != 0 {
  348. err = errnoErr(e1)
  349. }
  350. return
  351. }
  352. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  353. func Close(fd int) (err error) {
  354. _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
  355. if e1 != 0 {
  356. err = errnoErr(e1)
  357. }
  358. return
  359. }
  360. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  361. func Dup(fd int) (nfd int, err error) {
  362. r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
  363. nfd = int(r0)
  364. if e1 != 0 {
  365. err = errnoErr(e1)
  366. }
  367. return
  368. }
  369. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  370. func Dup2(from int, to int) (err error) {
  371. _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
  372. if e1 != 0 {
  373. err = errnoErr(e1)
  374. }
  375. return
  376. }
  377. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  378. func Exit(code int) {
  379. Syscall(SYS_EXIT, uintptr(code), 0, 0)
  380. return
  381. }
  382. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  383. func Fchdir(fd int) (err error) {
  384. _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
  385. if e1 != 0 {
  386. err = errnoErr(e1)
  387. }
  388. return
  389. }
  390. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  391. func Fchflags(fd int, flags int) (err error) {
  392. _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
  393. if e1 != 0 {
  394. err = errnoErr(e1)
  395. }
  396. return
  397. }
  398. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  399. func Fchmod(fd int, mode uint32) (err error) {
  400. _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 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 Fchown(fd int, uid int, gid int) (err error) {
  408. _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
  409. if e1 != 0 {
  410. err = errnoErr(e1)
  411. }
  412. return
  413. }
  414. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  415. func Flock(fd int, how int) (err error) {
  416. _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 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 Fpathconf(fd int, name int) (val int, err error) {
  424. r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
  425. val = int(r0)
  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 Fstat(fd int, stat *Stat_t) (err error) {
  433. _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  434. if e1 != 0 {
  435. err = errnoErr(e1)
  436. }
  437. return
  438. }
  439. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  440. func Fstatfs(fd int, stat *Statfs_t) (err error) {
  441. _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
  442. if e1 != 0 {
  443. err = errnoErr(e1)
  444. }
  445. return
  446. }
  447. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  448. func Fsync(fd int) (err error) {
  449. _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
  450. if e1 != 0 {
  451. err = errnoErr(e1)
  452. }
  453. return
  454. }
  455. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  456. func Ftruncate(fd int, length int64) (err error) {
  457. _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length))
  458. if e1 != 0 {
  459. err = errnoErr(e1)
  460. }
  461. return
  462. }
  463. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  464. func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
  465. var _p0 unsafe.Pointer
  466. if len(buf) > 0 {
  467. _p0 = unsafe.Pointer(&buf[0])
  468. } else {
  469. _p0 = unsafe.Pointer(&_zero)
  470. }
  471. r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
  472. n = int(r0)
  473. if e1 != 0 {
  474. err = errnoErr(e1)
  475. }
  476. return
  477. }
  478. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  479. func Getdtablesize() (size int) {
  480. r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
  481. size = int(r0)
  482. return
  483. }
  484. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  485. func Getegid() (egid int) {
  486. r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
  487. egid = int(r0)
  488. return
  489. }
  490. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  491. func Geteuid() (uid int) {
  492. r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
  493. uid = int(r0)
  494. return
  495. }
  496. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  497. func Getgid() (gid int) {
  498. r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
  499. gid = int(r0)
  500. return
  501. }
  502. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  503. func Getpgid(pid int) (pgid int, err error) {
  504. r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
  505. pgid = int(r0)
  506. if e1 != 0 {
  507. err = errnoErr(e1)
  508. }
  509. return
  510. }
  511. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  512. func Getpgrp() (pgrp int) {
  513. r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
  514. pgrp = int(r0)
  515. return
  516. }
  517. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  518. func Getpid() (pid int) {
  519. r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
  520. pid = int(r0)
  521. return
  522. }
  523. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  524. func Getppid() (ppid int) {
  525. r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
  526. ppid = int(r0)
  527. return
  528. }
  529. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  530. func Getpriority(which int, who int) (prio int, err error) {
  531. r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
  532. prio = 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 Getrlimit(which int, lim *Rlimit) (err error) {
  540. _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
  541. if e1 != 0 {
  542. err = errnoErr(e1)
  543. }
  544. return
  545. }
  546. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  547. func Getrusage(who int, rusage *Rusage) (err error) {
  548. _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
  549. if e1 != 0 {
  550. err = errnoErr(e1)
  551. }
  552. return
  553. }
  554. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  555. func Getsid(pid int) (sid int, err error) {
  556. r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
  557. sid = int(r0)
  558. if e1 != 0 {
  559. err = errnoErr(e1)
  560. }
  561. return
  562. }
  563. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  564. func Gettimeofday(tv *Timeval) (err error) {
  565. _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 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 Getuid() (uid int) {
  573. r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
  574. uid = int(r0)
  575. return
  576. }
  577. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  578. func Issetugid() (tainted bool) {
  579. r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
  580. tainted = bool(r0 != 0)
  581. return
  582. }
  583. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  584. func Kill(pid int, signum syscall.Signal) (err error) {
  585. _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
  586. if e1 != 0 {
  587. err = errnoErr(e1)
  588. }
  589. return
  590. }
  591. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  592. func Kqueue() (fd int, err error) {
  593. r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
  594. fd = int(r0)
  595. if e1 != 0 {
  596. err = errnoErr(e1)
  597. }
  598. return
  599. }
  600. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  601. func Lchown(path string, uid int, gid int) (err error) {
  602. var _p0 *byte
  603. _p0, err = BytePtrFromString(path)
  604. if err != nil {
  605. return
  606. }
  607. _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
  608. use(unsafe.Pointer(_p0))
  609. if e1 != 0 {
  610. err = errnoErr(e1)
  611. }
  612. return
  613. }
  614. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  615. func Link(path string, link string) (err error) {
  616. var _p0 *byte
  617. _p0, err = BytePtrFromString(path)
  618. if err != nil {
  619. return
  620. }
  621. var _p1 *byte
  622. _p1, err = BytePtrFromString(link)
  623. if err != nil {
  624. return
  625. }
  626. _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  627. use(unsafe.Pointer(_p0))
  628. use(unsafe.Pointer(_p1))
  629. if e1 != 0 {
  630. err = errnoErr(e1)
  631. }
  632. return
  633. }
  634. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  635. func Listen(s int, backlog int) (err error) {
  636. _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
  637. if e1 != 0 {
  638. err = errnoErr(e1)
  639. }
  640. return
  641. }
  642. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  643. func Lstat(path string, stat *Stat_t) (err error) {
  644. var _p0 *byte
  645. _p0, err = BytePtrFromString(path)
  646. if err != nil {
  647. return
  648. }
  649. _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  650. use(unsafe.Pointer(_p0))
  651. if e1 != 0 {
  652. err = errnoErr(e1)
  653. }
  654. return
  655. }
  656. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  657. func Mkdir(path string, mode uint32) (err error) {
  658. var _p0 *byte
  659. _p0, err = BytePtrFromString(path)
  660. if err != nil {
  661. return
  662. }
  663. _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  664. use(unsafe.Pointer(_p0))
  665. if e1 != 0 {
  666. err = errnoErr(e1)
  667. }
  668. return
  669. }
  670. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  671. func Mkfifo(path string, mode uint32) (err error) {
  672. var _p0 *byte
  673. _p0, err = BytePtrFromString(path)
  674. if err != nil {
  675. return
  676. }
  677. _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
  678. use(unsafe.Pointer(_p0))
  679. if e1 != 0 {
  680. err = errnoErr(e1)
  681. }
  682. return
  683. }
  684. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  685. func Mknod(path string, mode uint32, dev int) (err error) {
  686. var _p0 *byte
  687. _p0, err = BytePtrFromString(path)
  688. if err != nil {
  689. return
  690. }
  691. _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
  692. use(unsafe.Pointer(_p0))
  693. if e1 != 0 {
  694. err = errnoErr(e1)
  695. }
  696. return
  697. }
  698. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  699. func Mlock(b []byte) (err error) {
  700. var _p0 unsafe.Pointer
  701. if len(b) > 0 {
  702. _p0 = unsafe.Pointer(&b[0])
  703. } else {
  704. _p0 = unsafe.Pointer(&_zero)
  705. }
  706. _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
  707. if e1 != 0 {
  708. err = errnoErr(e1)
  709. }
  710. return
  711. }
  712. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  713. func Mlockall(flags int) (err error) {
  714. _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
  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 Mprotect(b []byte, prot int) (err error) {
  722. var _p0 unsafe.Pointer
  723. if len(b) > 0 {
  724. _p0 = unsafe.Pointer(&b[0])
  725. } else {
  726. _p0 = unsafe.Pointer(&_zero)
  727. }
  728. _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
  729. if e1 != 0 {
  730. err = errnoErr(e1)
  731. }
  732. return
  733. }
  734. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  735. func Munlock(b []byte) (err error) {
  736. var _p0 unsafe.Pointer
  737. if len(b) > 0 {
  738. _p0 = unsafe.Pointer(&b[0])
  739. } else {
  740. _p0 = unsafe.Pointer(&_zero)
  741. }
  742. _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
  743. if e1 != 0 {
  744. err = errnoErr(e1)
  745. }
  746. return
  747. }
  748. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  749. func Munlockall() (err error) {
  750. _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
  751. if e1 != 0 {
  752. err = errnoErr(e1)
  753. }
  754. return
  755. }
  756. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  757. func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
  758. _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
  759. if e1 != 0 {
  760. err = errnoErr(e1)
  761. }
  762. return
  763. }
  764. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  765. func Open(path string, mode int, perm uint32) (fd int, err error) {
  766. var _p0 *byte
  767. _p0, err = BytePtrFromString(path)
  768. if err != nil {
  769. return
  770. }
  771. r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
  772. use(unsafe.Pointer(_p0))
  773. fd = int(r0)
  774. if e1 != 0 {
  775. err = errnoErr(e1)
  776. }
  777. return
  778. }
  779. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  780. func Pathconf(path string, name int) (val int, err error) {
  781. var _p0 *byte
  782. _p0, err = BytePtrFromString(path)
  783. if err != nil {
  784. return
  785. }
  786. r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
  787. use(unsafe.Pointer(_p0))
  788. val = int(r0)
  789. if e1 != 0 {
  790. err = errnoErr(e1)
  791. }
  792. return
  793. }
  794. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  795. func read(fd int, p []byte) (n int, err error) {
  796. var _p0 unsafe.Pointer
  797. if len(p) > 0 {
  798. _p0 = unsafe.Pointer(&p[0])
  799. } else {
  800. _p0 = unsafe.Pointer(&_zero)
  801. }
  802. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  803. n = int(r0)
  804. if e1 != 0 {
  805. err = errnoErr(e1)
  806. }
  807. return
  808. }
  809. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  810. func Readlink(path string, buf []byte) (n int, err error) {
  811. var _p0 *byte
  812. _p0, err = BytePtrFromString(path)
  813. if err != nil {
  814. return
  815. }
  816. var _p1 unsafe.Pointer
  817. if len(buf) > 0 {
  818. _p1 = unsafe.Pointer(&buf[0])
  819. } else {
  820. _p1 = unsafe.Pointer(&_zero)
  821. }
  822. r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
  823. use(unsafe.Pointer(_p0))
  824. n = int(r0)
  825. if e1 != 0 {
  826. err = errnoErr(e1)
  827. }
  828. return
  829. }
  830. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  831. func Rename(from string, to string) (err error) {
  832. var _p0 *byte
  833. _p0, err = BytePtrFromString(from)
  834. if err != nil {
  835. return
  836. }
  837. var _p1 *byte
  838. _p1, err = BytePtrFromString(to)
  839. if err != nil {
  840. return
  841. }
  842. _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  843. use(unsafe.Pointer(_p0))
  844. use(unsafe.Pointer(_p1))
  845. if e1 != 0 {
  846. err = errnoErr(e1)
  847. }
  848. return
  849. }
  850. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  851. func Revoke(path string) (err error) {
  852. var _p0 *byte
  853. _p0, err = BytePtrFromString(path)
  854. if err != nil {
  855. return
  856. }
  857. _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
  858. use(unsafe.Pointer(_p0))
  859. if e1 != 0 {
  860. err = errnoErr(e1)
  861. }
  862. return
  863. }
  864. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  865. func Rmdir(path string) (err error) {
  866. var _p0 *byte
  867. _p0, err = BytePtrFromString(path)
  868. if err != nil {
  869. return
  870. }
  871. _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
  872. use(unsafe.Pointer(_p0))
  873. if e1 != 0 {
  874. err = errnoErr(e1)
  875. }
  876. return
  877. }
  878. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  879. func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
  880. r0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0)
  881. newoffset = int64(r0)
  882. if e1 != 0 {
  883. err = errnoErr(e1)
  884. }
  885. return
  886. }
  887. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  888. func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
  889. _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
  890. if e1 != 0 {
  891. err = errnoErr(e1)
  892. }
  893. return
  894. }
  895. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  896. func Setegid(egid int) (err error) {
  897. _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
  898. if e1 != 0 {
  899. err = errnoErr(e1)
  900. }
  901. return
  902. }
  903. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  904. func Seteuid(euid int) (err error) {
  905. _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
  906. if e1 != 0 {
  907. err = errnoErr(e1)
  908. }
  909. return
  910. }
  911. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  912. func Setgid(gid int) (err error) {
  913. _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
  914. if e1 != 0 {
  915. err = errnoErr(e1)
  916. }
  917. return
  918. }
  919. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  920. func Setlogin(name string) (err error) {
  921. var _p0 *byte
  922. _p0, err = BytePtrFromString(name)
  923. if err != nil {
  924. return
  925. }
  926. _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
  927. use(unsafe.Pointer(_p0))
  928. if e1 != 0 {
  929. err = errnoErr(e1)
  930. }
  931. return
  932. }
  933. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  934. func Setpgid(pid int, pgid int) (err error) {
  935. _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
  936. if e1 != 0 {
  937. err = errnoErr(e1)
  938. }
  939. return
  940. }
  941. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  942. func Setpriority(which int, who int, prio int) (err error) {
  943. _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
  944. if e1 != 0 {
  945. err = errnoErr(e1)
  946. }
  947. return
  948. }
  949. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  950. func Setregid(rgid int, egid int) (err error) {
  951. _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
  952. if e1 != 0 {
  953. err = errnoErr(e1)
  954. }
  955. return
  956. }
  957. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  958. func Setreuid(ruid int, euid int) (err error) {
  959. _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
  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 Setresgid(rgid int, egid int, sgid int) (err error) {
  967. _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
  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 Setresuid(ruid int, euid int, suid int) (err error) {
  975. _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
  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 Setrlimit(which int, lim *Rlimit) (err error) {
  983. _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 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 Setsid() (pid int, err error) {
  991. r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
  992. pid = int(r0)
  993. if e1 != 0 {
  994. err = errnoErr(e1)
  995. }
  996. return
  997. }
  998. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  999. func Settimeofday(tp *Timeval) (err error) {
  1000. _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
  1001. if e1 != 0 {
  1002. err = errnoErr(e1)
  1003. }
  1004. return
  1005. }
  1006. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1007. func Setuid(uid int) (err error) {
  1008. _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
  1009. if e1 != 0 {
  1010. err = errnoErr(e1)
  1011. }
  1012. return
  1013. }
  1014. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1015. func Stat(path string, stat *Stat_t) (err error) {
  1016. var _p0 *byte
  1017. _p0, err = BytePtrFromString(path)
  1018. if err != nil {
  1019. return
  1020. }
  1021. _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1022. use(unsafe.Pointer(_p0))
  1023. if e1 != 0 {
  1024. err = errnoErr(e1)
  1025. }
  1026. return
  1027. }
  1028. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1029. func Statfs(path string, stat *Statfs_t) (err error) {
  1030. var _p0 *byte
  1031. _p0, err = BytePtrFromString(path)
  1032. if err != nil {
  1033. return
  1034. }
  1035. _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
  1036. use(unsafe.Pointer(_p0))
  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 Symlink(path string, link string) (err error) {
  1044. var _p0 *byte
  1045. _p0, err = BytePtrFromString(path)
  1046. if err != nil {
  1047. return
  1048. }
  1049. var _p1 *byte
  1050. _p1, err = BytePtrFromString(link)
  1051. if err != nil {
  1052. return
  1053. }
  1054. _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
  1055. use(unsafe.Pointer(_p0))
  1056. use(unsafe.Pointer(_p1))
  1057. if e1 != 0 {
  1058. err = errnoErr(e1)
  1059. }
  1060. return
  1061. }
  1062. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1063. func Sync() (err error) {
  1064. _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
  1065. if e1 != 0 {
  1066. err = errnoErr(e1)
  1067. }
  1068. return
  1069. }
  1070. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1071. func Truncate(path string, length int64) (err error) {
  1072. var _p0 *byte
  1073. _p0, err = BytePtrFromString(path)
  1074. if err != nil {
  1075. return
  1076. }
  1077. _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length))
  1078. use(unsafe.Pointer(_p0))
  1079. if e1 != 0 {
  1080. err = errnoErr(e1)
  1081. }
  1082. return
  1083. }
  1084. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1085. func Umask(newmask int) (oldmask int) {
  1086. r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
  1087. oldmask = int(r0)
  1088. return
  1089. }
  1090. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1091. func Undelete(path string) (err error) {
  1092. var _p0 *byte
  1093. _p0, err = BytePtrFromString(path)
  1094. if err != nil {
  1095. return
  1096. }
  1097. _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1098. use(unsafe.Pointer(_p0))
  1099. if e1 != 0 {
  1100. err = errnoErr(e1)
  1101. }
  1102. return
  1103. }
  1104. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1105. func Unlink(path string) (err error) {
  1106. var _p0 *byte
  1107. _p0, err = BytePtrFromString(path)
  1108. if err != nil {
  1109. return
  1110. }
  1111. _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
  1112. use(unsafe.Pointer(_p0))
  1113. if e1 != 0 {
  1114. err = errnoErr(e1)
  1115. }
  1116. return
  1117. }
  1118. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1119. func Unmount(path string, flags int) (err error) {
  1120. var _p0 *byte
  1121. _p0, err = BytePtrFromString(path)
  1122. if err != nil {
  1123. return
  1124. }
  1125. _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
  1126. use(unsafe.Pointer(_p0))
  1127. if e1 != 0 {
  1128. err = errnoErr(e1)
  1129. }
  1130. return
  1131. }
  1132. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1133. func write(fd int, p []byte) (n int, err error) {
  1134. var _p0 unsafe.Pointer
  1135. if len(p) > 0 {
  1136. _p0 = unsafe.Pointer(&p[0])
  1137. } else {
  1138. _p0 = unsafe.Pointer(&_zero)
  1139. }
  1140. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
  1141. n = int(r0)
  1142. if e1 != 0 {
  1143. err = errnoErr(e1)
  1144. }
  1145. return
  1146. }
  1147. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1148. func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
  1149. r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0)
  1150. ret = uintptr(r0)
  1151. if e1 != 0 {
  1152. err = errnoErr(e1)
  1153. }
  1154. return
  1155. }
  1156. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1157. func munmap(addr uintptr, length uintptr) (err error) {
  1158. _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 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 readlen(fd int, buf *byte, nbuf int) (n int, err error) {
  1166. r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1167. n = int(r0)
  1168. if e1 != 0 {
  1169. err = errnoErr(e1)
  1170. }
  1171. return
  1172. }
  1173. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
  1174. func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
  1175. r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
  1176. n = int(r0)
  1177. if e1 != 0 {
  1178. err = errnoErr(e1)
  1179. }
  1180. return
  1181. }