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