diff options
author | Alex Pilon <apilon@hashicorp.com> | 2019-02-22 18:24:37 -0500 |
---|---|---|
committer | Alex Pilon <apilon@hashicorp.com> | 2019-02-22 18:24:37 -0500 |
commit | 15c0b25d011f37e7c20aeca9eaf461f78285b8d9 (patch) | |
tree | 255c250a5c9d4801c74092d33b7337d8c14438ff /vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go | |
parent | 07971ca38143c5faf951d152fba370ddcbe26ad5 (diff) | |
download | terraform-provider-statuscake-15c0b25d011f37e7c20aeca9eaf461f78285b8d9.tar.gz terraform-provider-statuscake-15c0b25d011f37e7c20aeca9eaf461f78285b8d9.tar.zst terraform-provider-statuscake-15c0b25d011f37e7c20aeca9eaf461f78285b8d9.zip |
deps: github.com/hashicorp/terraform@sdk-v0.11-with-go-modules
Updated via: go get github.com/hashicorp/terraform@sdk-v0.11-with-go-modules and go mod tidy
Diffstat (limited to 'vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go')
-rw-r--r-- | vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go | 214 |
1 files changed, 214 insertions, 0 deletions
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go new file mode 100644 index 0000000..ad99103 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go | |||
@@ -0,0 +1,214 @@ | |||
1 | // Copyright 2015 The Go Authors. All rights reserved. | ||
2 | // Use of this source code is governed by a BSD-style | ||
3 | // license that can be found in the LICENSE file. | ||
4 | |||
5 | // +build linux | ||
6 | // +build mips64 mips64le | ||
7 | |||
8 | package unix | ||
9 | |||
10 | //sys Dup2(oldfd int, newfd int) (err error) | ||
11 | //sysnb EpollCreate(size int) (fd int, err error) | ||
12 | //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) | ||
13 | //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64 | ||
14 | //sys Fchown(fd int, uid int, gid int) (err error) | ||
15 | //sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_NEWFSTATAT | ||
16 | //sys Fstatfs(fd int, buf *Statfs_t) (err error) | ||
17 | //sys Ftruncate(fd int, length int64) (err error) | ||
18 | //sysnb Getegid() (egid int) | ||
19 | //sysnb Geteuid() (euid int) | ||
20 | //sysnb Getgid() (gid int) | ||
21 | //sysnb Getrlimit(resource int, rlim *Rlimit) (err error) | ||
22 | //sysnb Getuid() (uid int) | ||
23 | //sys Lchown(path string, uid int, gid int) (err error) | ||
24 | //sys Listen(s int, n int) (err error) | ||
25 | //sys Pause() (err error) | ||
26 | //sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64 | ||
27 | //sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64 | ||
28 | //sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK | ||
29 | |||
30 | func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { | ||
31 | var ts *Timespec | ||
32 | if timeout != nil { | ||
33 | ts = &Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000} | ||
34 | } | ||
35 | return Pselect(nfd, r, w, e, ts, nil) | ||
36 | } | ||
37 | |||
38 | //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) | ||
39 | //sys Setfsgid(gid int) (err error) | ||
40 | //sys Setfsuid(uid int) (err error) | ||
41 | //sysnb Setregid(rgid int, egid int) (err error) | ||
42 | //sysnb Setresgid(rgid int, egid int, sgid int) (err error) | ||
43 | //sysnb Setresuid(ruid int, euid int, suid int) (err error) | ||
44 | //sysnb Setrlimit(resource int, rlim *Rlimit) (err error) | ||
45 | //sysnb Setreuid(ruid int, euid int) (err error) | ||
46 | //sys Shutdown(fd int, how int) (err error) | ||
47 | //sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) | ||
48 | //sys Statfs(path string, buf *Statfs_t) (err error) | ||
49 | //sys SyncFileRange(fd int, off int64, n int64, flags int) (err error) | ||
50 | //sys Truncate(path string, length int64) (err error) | ||
51 | //sys Ustat(dev int, ubuf *Ustat_t) (err error) | ||
52 | //sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) | ||
53 | //sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) | ||
54 | //sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) | ||
55 | //sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) | ||
56 | //sysnb getgroups(n int, list *_Gid_t) (nn int, err error) | ||
57 | //sysnb setgroups(n int, list *_Gid_t) (err error) | ||
58 | //sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) | ||
59 | //sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) | ||
60 | //sysnb socket(domain int, typ int, proto int) (fd int, err error) | ||
61 | //sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) | ||
62 | //sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) | ||
63 | //sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) | ||
64 | //sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) | ||
65 | //sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) | ||
66 | //sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) | ||
67 | //sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) | ||
68 | //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) | ||
69 | |||
70 | //sys futimesat(dirfd int, path string, times *[2]Timeval) (err error) | ||
71 | //sysnb Gettimeofday(tv *Timeval) (err error) | ||
72 | |||
73 | func Time(t *Time_t) (tt Time_t, err error) { | ||
74 | var tv Timeval | ||
75 | err = Gettimeofday(&tv) | ||
76 | if err != nil { | ||
77 | return 0, err | ||
78 | } | ||
79 | if t != nil { | ||
80 | *t = Time_t(tv.Sec) | ||
81 | } | ||
82 | return Time_t(tv.Sec), nil | ||
83 | } | ||
84 | |||
85 | //sys Utime(path string, buf *Utimbuf) (err error) | ||
86 | //sys utimes(path string, times *[2]Timeval) (err error) | ||
87 | |||
88 | func setTimespec(sec, nsec int64) Timespec { | ||
89 | return Timespec{Sec: sec, Nsec: nsec} | ||
90 | } | ||
91 | |||
92 | func setTimeval(sec, usec int64) Timeval { | ||
93 | return Timeval{Sec: sec, Usec: usec} | ||
94 | } | ||
95 | |||
96 | func Pipe(p []int) (err error) { | ||
97 | if len(p) != 2 { | ||
98 | return EINVAL | ||
99 | } | ||
100 | var pp [2]_C_int | ||
101 | err = pipe2(&pp, 0) | ||
102 | p[0] = int(pp[0]) | ||
103 | p[1] = int(pp[1]) | ||
104 | return | ||
105 | } | ||
106 | |||
107 | //sysnb pipe2(p *[2]_C_int, flags int) (err error) | ||
108 | |||
109 | func Pipe2(p []int, flags int) (err error) { | ||
110 | if len(p) != 2 { | ||
111 | return EINVAL | ||
112 | } | ||
113 | var pp [2]_C_int | ||
114 | err = pipe2(&pp, flags) | ||
115 | p[0] = int(pp[0]) | ||
116 | p[1] = int(pp[1]) | ||
117 | return | ||
118 | } | ||
119 | |||
120 | func Ioperm(from int, num int, on int) (err error) { | ||
121 | return ENOSYS | ||
122 | } | ||
123 | |||
124 | func Iopl(level int) (err error) { | ||
125 | return ENOSYS | ||
126 | } | ||
127 | |||
128 | type stat_t struct { | ||
129 | Dev uint32 | ||
130 | Pad0 [3]int32 | ||
131 | Ino uint64 | ||
132 | Mode uint32 | ||
133 | Nlink uint32 | ||
134 | Uid uint32 | ||
135 | Gid uint32 | ||
136 | Rdev uint32 | ||
137 | Pad1 [3]uint32 | ||
138 | Size int64 | ||
139 | Atime uint32 | ||
140 | Atime_nsec uint32 | ||
141 | Mtime uint32 | ||
142 | Mtime_nsec uint32 | ||
143 | Ctime uint32 | ||
144 | Ctime_nsec uint32 | ||
145 | Blksize uint32 | ||
146 | Pad2 uint32 | ||
147 | Blocks int64 | ||
148 | } | ||
149 | |||
150 | //sys fstat(fd int, st *stat_t) (err error) | ||
151 | //sys lstat(path string, st *stat_t) (err error) | ||
152 | //sys stat(path string, st *stat_t) (err error) | ||
153 | |||
154 | func Fstat(fd int, s *Stat_t) (err error) { | ||
155 | st := &stat_t{} | ||
156 | err = fstat(fd, st) | ||
157 | fillStat_t(s, st) | ||
158 | return | ||
159 | } | ||
160 | |||
161 | func Lstat(path string, s *Stat_t) (err error) { | ||
162 | st := &stat_t{} | ||
163 | err = lstat(path, st) | ||
164 | fillStat_t(s, st) | ||
165 | return | ||
166 | } | ||
167 | |||
168 | func Stat(path string, s *Stat_t) (err error) { | ||
169 | st := &stat_t{} | ||
170 | err = stat(path, st) | ||
171 | fillStat_t(s, st) | ||
172 | return | ||
173 | } | ||
174 | |||
175 | func fillStat_t(s *Stat_t, st *stat_t) { | ||
176 | s.Dev = st.Dev | ||
177 | s.Ino = st.Ino | ||
178 | s.Mode = st.Mode | ||
179 | s.Nlink = st.Nlink | ||
180 | s.Uid = st.Uid | ||
181 | s.Gid = st.Gid | ||
182 | s.Rdev = st.Rdev | ||
183 | s.Size = st.Size | ||
184 | s.Atim = Timespec{int64(st.Atime), int64(st.Atime_nsec)} | ||
185 | s.Mtim = Timespec{int64(st.Mtime), int64(st.Mtime_nsec)} | ||
186 | s.Ctim = Timespec{int64(st.Ctime), int64(st.Ctime_nsec)} | ||
187 | s.Blksize = st.Blksize | ||
188 | s.Blocks = st.Blocks | ||
189 | } | ||
190 | |||
191 | func (r *PtraceRegs) PC() uint64 { return r.Epc } | ||
192 | |||
193 | func (r *PtraceRegs) SetPC(pc uint64) { r.Epc = pc } | ||
194 | |||
195 | func (iov *Iovec) SetLen(length int) { | ||
196 | iov.Len = uint64(length) | ||
197 | } | ||
198 | |||
199 | func (msghdr *Msghdr) SetControllen(length int) { | ||
200 | msghdr.Controllen = uint64(length) | ||
201 | } | ||
202 | |||
203 | func (cmsg *Cmsghdr) SetLen(length int) { | ||
204 | cmsg.Len = uint64(length) | ||
205 | } | ||
206 | |||
207 | //sys poll(fds *PollFd, nfds int, timeout int) (n int, err error) | ||
208 | |||
209 | func Poll(fds []PollFd, timeout int) (n int, err error) { | ||
210 | if len(fds) == 0 { | ||
211 | return poll(nil, 0, timeout) | ||
212 | } | ||
213 | return poll(&fds[0], len(fds), timeout) | ||
214 | } | ||