github.com/razvanm/vanadium-go-1.3@v0.0.0-20160721203343-4a65068e5915/src/runtime/ppapi/syscall_nacl.go (about) 1 // Copyright 2014 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 package ppapi 6 7 import ( 8 "fmt" 9 "strings" 10 "syscall" 11 ) 12 13 type PPAPISyscallImpl struct { 14 Instance 15 } 16 17 var envVars map[string]string 18 19 func initEnvVars() { 20 if envVars == nil { 21 envVars = map[string]string{ 22 "TMPDIR": "/tmp", 23 } 24 } 25 } 26 27 func (PPAPISyscallImpl) Accept4(fd int, flags int) (nfd int, sa syscall.Sockaddr, err error) { 28 panic("Accept() not implemented") 29 } 30 func (PPAPISyscallImpl) Access(path string, mode uint32) (err error) { 31 panic("Access() not implemented") 32 } 33 func (PPAPISyscallImpl) Acct(path string) (err error) { 34 panic("Acct() not implemented") 35 } 36 func (PPAPISyscallImpl) Adjtimex(buf *syscall.Timex) (state int, err error) { 37 panic("Adjtimex() not implemented") 38 } 39 func (PPAPISyscallImpl) AttachLsf(fd int, i []syscall.SockFilter) error { 40 panic("AttachLsf() not implemented") 41 } 42 func (PPAPISyscallImpl) BindToDevice(fd int, device string) (err error) { 43 panic("BindToDevice() not implemented") 44 } 45 func (PPAPISyscallImpl) Chdir(path string) (err error) { 46 panic("Chdir() not implemented") 47 } 48 func (PPAPISyscallImpl) Chmod(path string, mode uint32) (err error) { 49 panic("Chmod() not implemented") 50 } 51 func (PPAPISyscallImpl) Chown(path string, uid int, gid int) (err error) { 52 panic("Chown() not implemented") 53 } 54 func (PPAPISyscallImpl) Chroot(path string) (err error) { 55 panic("Chroot() not implemented") 56 } 57 func (PPAPISyscallImpl) Clearenv() { 58 panic("Clearenv() not implemented") 59 } 60 func (PPAPISyscallImpl) CmsgLen(datalen int) int { 61 panic("CmsgLen() not implemented") 62 } 63 func (PPAPISyscallImpl) CmsgSpace(datalen int) int { 64 panic("CmsgSpace() not implemented") 65 } 66 func (PPAPISyscallImpl) Creat(path string, mode uint32) (fd int, err error) { 67 panic("Creat() not implemented") 68 } 69 func (PPAPISyscallImpl) DetachLsf(fd int) error { 70 panic("DetachLsf() not implemented") 71 } 72 func (PPAPISyscallImpl) Dup3(oldfd int, newfd int, flags int) (err error) { 73 panic("Dup() not implemented") 74 } 75 func (PPAPISyscallImpl) Environ() []string { 76 initEnvVars() 77 env := []string{} 78 for key, val := range envVars { 79 env = append(env, key+"="+val) 80 } 81 return env 82 } 83 func (PPAPISyscallImpl) EpollCreate(size int) (fd int, err error) { 84 panic("EpollCreate() not implemented") 85 } 86 func (PPAPISyscallImpl) EpollCreate1(flag int) (fd int, err error) { 87 panic("EpollCreate() not implemented") 88 } 89 func (PPAPISyscallImpl) EpollCtl(epfd int, op int, fd int, event *syscall.EpollEvent) (err error) { 90 panic("EpollCtl() not implemented") 91 } 92 func (PPAPISyscallImpl) EpollWait(epfd int, events []syscall.EpollEvent, msec int) (n int, err error) { 93 panic("EpollWait() not implemented") 94 } 95 func (PPAPISyscallImpl) Exec(argv0 string, argv []string, envv []string) (err error) { 96 panic("Exec() not implemented") 97 } 98 func (PPAPISyscallImpl) Exit(code int) { 99 // Wait for log outputs to finish. 100 // runLock.Lock() 101 // runLock.Unlock() 102 if code != 0 { 103 panic(fmt.Sprintf("Exited with non-zero code %d", code)) 104 } 105 var c chan bool = make(chan bool) 106 fmt.Printf("Exited with code 0, going to sleep forever.") 107 <-c 108 } 109 func (PPAPISyscallImpl) Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { 110 panic("Faccessat() not implemented") 111 } 112 func (PPAPISyscallImpl) Fallocate(fd int, mode uint32, off int64, len int64) (err error) { 113 panic("Fallocate() not implemented") 114 } 115 func (PPAPISyscallImpl) Fchdir(fd int) (err error) { 116 panic("Fchdir() not implemented") 117 } 118 func (PPAPISyscallImpl) Fchmod(fd int, mode uint32) (err error) { 119 panic("Fchmod() not implemented") 120 } 121 func (PPAPISyscallImpl) Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { 122 panic("Fchmodat() not implemented") 123 } 124 func (PPAPISyscallImpl) Fchown(fd int, uid int, gid int) (err error) { 125 panic("Fchown() not implemented") 126 } 127 func (PPAPISyscallImpl) Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { 128 panic("Fchownat() not implemented") 129 } 130 func (PPAPISyscallImpl) FcntlFlock(fd uintptr, cmd int, lk *syscall.Flock_t) error { 131 panic("FcntlFlock() not implemented") 132 } 133 func (PPAPISyscallImpl) Fdatasync(fd int) (err error) { 134 panic("Fdatasync() not implemented") 135 } 136 func (PPAPISyscallImpl) Flock(fd int, how int) (err error) { 137 panic("Flock() not implemented") 138 } 139 func (PPAPISyscallImpl) ForkExec(argv0 string, argv []string, attr *syscall.ProcAttr) (pid int, err error) { 140 panic("ForkExec() not implemented") 141 } 142 func (PPAPISyscallImpl) Fstatfs(fd int, buf *syscall.Statfs_t) (err error) { 143 panic("Fstatfs() not implemented") 144 } 145 func (PPAPISyscallImpl) Ftruncate(fd int, length int64) (err error) { 146 panic("Ftruncate() not implemented") 147 } 148 func (PPAPISyscallImpl) Futimes(fd int, tv []syscall.Timeval) (err error) { 149 panic("Futimes() not implemented") 150 } 151 func (PPAPISyscallImpl) Futimesat(dirfd int, path string, tv []syscall.Timeval) (err error) { 152 panic("Futimesat() not implemented") 153 } 154 func (PPAPISyscallImpl) Getcwd(buf []byte) (n int, err error) { 155 panic("Getcwd() not implemented") 156 } 157 func (PPAPISyscallImpl) Getdents(fd int, buf []byte) (n int, err error) { 158 panic("Getdents() not implemented") 159 } 160 func (PPAPISyscallImpl) Getegid() (egid int) { 161 panic("Getegid() not implemented") 162 } 163 func (PPAPISyscallImpl) Getenv(key string) (value string, found bool) { 164 initEnvVars() 165 166 key = strings.ToUpper(key) 167 if val, ok := envVars[key]; ok { 168 return val, true 169 } 170 switch key { 171 case "ZONEINFO", "HTTP_PROXY", "TZ", "VEYRON_PUBLICID_STORE", "VEYRON_EXEC_VERSION", "PARENT_NODE_MANAGER_NAME", "VEYRON_AGENT_FD", "VEYRON_CREDENTIALS", "VEYRON_IDENTITY": 172 default: 173 fmt.Printf("Getenv called on unexpected key %s (should we handle this?)", key) 174 } 175 return "", false 176 } 177 func (PPAPISyscallImpl) Geteuid() (euid int) { 178 panic("Geteuid() not implemented") 179 } 180 func (PPAPISyscallImpl) Getgid() (gid int) { 181 panic("Getgid() not implemented") 182 } 183 func (PPAPISyscallImpl) Getgroups() (gids []int, err error) { 184 panic("Getgroups() not implemented") 185 } 186 func (PPAPISyscallImpl) Getpagesize() int { 187 panic("Getpagesize() not implemented") 188 } 189 func (PPAPISyscallImpl) Getpgid(pid int) (pgid int, err error) { 190 panic("Getpgid() not implemented") 191 } 192 func (PPAPISyscallImpl) Getpgrp() (pid int) { 193 panic("Getpgrp() not implemented") 194 } 195 func (PPAPISyscallImpl) Getpid() (pid int) { 196 // Same PID every time. 197 return 1234 198 } 199 func (PPAPISyscallImpl) Getppid() (ppid int) { 200 panic("Getppid() not implemented") 201 } 202 func (PPAPISyscallImpl) Getpriority(which int, who int) (prio int, err error) { 203 panic("Getpriority() not implemented") 204 } 205 func (PPAPISyscallImpl) Getrlimit(resource int, rlim *syscall.Rlimit) (err error) { 206 panic("Getrlimit() not implemented") 207 } 208 func (PPAPISyscallImpl) Getrusage(who int, rusage *syscall.Rusage) (err error) { 209 panic("Getrusage() not implemented") 210 } 211 func (PPAPISyscallImpl) GetsockoptInet4Addr(fd, level, opt int) (value [4]byte, err error) { 212 panic("GetsockoptInet() not implemented") 213 } 214 func (PPAPISyscallImpl) GetsockoptInt(fd, level, opt int) (value int, err error) { 215 panic("GetsockoptInt() not implemented") 216 } 217 func (PPAPISyscallImpl) Gettid() (tid int) { 218 panic("Gettid() not implemented") 219 } 220 func (PPAPISyscallImpl) Gettimeofday(tv *syscall.Timeval) (err error) { 221 panic("Gettimeofday() not implemented") 222 } 223 func (PPAPISyscallImpl) Getuid() (uid int) { 224 panic("Getuid() not implemented") 225 } 226 func (PPAPISyscallImpl) Getwd() (wd string, err error) { 227 panic("Getwd() not implemented") 228 } 229 func (PPAPISyscallImpl) Getxattr(path string, attr string, dest []byte) (sz int, err error) { 230 panic("Getxattr() not implemented") 231 } 232 func (PPAPISyscallImpl) InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { 233 panic("InotifyAddWatch() not implemented") 234 } 235 func (PPAPISyscallImpl) InotifyInit() (fd int, err error) { 236 panic("InotifyInit() not implemented") 237 } 238 func (PPAPISyscallImpl) InotifyInit1(flags int) (fd int, err error) { 239 panic("InotifyInit() not implemented") 240 } 241 func (PPAPISyscallImpl) InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { 242 panic("InotifyRmWatch() not implemented") 243 } 244 func (PPAPISyscallImpl) Ioperm(from int, num int, on int) (err error) { 245 panic("Ioperm() not implemented") 246 } 247 func (PPAPISyscallImpl) Iopl(level int) (err error) { 248 panic("Iopl() not implemented") 249 } 250 func (PPAPISyscallImpl) Kill(pid int, sig syscall.Signal) (err error) { 251 panic("Kill() not implemented") 252 } 253 func (PPAPISyscallImpl) Klogctl(typ int, buf []byte) (n int, err error) { 254 panic("Klogctl() not implemented") 255 } 256 func (PPAPISyscallImpl) Lchown(path string, uid int, gid int) (err error) { 257 panic("Lchown() not implemented") 258 } 259 func (PPAPISyscallImpl) Link(oldpath string, newpath string) (err error) { 260 panic("Link() not implemented") 261 } 262 func (PPAPISyscallImpl) Listxattr(path string, dest []byte) (sz int, err error) { 263 panic("Listxattr() not implemented") 264 } 265 func (PPAPISyscallImpl) LsfSocket(ifindex, proto int) (int, error) { 266 panic("LsfSocket() not implemented") 267 } 268 func (PPAPISyscallImpl) Lstat(path string, stat *syscall.Stat_t) (err error) { 269 panic("Lstat() not implemented") 270 } 271 func (PPAPISyscallImpl) Madvise(b []byte, advice int) (err error) { 272 panic("Madvise() not implemented") 273 } 274 func (PPAPISyscallImpl) Mkdirat(dirfd int, path string, mode uint32) (err error) { 275 panic("Mkdirat() not implemented") 276 } 277 func (PPAPISyscallImpl) Mkfifo(path string, mode uint32) (err error) { 278 panic("Mkfifo() not implemented") 279 } 280 func (PPAPISyscallImpl) Mknod(path string, mode uint32, dev int) (err error) { 281 panic("Mknod() not implemented") 282 } 283 func (PPAPISyscallImpl) Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { 284 panic("Mknodat() not implemented") 285 } 286 func (PPAPISyscallImpl) Mlock(b []byte) (err error) { 287 panic("Mlock() not implemented") 288 } 289 func (PPAPISyscallImpl) Mlockall(flags int) (err error) { 290 panic("Mlockall() not implemented") 291 } 292 func (PPAPISyscallImpl) Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) { 293 panic("Mmap() not implemented") 294 } 295 func (PPAPISyscallImpl) Mount(source string, target string, fstype string, flags uintptr, data string) (err error) { 296 panic("Mount() not implemented") 297 } 298 func (PPAPISyscallImpl) Mprotect(b []byte, prot int) (err error) { 299 panic("Mprotect() not implemented") 300 } 301 func (PPAPISyscallImpl) Munlock(b []byte) (err error) { 302 panic("Munlock() not implemented") 303 } 304 func (PPAPISyscallImpl) Munlockall() (err error) { 305 panic("Munlockall() not implemented") 306 } 307 func (PPAPISyscallImpl) Munmap(b []byte) (err error) { 308 panic("Munmap() not implemented") 309 } 310 func (PPAPISyscallImpl) Nanosleep(time *syscall.Timespec, leftover *syscall.Timespec) (err error) { 311 panic("Nanosleep() not implemented") 312 } 313 func (PPAPISyscallImpl) NetlinkRIB(proto, family int) ([]byte, error) { 314 panic("NetlinkRIB() not implemented") 315 } 316 func (PPAPISyscallImpl) Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { 317 panic("Openat() not implemented") 318 } 319 func (PPAPISyscallImpl) ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) { 320 panic("ParseDirent() not implemented") 321 } 322 func (PPAPISyscallImpl) ParseNetlinkMessage(b []byte) ([]syscall.NetlinkMessage, error) { 323 panic("ParseNetlinkMessage() not implemented") 324 } 325 func (PPAPISyscallImpl) ParseNetlinkRouteAttr(m *syscall.NetlinkMessage) ([]syscall.NetlinkRouteAttr, error) { 326 panic("ParseNetlinkRouteAttr() not implemented") 327 } 328 func (PPAPISyscallImpl) ParseSocketControlMessage(b []byte) ([]syscall.SocketControlMessage, error) { 329 panic("ParseSocketControlMessage() not implemented") 330 } 331 func (PPAPISyscallImpl) ParseUnixRights(m *syscall.SocketControlMessage) ([]int, error) { 332 panic("ParseUnixRights() not implemented") 333 } 334 func (PPAPISyscallImpl) Pause() (err error) { 335 panic("Pause() not implemented") 336 } 337 func (PPAPISyscallImpl) Pipe(p []int) (err error) { 338 panic("Pipe() not implemented") 339 } 340 func (PPAPISyscallImpl) Pipe2(p []int, flags int) (err error) { 341 panic("Pipe() not implemented") 342 } 343 func (PPAPISyscallImpl) PivotRoot(newroot string, putold string) (err error) { 344 panic("PivotRoot() not implemented") 345 } 346 func (PPAPISyscallImpl) PtraceAttach(pid int) (err error) { 347 panic("PtraceAttach() not implemented") 348 } 349 func (PPAPISyscallImpl) PtraceCont(pid int, signal int) (err error) { 350 panic("PtraceCont() not implemented") 351 } 352 func (PPAPISyscallImpl) PtraceDetach(pid int) (err error) { 353 panic("PtraceDetach() not implemented") 354 } 355 func (PPAPISyscallImpl) PtraceGetEventMsg(pid int) (msg uint, err error) { 356 panic("PtraceGetEventMsg() not implemented") 357 } 358 func (PPAPISyscallImpl) PtraceGetRegs(pid int, regsout *syscall.PtraceRegs) (err error) { 359 panic("PtraceGetRegs() not implemented") 360 } 361 func (PPAPISyscallImpl) PtracePeekData(pid int, addr uintptr, out []byte) (count int, err error) { 362 panic("PtracePeekData() not implemented") 363 } 364 func (PPAPISyscallImpl) PtracePeekText(pid int, addr uintptr, out []byte) (count int, err error) { 365 panic("PtracePeekText() not implemented") 366 } 367 func (PPAPISyscallImpl) PtracePokeData(pid int, addr uintptr, data []byte) (count int, err error) { 368 panic("PtracePokeData() not implemented") 369 } 370 func (PPAPISyscallImpl) PtracePokeText(pid int, addr uintptr, data []byte) (count int, err error) { 371 panic("PtracePokeText() not implemented") 372 } 373 func (PPAPISyscallImpl) PtraceSetOptions(pid int, options int) (err error) { 374 panic("PtraceSetOptions() not implemented") 375 } 376 func (PPAPISyscallImpl) PtraceSetRegs(pid int, regs *syscall.PtraceRegs) (err error) { 377 panic("PtraceSetRegs() not implemented") 378 } 379 func (PPAPISyscallImpl) PtraceSingleStep(pid int) (err error) { 380 panic("PtraceSingleStep() not implemented") 381 } 382 func (PPAPISyscallImpl) PtraceSyscall(pid int, signal int) (err error) { 383 panic("PtraceSyscall() not implemented") 384 } 385 func (PPAPISyscallImpl) RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 386 panic("RawSyscall() not implemented") 387 } 388 func (PPAPISyscallImpl) RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 389 panic("RawSyscall() not implemented") 390 } 391 func (PPAPISyscallImpl) ReadDirent(fd int, buf []byte) (n int, err error) { 392 panic("ReadDirent() not implemented") 393 } 394 func (PPAPISyscallImpl) Readlink(path string, buf []byte) (n int, err error) { 395 panic("Readlink() not implemented") 396 } 397 func (PPAPISyscallImpl) Reboot(cmd int) (err error) { 398 panic("Reboot() not implemented") 399 } 400 func (PPAPISyscallImpl) Recvfrom(fd int, p []byte, flags int) (n int, from syscall.Sockaddr, err error) { 401 panic("Recvfrom() not implemented") 402 } 403 func (PPAPISyscallImpl) Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from syscall.Sockaddr, err error) { 404 panic("Recvmsg() not implemented") 405 } 406 func (PPAPISyscallImpl) Removexattr(path string, attr string) (err error) { 407 panic("Removexattr() not implemented") 408 } 409 func (PPAPISyscallImpl) Rename(oldpath string, newpath string) (err error) { 410 panic("Rename() not implemented") 411 } 412 func (PPAPISyscallImpl) Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { 413 panic("Renameat() not implemented") 414 } 415 func (PPAPISyscallImpl) Select(nfd int, r *syscall.FdSet, w *syscall.FdSet, e *syscall.FdSet, timeout *syscall.Timeval) (n int, err error) { 416 panic("Select() not implemented") 417 } 418 func (PPAPISyscallImpl) Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 419 panic("Sendfile() not implemented") 420 } 421 func (PPAPISyscallImpl) Sendmsg(fd int, p, oob []byte, to syscall.Sockaddr, flags int) (err error) { 422 panic("Sendmsg() not implemented") 423 } 424 func (PPAPISyscallImpl) SendmsgN(fd int, p, oob []byte, to syscall.Sockaddr, flags int) (n int, err error) { 425 panic("SendmsgN() not implemented") 426 } 427 func (PPAPISyscallImpl) Sendto(fd int, p []byte, flags int, to syscall.Sockaddr) (err error) { 428 panic("Sendto() not implemented") 429 } 430 func (PPAPISyscallImpl) SetLsfPromisc(name string, m bool) error { 431 panic("SetLsfPromisc() not implemented") 432 } 433 func (PPAPISyscallImpl) SetNonblock(fd int, nonblocking bool) (err error) { 434 //Ignore... 435 //panic("SetNonblock() not implemented") 436 return nil 437 } 438 func (PPAPISyscallImpl) Setdomainname(p []byte) (err error) { 439 panic("Setdomainname() not implemented") 440 } 441 func (PPAPISyscallImpl) Setenv(key, value string) error { 442 key = strings.ToUpper(key) 443 envVars[key] = value 444 return nil 445 } 446 func (PPAPISyscallImpl) Setfsgid(gid int) (err error) { 447 panic("Setfsgid() not implemented") 448 } 449 func (PPAPISyscallImpl) Setfsuid(uid int) (err error) { 450 panic("Setfsuid() not implemented") 451 } 452 func (PPAPISyscallImpl) Setgid(gid int) (err error) { 453 panic("Setgid() not implemented") 454 } 455 func (PPAPISyscallImpl) Setgroups(gids []int) (err error) { 456 panic("Setgroups() not implemented") 457 } 458 func (PPAPISyscallImpl) Sethostname(p []byte) (err error) { 459 panic("Sethostname() not implemented") 460 } 461 func (PPAPISyscallImpl) Setpgid(pid int, pgid int) (err error) { 462 panic("Setpgid() not implemented") 463 } 464 func (PPAPISyscallImpl) Setpriority(which int, who int, prio int) (err error) { 465 panic("Setpriority() not implemented") 466 } 467 func (PPAPISyscallImpl) Setregid(rgid int, egid int) (err error) { 468 panic("Setregid() not implemented") 469 } 470 func (PPAPISyscallImpl) Setresgid(rgid int, egid int, sgid int) (err error) { 471 panic("Setresgid() not implemented") 472 } 473 func (PPAPISyscallImpl) Setresuid(ruid int, euid int, suid int) (err error) { 474 panic("Setresuid() not implemented") 475 } 476 func (PPAPISyscallImpl) Setreuid(ruid int, euid int) (err error) { 477 panic("Setreuid() not implemented") 478 } 479 func (PPAPISyscallImpl) Setrlimit(resource int, rlim *syscall.Rlimit) (err error) { 480 panic("Setrlimit() not implemented") 481 } 482 func (PPAPISyscallImpl) Setsid() (pid int, err error) { 483 panic("Setsid() not implemented") 484 } 485 func (PPAPISyscallImpl) SetsockoptByte(fd, level, opt int, value byte) (err error) { 486 panic("SetsockoptByte() not implemented") 487 } 488 func (PPAPISyscallImpl) SetsockoptICMPv6Filter(fd, level, opt int, filter *syscall.ICMPv6Filter) error { 489 panic("SetsockoptICMPv() not implemented") 490 } 491 func (PPAPISyscallImpl) SetsockoptIPMreq(fd, level, opt int, mreq *syscall.IPMreq) (err error) { 492 panic("SetsockoptIPMreq() not implemented") 493 } 494 func (PPAPISyscallImpl) SetsockoptIPMreqn(fd, level, opt int, mreq *syscall.IPMreqn) (err error) { 495 panic("SetsockoptIPMreqn() not implemented") 496 } 497 func (PPAPISyscallImpl) SetsockoptIPv6Mreq(fd, level, opt int, mreq *syscall.IPv6Mreq) (err error) { 498 panic("SetsockoptIPv() not implemented") 499 } 500 func (PPAPISyscallImpl) SetsockoptInet4Addr(fd, level, opt int, value [4]byte) (err error) { 501 panic("SetsockoptInet() not implemented") 502 } 503 func (PPAPISyscallImpl) SetsockoptInt(fd, level, opt int, value int) (err error) { 504 return nil 505 } 506 func (PPAPISyscallImpl) SetsockoptLinger(fd, level, opt int, l *syscall.Linger) (err error) { 507 panic("SetsockoptLinger() not implemented") 508 } 509 func (PPAPISyscallImpl) SetsockoptString(fd, level, opt int, s string) (err error) { 510 panic("SetsockoptString() not implemented") 511 } 512 func (PPAPISyscallImpl) SetsockoptTimeval(fd, level, opt int, tv *syscall.Timeval) (err error) { 513 panic("SetsockoptTimeval() not implemented") 514 } 515 func (PPAPISyscallImpl) Settimeofday(tv *syscall.Timeval) (err error) { 516 panic("Settimeofday() not implemented") 517 } 518 func (PPAPISyscallImpl) Setuid(uid int) (err error) { 519 panic("Setuid() not implemented") 520 } 521 func (PPAPISyscallImpl) Setxattr(path string, attr string, data []byte, flags int) (err error) { 522 panic("Setxattr() not implemented") 523 } 524 func (PPAPISyscallImpl) Shutdown(fd int, how int) (err error) { 525 panic("Shutdown() not implemented") 526 } 527 func (PPAPISyscallImpl) SlicePtrFromStrings(ss []string) ([]*byte, error) { 528 panic("SlicePtrFromStrings() not implemented") 529 } 530 func (PPAPISyscallImpl) Socketpair(domain, typ, proto int) (fd [2]int, err error) { 531 panic("Socketpair() not implemented") 532 } 533 func (PPAPISyscallImpl) Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) { 534 panic("Splice() not implemented") 535 } 536 func (PPAPISyscallImpl) StartProcess(argv0 string, argv []string, attr *syscall.ProcAttr) (pid int, handle uintptr, err error) { 537 panic("StartProcess() not implemented") 538 } 539 func (PPAPISyscallImpl) Statfs(path string, buf *syscall.Statfs_t) (err error) { 540 panic("Statfs() not implemented") 541 } 542 func (PPAPISyscallImpl) StringSlicePtr(ss []string) []*byte { 543 panic("StringSlicePtr() not implemented") 544 } 545 func (PPAPISyscallImpl) Sync() { 546 panic("Sync() not implemented") 547 } 548 func (PPAPISyscallImpl) SyncFileRange(fd int, off int64, n int64, flags int) (err error) { 549 panic("SyncFileRange() not implemented") 550 } 551 func (PPAPISyscallImpl) Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 552 panic("Syscall() not implemented") 553 } 554 func (PPAPISyscallImpl) Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 555 panic("Syscall() not implemented") 556 } 557 func (PPAPISyscallImpl) Sysinfo(info *syscall.Sysinfo_t) (err error) { 558 panic("Sysinfo() not implemented") 559 } 560 func (PPAPISyscallImpl) Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { 561 panic("Tee() not implemented") 562 } 563 func (PPAPISyscallImpl) Tgkill(tgid int, tid int, sig syscall.Signal) (err error) { 564 panic("Tgkill() not implemented") 565 } 566 func (PPAPISyscallImpl) Times(tms *syscall.Tms) (ticks uintptr, err error) { 567 panic("Times() not implemented") 568 } 569 func (PPAPISyscallImpl) TimespecToNsec(ts syscall.Timespec) int64 { 570 panic("TimespecToNsec() not implemented") 571 } 572 func (PPAPISyscallImpl) TimevalToNsec(tv syscall.Timeval) int64 { 573 panic("TimevalToNsec() not implemented") 574 } 575 func (PPAPISyscallImpl) Truncate(path string, length int64) (err error) { 576 panic("Truncate() not implemented") 577 } 578 func (PPAPISyscallImpl) Umask(mask int) (oldmask int) { 579 panic("Umask() not implemented") 580 } 581 func (PPAPISyscallImpl) Uname(buf *syscall.Utsname) (err error) { 582 panic("Uname() not implemented") 583 } 584 func (PPAPISyscallImpl) UnixCredentials(ucred *syscall.Ucred) []byte { 585 panic("UnixCredentials() not implemented") 586 } 587 func (PPAPISyscallImpl) UnixRights(fds ...int) []byte { 588 panic("UnixRights() not implemented") 589 } 590 func (PPAPISyscallImpl) Unlinkat(dirfd int, path string) (err error) { 591 panic("Unlinkat() not implemented") 592 } 593 func (PPAPISyscallImpl) Unmount(target string, flags int) (err error) { 594 panic("Unmount() not implemented") 595 } 596 func (PPAPISyscallImpl) Unsetenv(key string) error { 597 key = strings.ToUpper(key) 598 delete(envVars, key) 599 return nil 600 } 601 func (PPAPISyscallImpl) Unshare(flags int) (err error) { 602 panic("Unshare() not implemented") 603 } 604 func (PPAPISyscallImpl) Ustat(dev int, ubuf *syscall.Ustat_t) (err error) { 605 panic("Ustat() not implemented") 606 } 607 func (PPAPISyscallImpl) Utime(path string, buf *syscall.Utimbuf) (err error) { 608 panic("Utime() not implemented") 609 } 610 func (PPAPISyscallImpl) Utimes(path string, tv []syscall.Timeval) (err error) { 611 panic("Utimes() not implemented") 612 } 613 func (PPAPISyscallImpl) UtimesNano(path string, ts []syscall.Timespec) (err error) { 614 panic("UtimesNano() not implemented") 615 } 616 func (PPAPISyscallImpl) Wait4(pid int, wstatus *syscall.WaitStatus, options int, rusage *syscall.Rusage) (wpid int, err error) { 617 panic("Wait() not implemented") 618 } 619 620 func (PPAPISyscallImpl) GetsockoptICMPv6Filter(fd, level, opt int) (*syscall.ICMPv6Filter, error) { 621 panic("GetsockoptICMPv() not implemented") 622 } 623 func (PPAPISyscallImpl) GetsockoptIPMreq(fd, level, opt int) (*syscall.IPMreq, error) { 624 panic("GetsockoptIPMreq() not implemented") 625 } 626 func (PPAPISyscallImpl) GetsockoptIPMreqn(fd, level, opt int) (*syscall.IPMreqn, error) { 627 panic("GetsockoptIPMreqn() not implemented") 628 } 629 func (PPAPISyscallImpl) GetsockoptIPv6MTUInfo(fd, level, opt int) (*syscall.IPv6MTUInfo, error) { 630 panic("GetsockoptIPv() not implemented") 631 } 632 func (PPAPISyscallImpl) GetsockoptIPv6Mreq(fd, level, opt int) (*syscall.IPv6Mreq, error) { 633 panic("GetsockoptIPv() not implemented") 634 } 635 func (PPAPISyscallImpl) LsfJump(code, k, jt, jf int) *syscall.SockFilter { 636 panic("LsfJump() not implemented") 637 } 638 func (PPAPISyscallImpl) LsfStmt(code, k int) *syscall.SockFilter { 639 panic("LsfStmt() not implemented") 640 } 641 func (PPAPISyscallImpl) Time(t *syscall.Time_t) (tt syscall.Time_t, err error) { 642 panic("Time() not implemented") 643 } 644 func (PPAPISyscallImpl) NsecToTimespec(nsec int64) (ts syscall.Timespec) { 645 panic("NsecToTimespec() not implemented") 646 } 647 func (PPAPISyscallImpl) NsecToTimeval(nsec int64) (tv syscall.Timeval) { 648 panic("NsecToTimeval() not implemented") 649 } 650 func (PPAPISyscallImpl) GetsockoptUcred(fd, level, opt int) (*syscall.Ucred, error) { 651 panic("GetsockoptUcred() not implemented") 652 } 653 func (PPAPISyscallImpl) ParseUnixCredentials(m *syscall.SocketControlMessage) (*syscall.Ucred, error) { 654 panic("ParseUnixCredentials() not implemented") 655 } 656 657 func (PPAPISyscallImpl) SetReadDeadline(fd int, t int64) error { 658 //panic("SetReadDeadline() not implemented") 659 fmt.Printf("SetReadDeadline() ignored") 660 return nil 661 } 662 func (PPAPISyscallImpl) SetWriteDeadline(fd int, t int64) error { 663 //panic("SetWriteDeadline() not implemented") 664 fmt.Printf("SetWriteDeadline() ignored") 665 return nil 666 } 667 668 // For type checking 669 var _ syscall.SyscallImplementation = PPAPISyscallImpl{}