├── .github
├── FUNDING.yml
├── ISSUE_TEMPLATE
│ ├── bug_report.md
│ ├── design_proposal.md
│ ├── feature_request.md
│ └── question.md
├── pull_request_template.md
└── workflows
│ └── codeql-analysis.yml
├── .gitignore
├── .travis.yml
├── CONTRIBUTING.md
├── Dockerfile
├── LICENSE
├── Makefile
├── app
├── app.go
└── app_test.go
├── config
├── config.go
└── config_test.go
├── dev-compose.yml
├── docs
├── .nojekyll
├── CNAME
├── INSTRUCTIONS.md
├── README.md
├── _coverpage.md
├── _sidebar.md
└── index.html
├── go.mod
├── go.sum
├── main.go
├── parser
├── parser.go
└── parser_test.go
├── ssh
├── ssh.go
└── ssh_test.go
└── vendor
├── github.com
├── fatih
│ └── color
│ │ ├── LICENSE.md
│ │ ├── README.md
│ │ ├── color.go
│ │ ├── doc.go
│ │ ├── go.mod
│ │ └── go.sum
├── howeyc
│ └── gopass
│ │ ├── .travis.yml
│ │ ├── LICENSE.txt
│ │ ├── OPENSOLARIS.LICENSE
│ │ ├── README.md
│ │ ├── pass.go
│ │ ├── terminal.go
│ │ └── terminal_solaris.go
├── jessevdk
│ └── go-flags
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── arg.go
│ │ ├── check_crosscompile.sh
│ │ ├── closest.go
│ │ ├── command.go
│ │ ├── completion.go
│ │ ├── convert.go
│ │ ├── error.go
│ │ ├── flags.go
│ │ ├── group.go
│ │ ├── help.go
│ │ ├── ini.go
│ │ ├── man.go
│ │ ├── multitag.go
│ │ ├── option.go
│ │ ├── optstyle_other.go
│ │ ├── optstyle_windows.go
│ │ ├── parser.go
│ │ ├── termsize.go
│ │ ├── termsize_nosysioctl.go
│ │ ├── tiocgwinsz_bsdish.go
│ │ ├── tiocgwinsz_linux.go
│ │ └── tiocgwinsz_other.go
├── kr
│ └── fs
│ │ ├── LICENSE
│ │ ├── Readme
│ │ ├── filesystem.go
│ │ ├── go.mod
│ │ └── walk.go
├── mattn
│ ├── go-colorable
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── colorable_appengine.go
│ │ ├── colorable_others.go
│ │ ├── colorable_windows.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ └── noncolorable.go
│ └── go-isatty
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── doc.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── isatty_android.go
│ │ ├── isatty_bsd.go
│ │ ├── isatty_others.go
│ │ ├── isatty_plan9.go
│ │ ├── isatty_solaris.go
│ │ ├── isatty_tcgets.go
│ │ └── isatty_windows.go
└── pkg
│ ├── errors
│ ├── .gitignore
│ ├── .travis.yml
│ ├── LICENSE
│ ├── Makefile
│ ├── README.md
│ ├── appveyor.yml
│ ├── errors.go
│ ├── go113.go
│ └── stack.go
│ └── sftp
│ ├── .gitignore
│ ├── .travis.yml
│ ├── CONTRIBUTORS
│ ├── LICENSE
│ ├── Makefile
│ ├── README.md
│ ├── allocator.go
│ ├── attrs.go
│ ├── attrs_stubs.go
│ ├── attrs_unix.go
│ ├── client.go
│ ├── conn.go
│ ├── debug.go
│ ├── go.mod
│ ├── go.sum
│ ├── match.go
│ ├── packet-manager.go
│ ├── packet-typing.go
│ ├── packet.go
│ ├── release.go
│ ├── request-attrs.go
│ ├── request-errors.go
│ ├── request-example.go
│ ├── request-interfaces.go
│ ├── request-readme.md
│ ├── request-server.go
│ ├── request-unix.go
│ ├── request.go
│ ├── request_windows.go
│ ├── server.go
│ ├── server_statvfs_darwin.go
│ ├── server_statvfs_impl.go
│ ├── server_statvfs_linux.go
│ ├── server_statvfs_stubs.go
│ ├── server_stubs.go
│ ├── server_unix.go
│ ├── sftp.go
│ ├── syscall_fixed.go
│ └── syscall_good.go
├── golang.org
└── x
│ ├── crypto
│ ├── LICENSE
│ ├── PATENTS
│ ├── blowfish
│ │ ├── block.go
│ │ ├── cipher.go
│ │ └── const.go
│ ├── chacha20
│ │ ├── chacha_arm64.go
│ │ ├── chacha_arm64.s
│ │ ├── chacha_generic.go
│ │ ├── chacha_noasm.go
│ │ ├── chacha_ppc64le.go
│ │ ├── chacha_ppc64le.s
│ │ ├── chacha_s390x.go
│ │ ├── chacha_s390x.s
│ │ └── xor.go
│ ├── curve25519
│ │ ├── curve25519.go
│ │ ├── curve25519_compat.go
│ │ ├── curve25519_go120.go
│ │ └── internal
│ │ │ └── field
│ │ │ ├── README
│ │ │ ├── fe.go
│ │ │ ├── fe_amd64.go
│ │ │ ├── fe_amd64.s
│ │ │ ├── fe_amd64_noasm.go
│ │ │ ├── fe_arm64.go
│ │ │ ├── fe_arm64.s
│ │ │ ├── fe_arm64_noasm.go
│ │ │ ├── fe_generic.go
│ │ │ ├── sync.checkpoint
│ │ │ └── sync.sh
│ ├── internal
│ │ ├── alias
│ │ │ ├── alias.go
│ │ │ └── alias_purego.go
│ │ └── poly1305
│ │ │ ├── bits_compat.go
│ │ │ ├── bits_go1.13.go
│ │ │ ├── mac_noasm.go
│ │ │ ├── poly1305.go
│ │ │ ├── sum_amd64.go
│ │ │ ├── sum_amd64.s
│ │ │ ├── sum_generic.go
│ │ │ ├── sum_ppc64le.go
│ │ │ ├── sum_ppc64le.s
│ │ │ ├── sum_s390x.go
│ │ │ └── sum_s390x.s
│ └── ssh
│ │ ├── buffer.go
│ │ ├── certs.go
│ │ ├── channel.go
│ │ ├── cipher.go
│ │ ├── client.go
│ │ ├── client_auth.go
│ │ ├── common.go
│ │ ├── connection.go
│ │ ├── doc.go
│ │ ├── handshake.go
│ │ ├── internal
│ │ └── bcrypt_pbkdf
│ │ │ └── bcrypt_pbkdf.go
│ │ ├── kex.go
│ │ ├── keys.go
│ │ ├── mac.go
│ │ ├── messages.go
│ │ ├── mux.go
│ │ ├── server.go
│ │ ├── session.go
│ │ ├── ssh_gss.go
│ │ ├── streamlocal.go
│ │ ├── tcpip.go
│ │ ├── terminal
│ │ └── terminal.go
│ │ └── transport.go
│ ├── sys
│ ├── LICENSE
│ ├── PATENTS
│ ├── cpu
│ │ ├── asm_aix_ppc64.s
│ │ ├── byteorder.go
│ │ ├── cpu.go
│ │ ├── cpu_aix.go
│ │ ├── cpu_arm.go
│ │ ├── cpu_arm64.go
│ │ ├── cpu_arm64.s
│ │ ├── cpu_gc_arm64.go
│ │ ├── cpu_gc_s390x.go
│ │ ├── cpu_gc_x86.go
│ │ ├── cpu_gccgo_arm64.go
│ │ ├── cpu_gccgo_s390x.go
│ │ ├── cpu_gccgo_x86.c
│ │ ├── cpu_gccgo_x86.go
│ │ ├── cpu_linux.go
│ │ ├── cpu_linux_arm.go
│ │ ├── cpu_linux_arm64.go
│ │ ├── cpu_linux_mips64x.go
│ │ ├── cpu_linux_noinit.go
│ │ ├── cpu_linux_ppc64x.go
│ │ ├── cpu_linux_s390x.go
│ │ ├── cpu_loong64.go
│ │ ├── cpu_mips64x.go
│ │ ├── cpu_mipsx.go
│ │ ├── cpu_netbsd_arm64.go
│ │ ├── cpu_openbsd_arm64.go
│ │ ├── cpu_openbsd_arm64.s
│ │ ├── cpu_other_arm.go
│ │ ├── cpu_other_arm64.go
│ │ ├── cpu_other_mips64x.go
│ │ ├── cpu_other_ppc64x.go
│ │ ├── cpu_other_riscv64.go
│ │ ├── cpu_ppc64x.go
│ │ ├── cpu_riscv64.go
│ │ ├── cpu_s390x.go
│ │ ├── cpu_s390x.s
│ │ ├── cpu_wasm.go
│ │ ├── cpu_x86.go
│ │ ├── cpu_x86.s
│ │ ├── cpu_zos.go
│ │ ├── cpu_zos_s390x.go
│ │ ├── endian_big.go
│ │ ├── endian_little.go
│ │ ├── hwcap_linux.go
│ │ ├── parse.go
│ │ ├── proc_cpuinfo_linux.go
│ │ ├── runtime_auxv.go
│ │ ├── runtime_auxv_go121.go
│ │ ├── syscall_aix_gccgo.go
│ │ └── syscall_aix_ppc64_gc.go
│ ├── plan9
│ │ ├── asm.s
│ │ ├── asm_plan9_386.s
│ │ ├── asm_plan9_amd64.s
│ │ ├── asm_plan9_arm.s
│ │ ├── const_plan9.go
│ │ ├── dir_plan9.go
│ │ ├── env_plan9.go
│ │ ├── errors_plan9.go
│ │ ├── mkall.sh
│ │ ├── mkerrors.sh
│ │ ├── mksysnum_plan9.sh
│ │ ├── pwd_go15_plan9.go
│ │ ├── pwd_plan9.go
│ │ ├── race.go
│ │ ├── race0.go
│ │ ├── str.go
│ │ ├── syscall.go
│ │ ├── syscall_plan9.go
│ │ ├── zsyscall_plan9_386.go
│ │ ├── zsyscall_plan9_amd64.go
│ │ ├── zsyscall_plan9_arm.go
│ │ └── zsysnum_plan9.go
│ ├── unix
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── affinity_linux.go
│ │ ├── aliases.go
│ │ ├── asm_aix_ppc64.s
│ │ ├── asm_bsd_386.s
│ │ ├── asm_bsd_amd64.s
│ │ ├── asm_bsd_arm.s
│ │ ├── asm_bsd_arm64.s
│ │ ├── asm_bsd_ppc64.s
│ │ ├── asm_bsd_riscv64.s
│ │ ├── asm_linux_386.s
│ │ ├── asm_linux_amd64.s
│ │ ├── asm_linux_arm.s
│ │ ├── asm_linux_arm64.s
│ │ ├── asm_linux_loong64.s
│ │ ├── asm_linux_mips64x.s
│ │ ├── asm_linux_mipsx.s
│ │ ├── asm_linux_ppc64x.s
│ │ ├── asm_linux_riscv64.s
│ │ ├── asm_linux_s390x.s
│ │ ├── asm_openbsd_mips64.s
│ │ ├── asm_solaris_amd64.s
│ │ ├── asm_zos_s390x.s
│ │ ├── bluetooth_linux.go
│ │ ├── cap_freebsd.go
│ │ ├── constants.go
│ │ ├── dev_aix_ppc.go
│ │ ├── dev_aix_ppc64.go
│ │ ├── dev_darwin.go
│ │ ├── dev_dragonfly.go
│ │ ├── dev_freebsd.go
│ │ ├── dev_linux.go
│ │ ├── dev_netbsd.go
│ │ ├── dev_openbsd.go
│ │ ├── dev_zos.go
│ │ ├── dirent.go
│ │ ├── endian_big.go
│ │ ├── endian_little.go
│ │ ├── env_unix.go
│ │ ├── epoll_zos.go
│ │ ├── fcntl.go
│ │ ├── fcntl_darwin.go
│ │ ├── fcntl_linux_32bit.go
│ │ ├── fdset.go
│ │ ├── fstatfs_zos.go
│ │ ├── gccgo.go
│ │ ├── gccgo_c.c
│ │ ├── gccgo_linux_amd64.go
│ │ ├── ifreq_linux.go
│ │ ├── ioctl_linux.go
│ │ ├── ioctl_signed.go
│ │ ├── ioctl_unsigned.go
│ │ ├── ioctl_zos.go
│ │ ├── mkall.sh
│ │ ├── mkerrors.sh
│ │ ├── mmap_nomremap.go
│ │ ├── mremap.go
│ │ ├── pagesize_unix.go
│ │ ├── pledge_openbsd.go
│ │ ├── ptrace_darwin.go
│ │ ├── ptrace_ios.go
│ │ ├── race.go
│ │ ├── race0.go
│ │ ├── readdirent_getdents.go
│ │ ├── readdirent_getdirentries.go
│ │ ├── sockcmsg_dragonfly.go
│ │ ├── sockcmsg_linux.go
│ │ ├── sockcmsg_unix.go
│ │ ├── sockcmsg_unix_other.go
│ │ ├── syscall.go
│ │ ├── syscall_aix.go
│ │ ├── syscall_aix_ppc.go
│ │ ├── syscall_aix_ppc64.go
│ │ ├── syscall_bsd.go
│ │ ├── syscall_darwin.go
│ │ ├── syscall_darwin_amd64.go
│ │ ├── syscall_darwin_arm64.go
│ │ ├── syscall_darwin_libSystem.go
│ │ ├── syscall_dragonfly.go
│ │ ├── syscall_dragonfly_amd64.go
│ │ ├── syscall_freebsd.go
│ │ ├── syscall_freebsd_386.go
│ │ ├── syscall_freebsd_amd64.go
│ │ ├── syscall_freebsd_arm.go
│ │ ├── syscall_freebsd_arm64.go
│ │ ├── syscall_freebsd_riscv64.go
│ │ ├── syscall_hurd.go
│ │ ├── syscall_hurd_386.go
│ │ ├── syscall_illumos.go
│ │ ├── syscall_linux.go
│ │ ├── syscall_linux_386.go
│ │ ├── syscall_linux_alarm.go
│ │ ├── syscall_linux_amd64.go
│ │ ├── syscall_linux_amd64_gc.go
│ │ ├── syscall_linux_arm.go
│ │ ├── syscall_linux_arm64.go
│ │ ├── syscall_linux_gc.go
│ │ ├── syscall_linux_gc_386.go
│ │ ├── syscall_linux_gc_arm.go
│ │ ├── syscall_linux_gccgo_386.go
│ │ ├── syscall_linux_gccgo_arm.go
│ │ ├── syscall_linux_loong64.go
│ │ ├── syscall_linux_mips64x.go
│ │ ├── syscall_linux_mipsx.go
│ │ ├── syscall_linux_ppc.go
│ │ ├── syscall_linux_ppc64x.go
│ │ ├── syscall_linux_riscv64.go
│ │ ├── syscall_linux_s390x.go
│ │ ├── syscall_linux_sparc64.go
│ │ ├── syscall_netbsd.go
│ │ ├── syscall_netbsd_386.go
│ │ ├── syscall_netbsd_amd64.go
│ │ ├── syscall_netbsd_arm.go
│ │ ├── syscall_netbsd_arm64.go
│ │ ├── syscall_openbsd.go
│ │ ├── syscall_openbsd_386.go
│ │ ├── syscall_openbsd_amd64.go
│ │ ├── syscall_openbsd_arm.go
│ │ ├── syscall_openbsd_arm64.go
│ │ ├── syscall_openbsd_libc.go
│ │ ├── syscall_openbsd_mips64.go
│ │ ├── syscall_openbsd_ppc64.go
│ │ ├── syscall_openbsd_riscv64.go
│ │ ├── syscall_solaris.go
│ │ ├── syscall_solaris_amd64.go
│ │ ├── syscall_unix.go
│ │ ├── syscall_unix_gc.go
│ │ ├── syscall_unix_gc_ppc64x.go
│ │ ├── syscall_zos_s390x.go
│ │ ├── sysvshm_linux.go
│ │ ├── sysvshm_unix.go
│ │ ├── sysvshm_unix_other.go
│ │ ├── timestruct.go
│ │ ├── unveil_openbsd.go
│ │ ├── xattr_bsd.go
│ │ ├── zerrors_aix_ppc.go
│ │ ├── zerrors_aix_ppc64.go
│ │ ├── zerrors_darwin_amd64.go
│ │ ├── zerrors_darwin_arm64.go
│ │ ├── zerrors_dragonfly_amd64.go
│ │ ├── zerrors_freebsd_386.go
│ │ ├── zerrors_freebsd_amd64.go
│ │ ├── zerrors_freebsd_arm.go
│ │ ├── zerrors_freebsd_arm64.go
│ │ ├── zerrors_freebsd_riscv64.go
│ │ ├── zerrors_linux.go
│ │ ├── zerrors_linux_386.go
│ │ ├── zerrors_linux_amd64.go
│ │ ├── zerrors_linux_arm.go
│ │ ├── zerrors_linux_arm64.go
│ │ ├── zerrors_linux_loong64.go
│ │ ├── zerrors_linux_mips.go
│ │ ├── zerrors_linux_mips64.go
│ │ ├── zerrors_linux_mips64le.go
│ │ ├── zerrors_linux_mipsle.go
│ │ ├── zerrors_linux_ppc.go
│ │ ├── zerrors_linux_ppc64.go
│ │ ├── zerrors_linux_ppc64le.go
│ │ ├── zerrors_linux_riscv64.go
│ │ ├── zerrors_linux_s390x.go
│ │ ├── zerrors_linux_sparc64.go
│ │ ├── zerrors_netbsd_386.go
│ │ ├── zerrors_netbsd_amd64.go
│ │ ├── zerrors_netbsd_arm.go
│ │ ├── zerrors_netbsd_arm64.go
│ │ ├── zerrors_openbsd_386.go
│ │ ├── zerrors_openbsd_amd64.go
│ │ ├── zerrors_openbsd_arm.go
│ │ ├── zerrors_openbsd_arm64.go
│ │ ├── zerrors_openbsd_mips64.go
│ │ ├── zerrors_openbsd_ppc64.go
│ │ ├── zerrors_openbsd_riscv64.go
│ │ ├── zerrors_solaris_amd64.go
│ │ ├── zerrors_zos_s390x.go
│ │ ├── zptrace_armnn_linux.go
│ │ ├── zptrace_linux_arm64.go
│ │ ├── zptrace_mipsnn_linux.go
│ │ ├── zptrace_mipsnnle_linux.go
│ │ ├── zptrace_x86_linux.go
│ │ ├── zsyscall_aix_ppc.go
│ │ ├── zsyscall_aix_ppc64.go
│ │ ├── zsyscall_aix_ppc64_gc.go
│ │ ├── zsyscall_aix_ppc64_gccgo.go
│ │ ├── zsyscall_darwin_amd64.go
│ │ ├── zsyscall_darwin_amd64.s
│ │ ├── zsyscall_darwin_arm64.go
│ │ ├── zsyscall_darwin_arm64.s
│ │ ├── zsyscall_dragonfly_amd64.go
│ │ ├── zsyscall_freebsd_386.go
│ │ ├── zsyscall_freebsd_amd64.go
│ │ ├── zsyscall_freebsd_arm.go
│ │ ├── zsyscall_freebsd_arm64.go
│ │ ├── zsyscall_freebsd_riscv64.go
│ │ ├── zsyscall_illumos_amd64.go
│ │ ├── zsyscall_linux.go
│ │ ├── zsyscall_linux_386.go
│ │ ├── zsyscall_linux_amd64.go
│ │ ├── zsyscall_linux_arm.go
│ │ ├── zsyscall_linux_arm64.go
│ │ ├── zsyscall_linux_loong64.go
│ │ ├── zsyscall_linux_mips.go
│ │ ├── zsyscall_linux_mips64.go
│ │ ├── zsyscall_linux_mips64le.go
│ │ ├── zsyscall_linux_mipsle.go
│ │ ├── zsyscall_linux_ppc.go
│ │ ├── zsyscall_linux_ppc64.go
│ │ ├── zsyscall_linux_ppc64le.go
│ │ ├── zsyscall_linux_riscv64.go
│ │ ├── zsyscall_linux_s390x.go
│ │ ├── zsyscall_linux_sparc64.go
│ │ ├── zsyscall_netbsd_386.go
│ │ ├── zsyscall_netbsd_amd64.go
│ │ ├── zsyscall_netbsd_arm.go
│ │ ├── zsyscall_netbsd_arm64.go
│ │ ├── zsyscall_openbsd_386.go
│ │ ├── zsyscall_openbsd_386.s
│ │ ├── zsyscall_openbsd_amd64.go
│ │ ├── zsyscall_openbsd_amd64.s
│ │ ├── zsyscall_openbsd_arm.go
│ │ ├── zsyscall_openbsd_arm.s
│ │ ├── zsyscall_openbsd_arm64.go
│ │ ├── zsyscall_openbsd_arm64.s
│ │ ├── zsyscall_openbsd_mips64.go
│ │ ├── zsyscall_openbsd_mips64.s
│ │ ├── zsyscall_openbsd_ppc64.go
│ │ ├── zsyscall_openbsd_ppc64.s
│ │ ├── zsyscall_openbsd_riscv64.go
│ │ ├── zsyscall_openbsd_riscv64.s
│ │ ├── zsyscall_solaris_amd64.go
│ │ ├── zsyscall_zos_s390x.go
│ │ ├── zsysctl_openbsd_386.go
│ │ ├── zsysctl_openbsd_amd64.go
│ │ ├── zsysctl_openbsd_arm.go
│ │ ├── zsysctl_openbsd_arm64.go
│ │ ├── zsysctl_openbsd_mips64.go
│ │ ├── zsysctl_openbsd_ppc64.go
│ │ ├── zsysctl_openbsd_riscv64.go
│ │ ├── zsysnum_darwin_amd64.go
│ │ ├── zsysnum_darwin_arm64.go
│ │ ├── zsysnum_dragonfly_amd64.go
│ │ ├── zsysnum_freebsd_386.go
│ │ ├── zsysnum_freebsd_amd64.go
│ │ ├── zsysnum_freebsd_arm.go
│ │ ├── zsysnum_freebsd_arm64.go
│ │ ├── zsysnum_freebsd_riscv64.go
│ │ ├── zsysnum_linux_386.go
│ │ ├── zsysnum_linux_amd64.go
│ │ ├── zsysnum_linux_arm.go
│ │ ├── zsysnum_linux_arm64.go
│ │ ├── zsysnum_linux_loong64.go
│ │ ├── zsysnum_linux_mips.go
│ │ ├── zsysnum_linux_mips64.go
│ │ ├── zsysnum_linux_mips64le.go
│ │ ├── zsysnum_linux_mipsle.go
│ │ ├── zsysnum_linux_ppc.go
│ │ ├── zsysnum_linux_ppc64.go
│ │ ├── zsysnum_linux_ppc64le.go
│ │ ├── zsysnum_linux_riscv64.go
│ │ ├── zsysnum_linux_s390x.go
│ │ ├── zsysnum_linux_sparc64.go
│ │ ├── zsysnum_netbsd_386.go
│ │ ├── zsysnum_netbsd_amd64.go
│ │ ├── zsysnum_netbsd_arm.go
│ │ ├── zsysnum_netbsd_arm64.go
│ │ ├── zsysnum_openbsd_386.go
│ │ ├── zsysnum_openbsd_amd64.go
│ │ ├── zsysnum_openbsd_arm.go
│ │ ├── zsysnum_openbsd_arm64.go
│ │ ├── zsysnum_openbsd_mips64.go
│ │ ├── zsysnum_openbsd_ppc64.go
│ │ ├── zsysnum_openbsd_riscv64.go
│ │ ├── zsysnum_zos_s390x.go
│ │ ├── ztypes_aix_ppc.go
│ │ ├── ztypes_aix_ppc64.go
│ │ ├── ztypes_darwin_amd64.go
│ │ ├── ztypes_darwin_arm64.go
│ │ ├── ztypes_dragonfly_amd64.go
│ │ ├── ztypes_freebsd_386.go
│ │ ├── ztypes_freebsd_amd64.go
│ │ ├── ztypes_freebsd_arm.go
│ │ ├── ztypes_freebsd_arm64.go
│ │ ├── ztypes_freebsd_riscv64.go
│ │ ├── ztypes_linux.go
│ │ ├── ztypes_linux_386.go
│ │ ├── ztypes_linux_amd64.go
│ │ ├── ztypes_linux_arm.go
│ │ ├── ztypes_linux_arm64.go
│ │ ├── ztypes_linux_loong64.go
│ │ ├── ztypes_linux_mips.go
│ │ ├── ztypes_linux_mips64.go
│ │ ├── ztypes_linux_mips64le.go
│ │ ├── ztypes_linux_mipsle.go
│ │ ├── ztypes_linux_ppc.go
│ │ ├── ztypes_linux_ppc64.go
│ │ ├── ztypes_linux_ppc64le.go
│ │ ├── ztypes_linux_riscv64.go
│ │ ├── ztypes_linux_s390x.go
│ │ ├── ztypes_linux_sparc64.go
│ │ ├── ztypes_netbsd_386.go
│ │ ├── ztypes_netbsd_amd64.go
│ │ ├── ztypes_netbsd_arm.go
│ │ ├── ztypes_netbsd_arm64.go
│ │ ├── ztypes_openbsd_386.go
│ │ ├── ztypes_openbsd_amd64.go
│ │ ├── ztypes_openbsd_arm.go
│ │ ├── ztypes_openbsd_arm64.go
│ │ ├── ztypes_openbsd_mips64.go
│ │ ├── ztypes_openbsd_ppc64.go
│ │ ├── ztypes_openbsd_riscv64.go
│ │ ├── ztypes_solaris_amd64.go
│ │ └── ztypes_zos_s390x.go
│ └── windows
│ │ ├── aliases.go
│ │ ├── dll_windows.go
│ │ ├── empty.s
│ │ ├── env_windows.go
│ │ ├── eventlog.go
│ │ ├── exec_windows.go
│ │ ├── memory_windows.go
│ │ ├── mkerrors.bash
│ │ ├── mkknownfolderids.bash
│ │ ├── mksyscall.go
│ │ ├── race.go
│ │ ├── race0.go
│ │ ├── security_windows.go
│ │ ├── service.go
│ │ ├── setupapi_windows.go
│ │ ├── str.go
│ │ ├── syscall.go
│ │ ├── syscall_windows.go
│ │ ├── types_windows.go
│ │ ├── types_windows_386.go
│ │ ├── types_windows_amd64.go
│ │ ├── types_windows_arm.go
│ │ ├── types_windows_arm64.go
│ │ ├── zerrors_windows.go
│ │ ├── zknownfolderids_windows.go
│ │ └── zsyscall_windows.go
│ └── term
│ ├── CONTRIBUTING.md
│ ├── LICENSE
│ ├── PATENTS
│ ├── README.md
│ ├── codereview.cfg
│ ├── go.mod
│ ├── go.sum
│ ├── term.go
│ ├── term_plan9.go
│ ├── term_unix.go
│ ├── term_unix_bsd.go
│ ├── term_unix_other.go
│ ├── term_unsupported.go
│ ├── term_windows.go
│ └── terminal.go
└── modules.txt
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 | github: ["madflojo"] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
3 | #patreon: # Replace with a single Patreon username
4 | #open_collective: # Replace with a single Open Collective username
5 | #ko_fi: # Replace with a single Ko-fi username
6 | #tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
7 | #community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
8 | #liberapay: # Replace with a single Liberapay username
9 | #issuehunt: # Replace with a single IssueHunt username
10 | #otechie: # Replace with a single Otechie username
11 | #custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
12 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: ''
5 | labels: bug
6 | assignees: ''
7 |
8 | ---
9 |
10 | ## Describe the bug
11 |
12 | A clear and concise description of what the bug is.
13 |
14 | ### To Reproduce
15 |
16 | Steps to reproduce the behavior:
17 | 1. Do X
18 | 2. See Y
19 |
20 | ## Expected behavior
21 |
22 | A clear and concise description of what you expected to happen.
23 |
24 | ## Additional context
25 |
26 | Add any other context about the problem here.
27 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/design_proposal.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Design Proposal
3 | about: Propose a design or implementation of a feature
4 | title: ''
5 | labels: proposal
6 | assignees: ''
7 |
8 | ---
9 |
10 | ## Goal
11 |
12 | A clear and concise description of what you are trying to solve.
13 |
14 | ## Design
15 |
16 | A clear description of the approach you wish to take. Provide as much details as possible here.
17 |
18 | ### Examples
19 |
20 | Show examples of code, commands, etc.
21 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: ''
5 | labels: enhancement
6 | assignees: ''
7 |
8 | ---
9 |
10 | ## Describe the idea
11 |
12 | A clear and concise description of what you want to happen. If the issue is related to a problem, give background on the problem being experienced.
13 |
14 | ### Describe possible implementations
15 |
16 | If possible, provide a clear and concise method of implementing the idea
17 |
18 | ## Additional context
19 |
20 | Add any other context or thoughts about the feature request here.
21 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/question.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Question
3 | about: Ask a question
4 | title: ''
5 | labels: question
6 | assignees: ''
7 |
8 | ---
9 |
10 |
--------------------------------------------------------------------------------
/.github/pull_request_template.md:
--------------------------------------------------------------------------------
1 | # Description
2 |
3 | Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
4 |
5 | ## Type of change
6 |
7 | Please delete options that are not relevant.
8 |
9 | - [ ] Bug fix (non-breaking change which fixes an issue)
10 | - [ ] New feature (non-breaking change which adds functionality)
11 | - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
12 | - [ ] This change requires a documentation update
13 |
14 | # Checklist:
15 |
16 | - [ ] I have performed a self-review of my own code
17 | - [ ] I have commented my code, ensuring GoDoc readability and clarity in hard-to-understand areas
18 | - [ ] I have made corresponding changes to documentation
19 | - [ ] I have added tests that ensure my fix is effective or that my feature works
20 | - [ ] Any dependent changes have been merged and published in downstream modules
21 |
22 | If checklist items are unchecked please explain.
23 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Binaries for programs and plugins
2 | *.exe
3 | *.dll
4 | *.so
5 | *.dylib
6 |
7 | # Test binary, build with `go test -c`
8 | *.test
9 |
10 | # Output of the go coverage tool, specifically when used with LiteIDE
11 | *.out
12 |
13 | # Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
14 | .glide/
15 |
16 | # Testdata
17 | testdata/
18 |
19 | # Coverage
20 | coverage/
21 |
22 | # No Swapfiles
23 | *.swp
24 |
25 | # Build Directory
26 | build/
27 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | os:
3 | - linux
4 | env:
5 | - "PATH=/home/travis/gopath/bin:$PATH"
6 | before_install:
7 | # Coverage
8 | - go get golang.org/x/tools/cmd/cover
9 | - go get github.com/mattn/goveralls
10 | # Local Server setup
11 | - sudo apt-get install openssh-server
12 | - ssh-keygen -b 2048 -t rsa -f ~/.ssh/id_rsa -q -N ""
13 | - cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys
14 | - echo "RUN ls -la" > ./Efs2file
15 | script:
16 | # Check format and code cleanliness
17 | - gofmt -l ./ | grep -v vendor | wc -l | grep -q 0
18 | - go vet -v
19 | # Run Tests
20 | - make tests clean
21 | # Install and Test
22 | - make build
23 | - make install
24 | - efs2 -v localhost
25 | after_success:
26 | - goveralls -coverprofile=coverage/coverage.out -service=travis-ci -repotoken $COVERALLS_TOKEN
27 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to Efs2
2 |
3 | Thank you for your interest in helping develop Efs2. The time, skills, and perspectives you contribute to this project are valued.
4 |
5 | ## How can I contribute?
6 |
7 | Bugs, Design Proposals, Feature Requests, and Questions are all welcome by creating a [Github Issue](https://github.com/madflojo/efs2/issues/new/choose) using one of the templates provided. Please provide as much detail as you can.
8 |
9 | Code contributions are welcome as well! To keep this project tidy, please:
10 |
11 | - Use `go mod` to install and lock dependencies
12 | - Use `gofmt` to format code and tests
13 | - Run `go vet -v ./...` to check for any inadvertent suspicious code
14 | - Write and run unit tests using `make test`
15 |
16 | ### Available Makefile commands
17 |
18 | Run tests
19 |
20 | ```console
21 | $ make test
22 | ```
23 |
24 | Clean up environment
25 |
26 | ```console
27 | $ make clean
28 | ```
29 |
30 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM golang:latest
2 | ADD . /go/src/github.com/madflojo/efs2
3 | WORKDIR /go/src/github.com/madflojo/efs2
4 | RUN go install -v
5 | ENTRYPOINT ["efs2"]
6 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 Benjamin Cane
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | # Efs2 Makefile is used to drive the build and installation of Efs2
2 | # this is meant to be used with a local copy of code repository.
3 |
4 | tests:
5 | @echo "Launching Tests in Docker Compose"
6 | mkdir -p ./testdata
7 | test -f ./testdata/testkey || ssh-keygen -b 2048 -t rsa -f ./testdata/testkey -q -N ""
8 | test -f ./testdata/wrongkey || ssh-keygen -b 2048 -t rsa -f ./testdata/wrongkey -q -N ""
9 | test -f ./testdata/invalidkey || ssh-keygen -b 2048 -t rsa -f ./testdata/invalidkey -q -N "" && sed '5d' ./testdata/invalidkey > ./testdata/tmp.key && mv ./testdata/tmp.key ./testdata/invalidkey
10 | test -f ./testdata/testkey-passphrase || ssh-keygen -b 2048 -t rsa -m PEM -f ./testdata/testkey-passphrase -q -N "testing"
11 | docker-compose -f dev-compose.yml up --build tests
12 |
13 | clean:
14 | @echo "Cleaning up build junk"
15 | -docker-compose -f dev-compose.yml down
16 | -rm -rf ./testdata
17 |
18 | build:
19 | @echo "Building from source"
20 | go build
21 |
22 | install:
23 | @echo "Installing from source"
24 | go install
25 |
26 | release:
27 | @echo "Creating Release Binaries"
28 | go get -u github.com/mitchellh/gox
29 | mkdir -p build
30 | gox -output="build/{{.OS}}_{{.Arch}}/{{.Dir}}"
31 |
--------------------------------------------------------------------------------
/config/config_test.go:
--------------------------------------------------------------------------------
1 | package config
2 |
3 | import (
4 | "os/user"
5 | "testing"
6 | )
7 |
8 | func TestConfig(t *testing.T) {
9 | t.Run("Check Defaults", func(t *testing.T) {
10 | cfg := New()
11 | if cfg.Efs2File != "./Efs2file" && cfg.Port != "22" {
12 | t.Errorf("Defaults are not set")
13 | }
14 | })
15 |
16 | t.Run("Check User Details", func(t *testing.T) {
17 | usr, err := user.Current()
18 | if err != nil {
19 | t.Errorf("Unable to determine current user - %s", err)
20 | }
21 |
22 | username, homedir, err := UserDetails("")
23 | if err != nil {
24 | t.Errorf("Unable to grab user details - %s", err)
25 | }
26 |
27 | if username != usr.Username && homedir != usr.HomeDir {
28 | t.Errorf("User details are not accurate")
29 | }
30 | })
31 |
32 | t.Run("Check Specified User Details", func(t *testing.T) {
33 | usr, err := user.Current()
34 | if err != nil {
35 | t.Errorf("Unable to determine current user - %s", err)
36 | }
37 |
38 | username, homedir, err := UserDetails(usr.Username)
39 | if err != nil {
40 | t.Errorf("Unable to grab user details - %s", err)
41 | }
42 |
43 | if username != usr.Username && homedir != usr.HomeDir {
44 | t.Errorf("User details are not accurate")
45 | }
46 | })
47 | }
48 |
--------------------------------------------------------------------------------
/dev-compose.yml:
--------------------------------------------------------------------------------
1 | version: "2.1"
2 | services:
3 | openssh-server:
4 | image: linuxserver/openssh-server
5 | hostname: openssh-server
6 | environment:
7 | - PUID=1000
8 | - PGID=1000
9 | - TZ=GMT
10 | - PUBLIC_KEY_FILE=/config/testkey.pub
11 | - SUDO_ACCESS=true
12 | - PASSWORD_ACCESS=true
13 | - USER_PASSWORD=testing
14 | - USER_NAME=test
15 | volumes:
16 | - ./testdata:/config
17 | openssh-server-2:
18 | image: linuxserver/openssh-server
19 | hostname: openssh-server-2
20 | environment:
21 | - PUID=1000
22 | - PGID=1000
23 | - TZ=GMT
24 | - PUBLIC_KEY_FILE=/config/testkey.pub
25 | - SUDO_ACCESS=true
26 | - PASSWORD_ACCESS=true
27 | - USER_PASSWORD=testing
28 | - USER_NAME=test
29 | volumes:
30 | - ./testdata:/config
31 | tests:
32 | build: .
33 | working_dir: /go/src/github.com/madflojo/efs2
34 | entrypoint: go test -v -covermode=count -coverprofile=/tmp/coverage/coverage.out ./...
35 | volumes:
36 | - ./coverage:/tmp/coverage
37 | depends_on:
38 | - openssh-server
39 | - openssh-server-2
40 |
41 | volumes:
42 | coverage:
43 | testdata:
44 |
--------------------------------------------------------------------------------
/docs/.nojekyll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/madflojo/efs2/54c7a05668b30862a49054f8e4cff018e3746762/docs/.nojekyll
--------------------------------------------------------------------------------
/docs/CNAME:
--------------------------------------------------------------------------------
1 | efs2.sh
--------------------------------------------------------------------------------
/docs/INSTRUCTIONS.md:
--------------------------------------------------------------------------------
1 | # Efs2file Instructions
2 |
3 | An `Efs2file` is much like a `Dockerfile` in that it uses a simple set of instructions to execute actions against target servers. The number of instructions within Efs2 is small but mighty. This page serves as a reference for available instructions.
4 |
5 | | Instruction | Example | Description |
6 | | ----------- | ------- | ----------- |
7 | | `RUN` | `RUN apt-get install something` | Execute command against remote target system |
8 | | `PUT` | `PUT local.file /path/to/remote.file 0644` | Upload file to the target system using the destination path and permissions mode |
9 |
10 | ## Legacy Instructions
11 |
12 | The following instructions are legacy however still officially supported within Efs2.
13 |
14 | | Instruction | Example | Description |
15 | | ----------- | ------- | ----------- |
16 | | `RUN CMD` | `RUN CMD apt-get install something` | Execute command against remote target systems |
17 | | `RUN SCRIPT` | `RUN SCRIPT localfile.sh` | Upload and Execute the provided script on the remote target systems |
18 |
--------------------------------------------------------------------------------
/docs/_coverpage.md:
--------------------------------------------------------------------------------
1 | # Effing Shell Scripts 2
2 |
3 | > A dead-simple configuration management tool
4 |
5 | - Simple to use and lightweight command-line utility
6 | - Remote execution over SSH
7 | - Dockerfile like configuration with two simple instructions
8 |
9 | [Getting Started](#efs2)
10 | [GitHub](https://github.com/madflojo/efs2)
11 |
12 | 
13 |
--------------------------------------------------------------------------------
/docs/_sidebar.md:
--------------------------------------------------------------------------------
1 | - [Getting Started](README.md)
2 | - [Efs2file Instructions](INSTRUCTIONS.md)
3 |
--------------------------------------------------------------------------------
/docs/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Document
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/madflojo/efs2
2 |
3 | go 1.14
4 |
5 | require (
6 | github.com/fatih/color v1.9.0
7 | github.com/howeyc/gopass v0.0.0-20190910152052-7cb4b85ec19c
8 | github.com/jessevdk/go-flags v1.4.0
9 | github.com/pkg/sftp v1.12.0
10 | golang.org/x/crypto v0.17.0
11 | )
12 |
--------------------------------------------------------------------------------
/vendor/github.com/fatih/color/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2013 Fatih Arslan
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/vendor/github.com/fatih/color/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/fatih/color
2 |
3 | go 1.13
4 |
5 | require (
6 | github.com/mattn/go-colorable v0.1.4
7 | github.com/mattn/go-isatty v0.0.11
8 | )
9 |
--------------------------------------------------------------------------------
/vendor/github.com/fatih/color/go.sum:
--------------------------------------------------------------------------------
1 | github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA=
2 | github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
3 | github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
4 | github.com/mattn/go-isatty v0.0.11 h1:FxPOTFNqGkuDUGi3H/qkUbQO4ZiBa2brKq5r0l8TGeM=
5 | github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE=
6 | golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
7 | golang.org/x/sys v0.0.0-20191026070338-33540a1f6037 h1:YyJpGZS1sBuBCzLAR1VEpK193GlqGZbnPFnPV/5Rsb4=
8 | golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
9 |
--------------------------------------------------------------------------------
/vendor/github.com/howeyc/gopass/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 |
3 | os:
4 | - linux
5 | - osx
6 |
7 | go:
8 | - 1.3
9 | - 1.4
10 | - 1.5
11 | - tip
12 |
--------------------------------------------------------------------------------
/vendor/github.com/howeyc/gopass/LICENSE.txt:
--------------------------------------------------------------------------------
1 | ISC License
2 |
3 | Copyright (c) 2012 Chris Howey
4 |
5 | Permission to use, copy, modify, and distribute this software for any
6 | purpose with or without fee is hereby granted, provided that the above
7 | copyright notice and this permission notice appear in all copies.
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 |
--------------------------------------------------------------------------------
/vendor/github.com/howeyc/gopass/README.md:
--------------------------------------------------------------------------------
1 | # getpasswd in Go [](https://godoc.org/github.com/howeyc/gopass) [](http://travis-ci.org/howeyc/gopass)
2 |
3 | You should probably just use [terminal](https://golang.org/x/crypto/ssh/terminal).
4 |
--------------------------------------------------------------------------------
/vendor/github.com/howeyc/gopass/terminal.go:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2012 Chris Howey
3 | *
4 | * Permission to use, copy, modify, and distribute this software for any
5 | * purpose with or without fee is hereby granted, provided that the above
6 | * copyright notice and this permission notice appear in all copies.
7 | *
8 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 | */
16 |
17 | // +build !solaris
18 |
19 | package gopass
20 |
21 | import "golang.org/x/crypto/ssh/terminal"
22 |
23 | type terminalState struct {
24 | state *terminal.State
25 | }
26 |
27 | func isTerminal(fd uintptr) bool {
28 | return terminal.IsTerminal(int(fd))
29 | }
30 |
31 | func makeRaw(fd uintptr) (*terminalState, error) {
32 | state, err := terminal.MakeRaw(int(fd))
33 |
34 | return &terminalState{
35 | state: state,
36 | }, err
37 | }
38 |
39 | func restore(fd uintptr, oldState *terminalState) error {
40 | return terminal.Restore(int(fd), oldState.state)
41 | }
42 |
--------------------------------------------------------------------------------
/vendor/github.com/jessevdk/go-flags/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 |
3 | os:
4 | - linux
5 | - osx
6 |
7 | go:
8 | - 1.x
9 | - 1.7.x
10 | - 1.8.x
11 | - 1.9.x
12 | - 1.10.x
13 |
14 | install:
15 | # go-flags
16 | - go get -d -v ./...
17 | - go build -v ./...
18 |
19 | # linting
20 | - go get github.com/golang/lint/golint
21 |
22 | # code coverage
23 | - go get golang.org/x/tools/cmd/cover
24 | - go get github.com/onsi/ginkgo/ginkgo
25 | - go get github.com/modocache/gover
26 | - if [ "$TRAVIS_SECURE_ENV_VARS" = "true" ]; then go get github.com/mattn/goveralls; fi
27 |
28 | script:
29 | # go-flags
30 | - $(exit $(gofmt -l . | wc -l))
31 | - go test -v ./...
32 |
33 | # linting
34 | - go tool vet -all=true -v=true . || true
35 | - $(go env GOPATH | awk 'BEGIN{FS=":"} {print $1}')/bin/golint ./...
36 |
37 | # code coverage
38 | - $(go env GOPATH | awk 'BEGIN{FS=":"} {print $1}')/bin/ginkgo -r -cover
39 | - $(go env GOPATH | awk 'BEGIN{FS=":"} {print $1}')/bin/gover
40 | - if [ "$TRAVIS_SECURE_ENV_VARS" = "true" ]; then $(go env GOPATH | awk 'BEGIN{FS=":"} {print $1}')/bin/goveralls -coverprofile=gover.coverprofile -service=travis-ci -repotoken $COVERALLS_TOKEN; fi
41 |
42 | env:
43 | # coveralls.io
44 | secure: "RCYbiB4P0RjQRIoUx/vG/AjP3mmYCbzOmr86DCww1Z88yNcy3hYr3Cq8rpPtYU5v0g7wTpu4adaKIcqRE9xknYGbqj3YWZiCoBP1/n4Z+9sHW3Dsd9D/GRGeHUus0laJUGARjWoCTvoEtOgTdGQDoX7mH+pUUY0FBltNYUdOiiU="
45 |
--------------------------------------------------------------------------------
/vendor/github.com/jessevdk/go-flags/arg.go:
--------------------------------------------------------------------------------
1 | package flags
2 |
3 | import (
4 | "reflect"
5 | )
6 |
7 | // Arg represents a positional argument on the command line.
8 | type Arg struct {
9 | // The name of the positional argument (used in the help)
10 | Name string
11 |
12 | // A description of the positional argument (used in the help)
13 | Description string
14 |
15 | // The minimal number of required positional arguments
16 | Required int
17 |
18 | // The maximum number of required positional arguments
19 | RequiredMaximum int
20 |
21 | value reflect.Value
22 | tag multiTag
23 | }
24 |
25 | func (a *Arg) isRemaining() bool {
26 | return a.value.Type().Kind() == reflect.Slice
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/jessevdk/go-flags/check_crosscompile.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | echo '# linux arm7'
6 | GOARM=7 GOARCH=arm GOOS=linux go build
7 | echo '# linux arm5'
8 | GOARM=5 GOARCH=arm GOOS=linux go build
9 | echo '# windows 386'
10 | GOARCH=386 GOOS=windows go build
11 | echo '# windows amd64'
12 | GOARCH=amd64 GOOS=windows go build
13 | echo '# darwin'
14 | GOARCH=amd64 GOOS=darwin go build
15 | echo '# freebsd'
16 | GOARCH=amd64 GOOS=freebsd go build
17 |
--------------------------------------------------------------------------------
/vendor/github.com/jessevdk/go-flags/closest.go:
--------------------------------------------------------------------------------
1 | package flags
2 |
3 | func levenshtein(s string, t string) int {
4 | if len(s) == 0 {
5 | return len(t)
6 | }
7 |
8 | if len(t) == 0 {
9 | return len(s)
10 | }
11 |
12 | dists := make([][]int, len(s)+1)
13 | for i := range dists {
14 | dists[i] = make([]int, len(t)+1)
15 | dists[i][0] = i
16 | }
17 |
18 | for j := range t {
19 | dists[0][j] = j
20 | }
21 |
22 | for i, sc := range s {
23 | for j, tc := range t {
24 | if sc == tc {
25 | dists[i+1][j+1] = dists[i][j]
26 | } else {
27 | dists[i+1][j+1] = dists[i][j] + 1
28 | if dists[i+1][j] < dists[i+1][j+1] {
29 | dists[i+1][j+1] = dists[i+1][j] + 1
30 | }
31 | if dists[i][j+1] < dists[i+1][j+1] {
32 | dists[i+1][j+1] = dists[i][j+1] + 1
33 | }
34 | }
35 | }
36 | }
37 |
38 | return dists[len(s)][len(t)]
39 | }
40 |
41 | func closestChoice(cmd string, choices []string) (string, int) {
42 | if len(choices) == 0 {
43 | return "", 0
44 | }
45 |
46 | mincmd := -1
47 | mindist := -1
48 |
49 | for i, c := range choices {
50 | l := levenshtein(cmd, c)
51 |
52 | if mincmd < 0 || l < mindist {
53 | mindist = l
54 | mincmd = i
55 | }
56 | }
57 |
58 | return choices[mincmd], mindist
59 | }
60 |
--------------------------------------------------------------------------------
/vendor/github.com/jessevdk/go-flags/termsize.go:
--------------------------------------------------------------------------------
1 | // +build !windows,!plan9,!solaris,!appengine
2 |
3 | package flags
4 |
5 | import (
6 | "syscall"
7 | "unsafe"
8 | )
9 |
10 | type winsize struct {
11 | row, col uint16
12 | xpixel, ypixel uint16
13 | }
14 |
15 | func getTerminalColumns() int {
16 | ws := winsize{}
17 |
18 | if tIOCGWINSZ != 0 {
19 | syscall.Syscall(syscall.SYS_IOCTL,
20 | uintptr(0),
21 | uintptr(tIOCGWINSZ),
22 | uintptr(unsafe.Pointer(&ws)))
23 |
24 | return int(ws.col)
25 | }
26 |
27 | return 80
28 | }
29 |
--------------------------------------------------------------------------------
/vendor/github.com/jessevdk/go-flags/termsize_nosysioctl.go:
--------------------------------------------------------------------------------
1 | // +build windows plan9 solaris appengine
2 |
3 | package flags
4 |
5 | func getTerminalColumns() int {
6 | return 80
7 | }
8 |
--------------------------------------------------------------------------------
/vendor/github.com/jessevdk/go-flags/tiocgwinsz_bsdish.go:
--------------------------------------------------------------------------------
1 | // +build darwin freebsd netbsd openbsd
2 |
3 | package flags
4 |
5 | const (
6 | tIOCGWINSZ = 0x40087468
7 | )
8 |
--------------------------------------------------------------------------------
/vendor/github.com/jessevdk/go-flags/tiocgwinsz_linux.go:
--------------------------------------------------------------------------------
1 | // +build linux
2 |
3 | package flags
4 |
5 | const (
6 | tIOCGWINSZ = 0x5413
7 | )
8 |
--------------------------------------------------------------------------------
/vendor/github.com/jessevdk/go-flags/tiocgwinsz_other.go:
--------------------------------------------------------------------------------
1 | // +build !darwin,!freebsd,!netbsd,!openbsd,!linux
2 |
3 | package flags
4 |
5 | const (
6 | tIOCGWINSZ = 0
7 | )
8 |
--------------------------------------------------------------------------------
/vendor/github.com/kr/fs/Readme:
--------------------------------------------------------------------------------
1 | Filesystem Package
2 |
3 | http://godoc.org/github.com/kr/fs
4 |
--------------------------------------------------------------------------------
/vendor/github.com/kr/fs/filesystem.go:
--------------------------------------------------------------------------------
1 | package fs
2 |
3 | import (
4 | "io/ioutil"
5 | "os"
6 | "path/filepath"
7 | )
8 |
9 | // FileSystem defines the methods of an abstract filesystem.
10 | type FileSystem interface {
11 |
12 | // ReadDir reads the directory named by dirname and returns a
13 | // list of directory entries.
14 | ReadDir(dirname string) ([]os.FileInfo, error)
15 |
16 | // Lstat returns a FileInfo describing the named file. If the file is a
17 | // symbolic link, the returned FileInfo describes the symbolic link. Lstat
18 | // makes no attempt to follow the link.
19 | Lstat(name string) (os.FileInfo, error)
20 |
21 | // Join joins any number of path elements into a single path, adding a
22 | // separator if necessary. The result is Cleaned; in particular, all
23 | // empty strings are ignored.
24 | //
25 | // The separator is FileSystem specific.
26 | Join(elem ...string) string
27 | }
28 |
29 | // fs represents a FileSystem provided by the os package.
30 | type fs struct{}
31 |
32 | func (f *fs) ReadDir(dirname string) ([]os.FileInfo, error) { return ioutil.ReadDir(dirname) }
33 |
34 | func (f *fs) Lstat(name string) (os.FileInfo, error) { return os.Lstat(name) }
35 |
36 | func (f *fs) Join(elem ...string) string { return filepath.Join(elem...) }
37 |
--------------------------------------------------------------------------------
/vendor/github.com/kr/fs/go.mod:
--------------------------------------------------------------------------------
1 | module "github.com/kr/fs"
2 |
--------------------------------------------------------------------------------
/vendor/github.com/mattn/go-colorable/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | go:
3 | - tip
4 |
5 | before_install:
6 | - go get github.com/mattn/goveralls
7 | - go get golang.org/x/tools/cmd/cover
8 | script:
9 | - $HOME/gopath/bin/goveralls -repotoken xnXqRGwgW3SXIguzxf90ZSK1GPYZPaGrw
10 |
--------------------------------------------------------------------------------
/vendor/github.com/mattn/go-colorable/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 Yasuhiro Matsumoto
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/vendor/github.com/mattn/go-colorable/colorable_appengine.go:
--------------------------------------------------------------------------------
1 | // +build appengine
2 |
3 | package colorable
4 |
5 | import (
6 | "io"
7 | "os"
8 |
9 | _ "github.com/mattn/go-isatty"
10 | )
11 |
12 | // NewColorable returns new instance of Writer which handles escape sequence.
13 | func NewColorable(file *os.File) io.Writer {
14 | if file == nil {
15 | panic("nil passed instead of *os.File to NewColorable()")
16 | }
17 |
18 | return file
19 | }
20 |
21 | // NewColorableStdout returns new instance of Writer which handles escape sequence for stdout.
22 | func NewColorableStdout() io.Writer {
23 | return os.Stdout
24 | }
25 |
26 | // NewColorableStderr returns new instance of Writer which handles escape sequence for stderr.
27 | func NewColorableStderr() io.Writer {
28 | return os.Stderr
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/github.com/mattn/go-colorable/colorable_others.go:
--------------------------------------------------------------------------------
1 | // +build !windows
2 | // +build !appengine
3 |
4 | package colorable
5 |
6 | import (
7 | "io"
8 | "os"
9 |
10 | _ "github.com/mattn/go-isatty"
11 | )
12 |
13 | // NewColorable returns new instance of Writer which handles escape sequence.
14 | func NewColorable(file *os.File) io.Writer {
15 | if file == nil {
16 | panic("nil passed instead of *os.File to NewColorable()")
17 | }
18 |
19 | return file
20 | }
21 |
22 | // NewColorableStdout returns new instance of Writer which handles escape sequence for stdout.
23 | func NewColorableStdout() io.Writer {
24 | return os.Stdout
25 | }
26 |
27 | // NewColorableStderr returns new instance of Writer which handles escape sequence for stderr.
28 | func NewColorableStderr() io.Writer {
29 | return os.Stderr
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/github.com/mattn/go-colorable/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/mattn/go-colorable
2 |
3 | require github.com/mattn/go-isatty v0.0.8
4 |
--------------------------------------------------------------------------------
/vendor/github.com/mattn/go-colorable/go.sum:
--------------------------------------------------------------------------------
1 | github.com/mattn/go-isatty v0.0.5 h1:tHXDdz1cpzGaovsTB+TVB8q90WEokoVmfMqoVcrLUgw=
2 | github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
3 | golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223 h1:DH4skfRX4EBpamg7iV4ZlCpblAHI6s6TDM39bFZumv8=
4 | golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
5 |
--------------------------------------------------------------------------------
/vendor/github.com/mattn/go-colorable/noncolorable.go:
--------------------------------------------------------------------------------
1 | package colorable
2 |
3 | import (
4 | "bytes"
5 | "io"
6 | )
7 |
8 | // NonColorable holds writer but removes escape sequence.
9 | type NonColorable struct {
10 | out io.Writer
11 | }
12 |
13 | // NewNonColorable returns new instance of Writer which removes escape sequence from Writer.
14 | func NewNonColorable(w io.Writer) io.Writer {
15 | return &NonColorable{out: w}
16 | }
17 |
18 | // Write writes data on console
19 | func (w *NonColorable) Write(data []byte) (n int, err error) {
20 | er := bytes.NewReader(data)
21 | var bw [1]byte
22 | loop:
23 | for {
24 | c1, err := er.ReadByte()
25 | if err != nil {
26 | break loop
27 | }
28 | if c1 != 0x1b {
29 | bw[0] = c1
30 | w.out.Write(bw[:])
31 | continue
32 | }
33 | c2, err := er.ReadByte()
34 | if err != nil {
35 | break loop
36 | }
37 | if c2 != 0x5b {
38 | continue
39 | }
40 |
41 | var buf bytes.Buffer
42 | for {
43 | c, err := er.ReadByte()
44 | if err != nil {
45 | break loop
46 | }
47 | if ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || c == '@' {
48 | break
49 | }
50 | buf.Write([]byte(string(c)))
51 | }
52 | }
53 |
54 | return len(data), nil
55 | }
56 |
--------------------------------------------------------------------------------
/vendor/github.com/mattn/go-isatty/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | go:
3 | - tip
4 |
5 | os:
6 | - linux
7 | - osx
8 |
9 | before_install:
10 | - go get github.com/mattn/goveralls
11 | - go get golang.org/x/tools/cmd/cover
12 | script:
13 | - $HOME/gopath/bin/goveralls -repotoken 3gHdORO5k5ziZcWMBxnd9LrMZaJs8m9x5
14 |
--------------------------------------------------------------------------------
/vendor/github.com/mattn/go-isatty/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) Yasuhiro MATSUMOTO
2 |
3 | MIT License (Expat)
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6 |
7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10 |
--------------------------------------------------------------------------------
/vendor/github.com/mattn/go-isatty/README.md:
--------------------------------------------------------------------------------
1 | # go-isatty
2 |
3 | [](http://godoc.org/github.com/mattn/go-isatty)
4 | [](https://travis-ci.org/mattn/go-isatty)
5 | [](https://coveralls.io/github/mattn/go-isatty?branch=master)
6 | [](https://goreportcard.com/report/mattn/go-isatty)
7 |
8 | isatty for golang
9 |
10 | ## Usage
11 |
12 | ```go
13 | package main
14 |
15 | import (
16 | "fmt"
17 | "github.com/mattn/go-isatty"
18 | "os"
19 | )
20 |
21 | func main() {
22 | if isatty.IsTerminal(os.Stdout.Fd()) {
23 | fmt.Println("Is Terminal")
24 | } else if isatty.IsCygwinTerminal(os.Stdout.Fd()) {
25 | fmt.Println("Is Cygwin/MSYS2 Terminal")
26 | } else {
27 | fmt.Println("Is Not Terminal")
28 | }
29 | }
30 | ```
31 |
32 | ## Installation
33 |
34 | ```
35 | $ go get github.com/mattn/go-isatty
36 | ```
37 |
38 | ## License
39 |
40 | MIT
41 |
42 | ## Author
43 |
44 | Yasuhiro Matsumoto (a.k.a mattn)
45 |
46 | ## Thanks
47 |
48 | * k-takata: base idea for IsCygwinTerminal
49 |
50 | https://github.com/k-takata/go-iscygpty
51 |
--------------------------------------------------------------------------------
/vendor/github.com/mattn/go-isatty/doc.go:
--------------------------------------------------------------------------------
1 | // Package isatty implements interface to isatty
2 | package isatty
3 |
--------------------------------------------------------------------------------
/vendor/github.com/mattn/go-isatty/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/mattn/go-isatty
2 |
3 | go 1.12
4 |
5 | require golang.org/x/sys v0.0.0-20191026070338-33540a1f6037
6 |
--------------------------------------------------------------------------------
/vendor/github.com/mattn/go-isatty/go.sum:
--------------------------------------------------------------------------------
1 | golang.org/x/sys v0.0.0-20191026070338-33540a1f6037 h1:YyJpGZS1sBuBCzLAR1VEpK193GlqGZbnPFnPV/5Rsb4=
2 | golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
3 |
--------------------------------------------------------------------------------
/vendor/github.com/mattn/go-isatty/isatty_android.go:
--------------------------------------------------------------------------------
1 | // +build android
2 |
3 | package isatty
4 |
5 | import (
6 | "syscall"
7 | "unsafe"
8 | )
9 |
10 | const ioctlReadTermios = syscall.TCGETS
11 |
12 | // IsTerminal return true if the file descriptor is terminal.
13 | func IsTerminal(fd uintptr) bool {
14 | var termios syscall.Termios
15 | _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0)
16 | return err == 0
17 | }
18 |
19 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2
20 | // terminal. This is also always false on this environment.
21 | func IsCygwinTerminal(fd uintptr) bool {
22 | return false
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/github.com/mattn/go-isatty/isatty_bsd.go:
--------------------------------------------------------------------------------
1 | // +build darwin freebsd openbsd netbsd dragonfly
2 | // +build !appengine
3 |
4 | package isatty
5 |
6 | import (
7 | "syscall"
8 | "unsafe"
9 | )
10 |
11 | const ioctlReadTermios = syscall.TIOCGETA
12 |
13 | // IsTerminal return true if the file descriptor is terminal.
14 | func IsTerminal(fd uintptr) bool {
15 | var termios syscall.Termios
16 | _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0)
17 | return err == 0
18 | }
19 |
20 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2
21 | // terminal. This is also always false on this environment.
22 | func IsCygwinTerminal(fd uintptr) bool {
23 | return false
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/github.com/mattn/go-isatty/isatty_others.go:
--------------------------------------------------------------------------------
1 | // +build appengine js nacl
2 |
3 | package isatty
4 |
5 | // IsTerminal returns true if the file descriptor is terminal which
6 | // is always false on js and appengine classic which is a sandboxed PaaS.
7 | func IsTerminal(fd uintptr) bool {
8 | return false
9 | }
10 |
11 | // IsCygwinTerminal() return true if the file descriptor is a cygwin or msys2
12 | // terminal. This is also always false on this environment.
13 | func IsCygwinTerminal(fd uintptr) bool {
14 | return false
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/github.com/mattn/go-isatty/isatty_plan9.go:
--------------------------------------------------------------------------------
1 | // +build plan9
2 |
3 | package isatty
4 |
5 | import (
6 | "syscall"
7 | )
8 |
9 | // IsTerminal returns true if the given file descriptor is a terminal.
10 | func IsTerminal(fd uintptr) bool {
11 | path, err := syscall.Fd2path(int(fd))
12 | if err != nil {
13 | return false
14 | }
15 | return path == "/dev/cons" || path == "/mnt/term/dev/cons"
16 | }
17 |
18 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2
19 | // terminal. This is also always false on this environment.
20 | func IsCygwinTerminal(fd uintptr) bool {
21 | return false
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/github.com/mattn/go-isatty/isatty_solaris.go:
--------------------------------------------------------------------------------
1 | // +build solaris
2 | // +build !appengine
3 |
4 | package isatty
5 |
6 | import (
7 | "golang.org/x/sys/unix"
8 | )
9 |
10 | // IsTerminal returns true if the given file descriptor is a terminal.
11 | // see: http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libbc/libc/gen/common/isatty.c
12 | func IsTerminal(fd uintptr) bool {
13 | var termio unix.Termio
14 | err := unix.IoctlSetTermio(int(fd), unix.TCGETA, &termio)
15 | return err == nil
16 | }
17 |
18 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2
19 | // terminal. This is also always false on this environment.
20 | func IsCygwinTerminal(fd uintptr) bool {
21 | return false
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/github.com/mattn/go-isatty/isatty_tcgets.go:
--------------------------------------------------------------------------------
1 | // +build linux aix
2 | // +build !appengine
3 | // +build !android
4 |
5 | package isatty
6 |
7 | import "golang.org/x/sys/unix"
8 |
9 | // IsTerminal return true if the file descriptor is terminal.
10 | func IsTerminal(fd uintptr) bool {
11 | _, err := unix.IoctlGetTermios(int(fd), unix.TCGETS)
12 | return err == nil
13 | }
14 |
15 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2
16 | // terminal. This is also always false on this environment.
17 | func IsCygwinTerminal(fd uintptr) bool {
18 | return false
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/github.com/pkg/errors/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
2 | *.o
3 | *.a
4 | *.so
5 |
6 | # Folders
7 | _obj
8 | _test
9 |
10 | # Architecture specific extensions/prefixes
11 | *.[568vq]
12 | [568vq].out
13 |
14 | *.cgo1.go
15 | *.cgo2.c
16 | _cgo_defun.c
17 | _cgo_gotypes.go
18 | _cgo_export.*
19 |
20 | _testmain.go
21 |
22 | *.exe
23 | *.test
24 | *.prof
25 |
--------------------------------------------------------------------------------
/vendor/github.com/pkg/errors/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | go_import_path: github.com/pkg/errors
3 | go:
4 | - 1.11.x
5 | - 1.12.x
6 | - 1.13.x
7 | - tip
8 |
9 | script:
10 | - make check
11 |
--------------------------------------------------------------------------------
/vendor/github.com/pkg/errors/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2015, Dave Cheney
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions are met:
6 |
7 | * Redistributions of source code must retain the above copyright notice, this
8 | list of conditions and the following disclaimer.
9 |
10 | * Redistributions in binary form must reproduce the above copyright notice,
11 | this list of conditions and the following disclaimer in the documentation
12 | and/or other materials provided with the distribution.
13 |
14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
18 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
20 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
21 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
22 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 |
--------------------------------------------------------------------------------
/vendor/github.com/pkg/errors/Makefile:
--------------------------------------------------------------------------------
1 | PKGS := github.com/pkg/errors
2 | SRCDIRS := $(shell go list -f '{{.Dir}}' $(PKGS))
3 | GO := go
4 |
5 | check: test vet gofmt misspell unconvert staticcheck ineffassign unparam
6 |
7 | test:
8 | $(GO) test $(PKGS)
9 |
10 | vet: | test
11 | $(GO) vet $(PKGS)
12 |
13 | staticcheck:
14 | $(GO) get honnef.co/go/tools/cmd/staticcheck
15 | staticcheck -checks all $(PKGS)
16 |
17 | misspell:
18 | $(GO) get github.com/client9/misspell/cmd/misspell
19 | misspell \
20 | -locale GB \
21 | -error \
22 | *.md *.go
23 |
24 | unconvert:
25 | $(GO) get github.com/mdempsky/unconvert
26 | unconvert -v $(PKGS)
27 |
28 | ineffassign:
29 | $(GO) get github.com/gordonklaus/ineffassign
30 | find $(SRCDIRS) -name '*.go' | xargs ineffassign
31 |
32 | pedantic: check errcheck
33 |
34 | unparam:
35 | $(GO) get mvdan.cc/unparam
36 | unparam ./...
37 |
38 | errcheck:
39 | $(GO) get github.com/kisielk/errcheck
40 | errcheck $(PKGS)
41 |
42 | gofmt:
43 | @echo Checking code is gofmted
44 | @test -z "$(shell gofmt -s -l -d -e $(SRCDIRS) | tee /dev/stderr)"
45 |
--------------------------------------------------------------------------------
/vendor/github.com/pkg/errors/appveyor.yml:
--------------------------------------------------------------------------------
1 | version: build-{build}.{branch}
2 |
3 | clone_folder: C:\gopath\src\github.com\pkg\errors
4 | shallow_clone: true # for startup speed
5 |
6 | environment:
7 | GOPATH: C:\gopath
8 |
9 | platform:
10 | - x64
11 |
12 | # http://www.appveyor.com/docs/installed-software
13 | install:
14 | # some helpful output for debugging builds
15 | - go version
16 | - go env
17 | # pre-installed MinGW at C:\MinGW is 32bit only
18 | # but MSYS2 at C:\msys64 has mingw64
19 | - set PATH=C:\msys64\mingw64\bin;%PATH%
20 | - gcc --version
21 | - g++ --version
22 |
23 | build_script:
24 | - go install -v ./...
25 |
26 | test_script:
27 | - set PATH=C:\gopath\bin;%PATH%
28 | - go test -v ./...
29 |
30 | #artifacts:
31 | # - path: '%GOPATH%\bin\*.exe'
32 | deploy: off
33 |
--------------------------------------------------------------------------------
/vendor/github.com/pkg/sftp/.gitignore:
--------------------------------------------------------------------------------
1 | .*.swo
2 | .*.swp
3 |
4 | server_standalone/server_standalone
5 |
6 | examples/*/id_rsa
7 | examples/*/id_rsa.pub
8 |
--------------------------------------------------------------------------------
/vendor/github.com/pkg/sftp/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | go_import_path: github.com/pkg/sftp
3 |
4 | # current and previous stable releases, plus tip
5 | # remember to exclude previous and tip for macs below
6 | go:
7 | - 1.14.x
8 | - 1.15.x
9 | - tip
10 |
11 | os:
12 | - linux
13 | - osx
14 |
15 | matrix:
16 | exclude:
17 | - os: osx
18 | go: 1.14.x
19 | - os: osx
20 | go: tip
21 |
22 | env:
23 | global:
24 | - GO111MODULE=on
25 |
26 | addons:
27 | ssh_known_hosts:
28 | - bitbucket.org
29 |
30 | install:
31 | - go get -t -v ./...
32 | - ssh-keygen -t rsa -q -P "" -f $HOME/.ssh/id_rsa
33 |
34 | script:
35 | - go test -integration -v ./...
36 | - go test -testserver -v ./...
37 | - go test -integration -testserver -v ./...
38 | - go test -integration -allocator -v ./...
39 | - go test -testserver -allocator -v ./...
40 | - go test -integration -testserver -allocator -v ./...
41 | - go test -race -integration -v ./...
42 | - go test -race -testserver -v ./...
43 | - go test -race -integration -testserver -v ./...
44 | - go test -race -integration -allocator -v ./...
45 | - go test -race -testserver -allocator -v ./...
46 | - go test -race -integration -allocator -testserver -v ./...
47 |
--------------------------------------------------------------------------------
/vendor/github.com/pkg/sftp/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | Dave Cheney
2 | Saulius Gurklys
3 | John Eikenberry
4 |
--------------------------------------------------------------------------------
/vendor/github.com/pkg/sftp/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2013, Dave Cheney
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
5 |
6 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8 |
9 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10 |
--------------------------------------------------------------------------------
/vendor/github.com/pkg/sftp/Makefile:
--------------------------------------------------------------------------------
1 | integration:
2 | go test -integration -v ./...
3 | go test -testserver -v ./...
4 | go test -integration -testserver -v ./...
5 | go test -integration -allocator -v ./...
6 | go test -testserver -allocator -v ./...
7 | go test -integration -testserver -allocator -v ./...
8 |
9 | integration_w_race:
10 | go test -race -integration -v ./...
11 | go test -race -testserver -v ./...
12 | go test -race -integration -testserver -v ./...
13 | go test -race -integration -allocator -v ./...
14 | go test -race -testserver -allocator -v ./...
15 | go test -race -integration -allocator -testserver -v ./...
16 |
17 |
18 |
--------------------------------------------------------------------------------
/vendor/github.com/pkg/sftp/attrs_stubs.go:
--------------------------------------------------------------------------------
1 | // +build !cgo,!plan9 windows android
2 |
3 | package sftp
4 |
5 | import (
6 | "os"
7 | )
8 |
9 | func fileStatFromInfoOs(fi os.FileInfo, flags *uint32, fileStat *FileStat) {
10 | // todo
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/github.com/pkg/sftp/attrs_unix.go:
--------------------------------------------------------------------------------
1 | // +build darwin dragonfly freebsd !android,linux netbsd openbsd solaris aix
2 | // +build cgo
3 |
4 | package sftp
5 |
6 | import (
7 | "os"
8 | "syscall"
9 | )
10 |
11 | func fileStatFromInfoOs(fi os.FileInfo, flags *uint32, fileStat *FileStat) {
12 | if statt, ok := fi.Sys().(*syscall.Stat_t); ok {
13 | *flags |= sshFileXferAttrUIDGID
14 | fileStat.UID = statt.Uid
15 | fileStat.GID = statt.Gid
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/github.com/pkg/sftp/debug.go:
--------------------------------------------------------------------------------
1 | // +build debug
2 |
3 | package sftp
4 |
5 | import "log"
6 |
7 | func debug(fmt string, args ...interface{}) {
8 | log.Printf(fmt, args...)
9 | }
10 |
--------------------------------------------------------------------------------
/vendor/github.com/pkg/sftp/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/pkg/sftp
2 |
3 | go 1.13
4 |
5 | require (
6 | github.com/kr/fs v0.1.0
7 | github.com/pkg/errors v0.9.1
8 | github.com/stretchr/testify v1.6.1
9 | golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a
10 | )
11 |
--------------------------------------------------------------------------------
/vendor/github.com/pkg/sftp/release.go:
--------------------------------------------------------------------------------
1 | // +build !debug
2 |
3 | package sftp
4 |
5 | func debug(fmt string, args ...interface{}) {}
6 |
--------------------------------------------------------------------------------
/vendor/github.com/pkg/sftp/request-unix.go:
--------------------------------------------------------------------------------
1 | // +build !windows
2 |
3 | package sftp
4 |
5 | import (
6 | "errors"
7 | "syscall"
8 | )
9 |
10 | func fakeFileInfoSys() interface{} {
11 | return &syscall.Stat_t{Uid: 65534, Gid: 65534}
12 | }
13 |
14 | func testOsSys(sys interface{}) error {
15 | fstat := sys.(*FileStat)
16 | if fstat.UID != uint32(65534) {
17 | return errors.New("Uid failed to match")
18 | }
19 | if fstat.GID != uint32(65534) {
20 | return errors.New("Gid failed to match")
21 | }
22 | return nil
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/github.com/pkg/sftp/request_windows.go:
--------------------------------------------------------------------------------
1 | package sftp
2 |
3 | import "syscall"
4 |
5 | func fakeFileInfoSys() interface{} {
6 | return syscall.Win32FileAttributeData{}
7 | }
8 |
9 | func testOsSys(sys interface{}) error {
10 | return nil
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/github.com/pkg/sftp/server_statvfs_darwin.go:
--------------------------------------------------------------------------------
1 | package sftp
2 |
3 | import (
4 | "syscall"
5 | )
6 |
7 | func statvfsFromStatfst(stat *syscall.Statfs_t) (*StatVFS, error) {
8 | return &StatVFS{
9 | Bsize: uint64(stat.Bsize),
10 | Frsize: uint64(stat.Bsize), // fragment size is a linux thing; use block size here
11 | Blocks: stat.Blocks,
12 | Bfree: stat.Bfree,
13 | Bavail: stat.Bavail,
14 | Files: stat.Files,
15 | Ffree: stat.Ffree,
16 | Favail: stat.Ffree, // not sure how to calculate Favail
17 | Fsid: uint64(uint64(stat.Fsid.Val[1])<<32 | uint64(stat.Fsid.Val[0])), // endianness?
18 | Flag: uint64(stat.Flags), // assuming POSIX?
19 | Namemax: 1024, // man 2 statfs shows: #define MAXPATHLEN 1024
20 | }, nil
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/github.com/pkg/sftp/server_statvfs_impl.go:
--------------------------------------------------------------------------------
1 | // +build darwin linux
2 |
3 | // fill in statvfs structure with OS specific values
4 | // Statfs_t is different per-kernel, and only exists on some unixes (not Solaris for instance)
5 |
6 | package sftp
7 |
8 | import (
9 | "syscall"
10 | )
11 |
12 | func (p sshFxpExtendedPacketStatVFS) respond(svr *Server) responsePacket {
13 | stat := &syscall.Statfs_t{}
14 | if err := syscall.Statfs(p.Path, stat); err != nil {
15 | return statusFromError(p, err)
16 | }
17 |
18 | retPkt, err := statvfsFromStatfst(stat)
19 | if err != nil {
20 | return statusFromError(p, err)
21 | }
22 | retPkt.ID = p.ID
23 |
24 | return retPkt
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/github.com/pkg/sftp/server_statvfs_linux.go:
--------------------------------------------------------------------------------
1 | // +build linux
2 |
3 | package sftp
4 |
5 | import (
6 | "syscall"
7 | )
8 |
9 | func statvfsFromStatfst(stat *syscall.Statfs_t) (*StatVFS, error) {
10 | return &StatVFS{
11 | Bsize: uint64(stat.Bsize),
12 | Frsize: uint64(stat.Frsize),
13 | Blocks: stat.Blocks,
14 | Bfree: stat.Bfree,
15 | Bavail: stat.Bavail,
16 | Files: stat.Files,
17 | Ffree: stat.Ffree,
18 | Favail: stat.Ffree, // not sure how to calculate Favail
19 | Flag: uint64(stat.Flags), // assuming POSIX?
20 | Namemax: uint64(stat.Namelen),
21 | }, nil
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/github.com/pkg/sftp/server_statvfs_stubs.go:
--------------------------------------------------------------------------------
1 | // +build !darwin,!linux
2 |
3 | package sftp
4 |
5 | import (
6 | "syscall"
7 | )
8 |
9 | func (p sshFxpExtendedPacketStatVFS) respond(svr *Server) responsePacket {
10 | return statusFromError(p, syscall.ENOTSUP)
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/github.com/pkg/sftp/server_stubs.go:
--------------------------------------------------------------------------------
1 | // +build !cgo,!plan9 windows android
2 |
3 | package sftp
4 |
5 | import (
6 | "os"
7 | "time"
8 | "fmt"
9 | )
10 |
11 | func runLs(dirname string, dirent os.FileInfo) string {
12 | typeword := runLsTypeWord(dirent)
13 | numLinks := 1
14 | if dirent.IsDir() {
15 | numLinks = 0
16 | }
17 | username := "root"
18 | groupname := "root"
19 | mtime := dirent.ModTime()
20 | monthStr := mtime.Month().String()[0:3]
21 | day := mtime.Day()
22 | year := mtime.Year()
23 | now := time.Now()
24 | isOld := mtime.Before(now.Add(-time.Hour * 24 * 365 / 2))
25 |
26 | yearOrTime := fmt.Sprintf("%02d:%02d", mtime.Hour(), mtime.Minute())
27 | if isOld {
28 | yearOrTime = fmt.Sprintf("%d", year)
29 | }
30 |
31 | return fmt.Sprintf("%s %4d %-8s %-8s %8d %s %2d %5s %s", typeword, numLinks, username, groupname, dirent.Size(), monthStr, day, yearOrTime, dirent.Name())
32 | }
33 |
--------------------------------------------------------------------------------
/vendor/github.com/pkg/sftp/syscall_fixed.go:
--------------------------------------------------------------------------------
1 | // +build plan9 windows js,wasm
2 |
3 | // Go defines S_IFMT on windows, plan9 and js/wasm as 0x1f000 instead of
4 | // 0xf000. None of the the other S_IFxyz values include the "1" (in 0x1f000)
5 | // which prevents them from matching the bitmask.
6 |
7 | package sftp
8 |
9 | const S_IFMT = 0xf000
10 |
--------------------------------------------------------------------------------
/vendor/github.com/pkg/sftp/syscall_good.go:
--------------------------------------------------------------------------------
1 | // +build !plan9,!windows
2 | // +build !js !wasm
3 |
4 | package sftp
5 |
6 | import "syscall"
7 |
8 | const S_IFMT = syscall.S_IFMT
9 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/PATENTS:
--------------------------------------------------------------------------------
1 | Additional IP Rights Grant (Patents)
2 |
3 | "This implementation" means the copyrightable works distributed by
4 | Google as part of the Go project.
5 |
6 | Google hereby grants to You a perpetual, worldwide, non-exclusive,
7 | no-charge, royalty-free, irrevocable (except as stated in this section)
8 | patent license to make, have made, use, offer to sell, sell, import,
9 | transfer and otherwise run, modify and propagate the contents of this
10 | implementation of Go, where such license applies only to those patent
11 | claims, both currently owned or controlled by Google and acquired in
12 | the future, licensable by Google that are necessarily infringed by this
13 | implementation of Go. This grant does not include claims that would be
14 | infringed only as a consequence of further modification of this
15 | implementation. If you or your agent or exclusive licensee institute or
16 | order or agree to the institution of patent litigation against any
17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging
18 | that this implementation of Go or any code incorporated within this
19 | implementation of Go constitutes direct or contributory patent
20 | infringement, or inducement of patent infringement, then any patent
21 | rights granted to you under this License for this implementation of Go
22 | shall terminate as of the date such litigation is filed.
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/chacha20/chacha_arm64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 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 | //go:build gc && !purego
6 |
7 | package chacha20
8 |
9 | const bufSize = 256
10 |
11 | //go:noescape
12 | func xorKeyStreamVX(dst, src []byte, key *[8]uint32, nonce *[3]uint32, counter *uint32)
13 |
14 | func (c *Cipher) xorKeyStreamBlocks(dst, src []byte) {
15 | xorKeyStreamVX(dst, src, &c.key, &c.nonce, &c.counter)
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/chacha20/chacha_noasm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 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 | //go:build (!arm64 && !s390x && !ppc64le) || !gc || purego
6 |
7 | package chacha20
8 |
9 | const bufSize = blockSize
10 |
11 | func (s *Cipher) xorKeyStreamBlocks(dst, src []byte) {
12 | s.xorKeyStreamBlocksGeneric(dst, src)
13 | }
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/chacha20/chacha_ppc64le.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 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 | //go:build gc && !purego
6 |
7 | package chacha20
8 |
9 | const bufSize = 256
10 |
11 | //go:noescape
12 | func chaCha20_ctr32_vsx(out, inp *byte, len int, key *[8]uint32, counter *uint32)
13 |
14 | func (c *Cipher) xorKeyStreamBlocks(dst, src []byte) {
15 | chaCha20_ctr32_vsx(&dst[0], &src[0], len(src), &c.key, &c.counter)
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/chacha20/chacha_s390x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 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 | //go:build gc && !purego
6 |
7 | package chacha20
8 |
9 | import "golang.org/x/sys/cpu"
10 |
11 | var haveAsm = cpu.S390X.HasVX
12 |
13 | const bufSize = 256
14 |
15 | // xorKeyStreamVX is an assembly implementation of XORKeyStream. It must only
16 | // be called when the vector facility is available. Implementation in asm_s390x.s.
17 | //
18 | //go:noescape
19 | func xorKeyStreamVX(dst, src []byte, key *[8]uint32, nonce *[3]uint32, counter *uint32)
20 |
21 | func (c *Cipher) xorKeyStreamBlocks(dst, src []byte) {
22 | if cpu.S390X.HasVX {
23 | xorKeyStreamVX(dst, src, &c.key, &c.nonce, &c.counter)
24 | } else {
25 | c.xorKeyStreamBlocksGeneric(dst, src)
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/chacha20/xor.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found src the LICENSE file.
4 |
5 | package chacha20
6 |
7 | import "runtime"
8 |
9 | // Platforms that have fast unaligned 32-bit little endian accesses.
10 | const unaligned = runtime.GOARCH == "386" ||
11 | runtime.GOARCH == "amd64" ||
12 | runtime.GOARCH == "arm64" ||
13 | runtime.GOARCH == "ppc64le" ||
14 | runtime.GOARCH == "s390x"
15 |
16 | // addXor reads a little endian uint32 from src, XORs it with (a + b) and
17 | // places the result in little endian byte order in dst.
18 | func addXor(dst, src []byte, a, b uint32) {
19 | _, _ = src[3], dst[3] // bounds check elimination hint
20 | if unaligned {
21 | // The compiler should optimize this code into
22 | // 32-bit unaligned little endian loads and stores.
23 | // TODO: delete once the compiler does a reliably
24 | // good job with the generic code below.
25 | // See issue #25111 for more details.
26 | v := uint32(src[0])
27 | v |= uint32(src[1]) << 8
28 | v |= uint32(src[2]) << 16
29 | v |= uint32(src[3]) << 24
30 | v ^= a + b
31 | dst[0] = byte(v)
32 | dst[1] = byte(v >> 8)
33 | dst[2] = byte(v >> 16)
34 | dst[3] = byte(v >> 24)
35 | } else {
36 | a += b
37 | dst[0] = src[0] ^ byte(a)
38 | dst[1] = src[1] ^ byte(a>>8)
39 | dst[2] = src[2] ^ byte(a>>16)
40 | dst[3] = src[3] ^ byte(a>>24)
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/curve25519/curve25519_go120.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 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 | //go:build go1.20
6 |
7 | package curve25519
8 |
9 | import "crypto/ecdh"
10 |
11 | func x25519(dst *[32]byte, scalar, point []byte) ([]byte, error) {
12 | curve := ecdh.X25519()
13 | pub, err := curve.NewPublicKey(point)
14 | if err != nil {
15 | return nil, err
16 | }
17 | priv, err := curve.NewPrivateKey(scalar)
18 | if err != nil {
19 | return nil, err
20 | }
21 | out, err := priv.ECDH(pub)
22 | if err != nil {
23 | return nil, err
24 | }
25 | copy(dst[:], out)
26 | return dst[:], nil
27 | }
28 |
29 | func scalarMult(dst, scalar, point *[32]byte) {
30 | if _, err := x25519(dst, scalar[:], point[:]); err != nil {
31 | // The only error condition for x25519 when the inputs are 32 bytes long
32 | // is if the output would have been the all-zero value.
33 | for i := range dst {
34 | dst[i] = 0
35 | }
36 | }
37 | }
38 |
39 | func scalarBaseMult(dst, scalar *[32]byte) {
40 | curve := ecdh.X25519()
41 | priv, err := curve.NewPrivateKey(scalar[:])
42 | if err != nil {
43 | panic("curve25519: internal error: scalarBaseMult was not 32 bytes")
44 | }
45 | copy(dst[:], priv.PublicKey().Bytes())
46 | }
47 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/curve25519/internal/field/README:
--------------------------------------------------------------------------------
1 | This package is kept in sync with crypto/ed25519/internal/edwards25519/field in
2 | the standard library.
3 |
4 | If there are any changes in the standard library that need to be synced to this
5 | package, run sync.sh. It will not overwrite any local changes made since the
6 | previous sync, so it's ok to land changes in this package first, and then sync
7 | to the standard library later.
8 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.go:
--------------------------------------------------------------------------------
1 | // Code generated by command: go run fe_amd64_asm.go -out ../fe_amd64.s -stubs ../fe_amd64.go -pkg field. DO NOT EDIT.
2 |
3 | //go:build amd64 && gc && !purego
4 |
5 | package field
6 |
7 | // feMul sets out = a * b. It works like feMulGeneric.
8 | //
9 | //go:noescape
10 | func feMul(out *Element, a *Element, b *Element)
11 |
12 | // feSquare sets out = a * a. It works like feSquareGeneric.
13 | //
14 | //go:noescape
15 | func feSquare(out *Element, a *Element)
16 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64_noasm.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2019 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 | //go:build !amd64 || !gc || purego
6 |
7 | package field
8 |
9 | func feMul(v, x, y *Element) { feMulGeneric(v, x, y) }
10 |
11 | func feSquare(v, x *Element) { feSquareGeneric(v, x) }
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2020 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 | //go:build arm64 && gc && !purego
6 |
7 | package field
8 |
9 | //go:noescape
10 | func carryPropagate(v *Element)
11 |
12 | func (v *Element) carryPropagate() *Element {
13 | carryPropagate(v)
14 | return v
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.s:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2020 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 | //go:build arm64 && gc && !purego
6 |
7 | #include "textflag.h"
8 |
9 | // carryPropagate works exactly like carryPropagateGeneric and uses the
10 | // same AND, ADD, and LSR+MADD instructions emitted by the compiler, but
11 | // avoids loading R0-R4 twice and uses LDP and STP.
12 | //
13 | // See https://golang.org/issues/43145 for the main compiler issue.
14 | //
15 | // func carryPropagate(v *Element)
16 | TEXT ·carryPropagate(SB),NOFRAME|NOSPLIT,$0-8
17 | MOVD v+0(FP), R20
18 |
19 | LDP 0(R20), (R0, R1)
20 | LDP 16(R20), (R2, R3)
21 | MOVD 32(R20), R4
22 |
23 | AND $0x7ffffffffffff, R0, R10
24 | AND $0x7ffffffffffff, R1, R11
25 | AND $0x7ffffffffffff, R2, R12
26 | AND $0x7ffffffffffff, R3, R13
27 | AND $0x7ffffffffffff, R4, R14
28 |
29 | ADD R0>>51, R11, R11
30 | ADD R1>>51, R12, R12
31 | ADD R2>>51, R13, R13
32 | ADD R3>>51, R14, R14
33 | // R4>>51 * 19 + R10 -> R10
34 | LSR $51, R4, R21
35 | MOVD $19, R22
36 | MADD R22, R10, R21, R10
37 |
38 | STP (R10, R11), 0(R20)
39 | STP (R12, R13), 16(R20)
40 | MOVD R14, 32(R20)
41 |
42 | RET
43 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64_noasm.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2021 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 | //go:build !arm64 || !gc || purego
6 |
7 | package field
8 |
9 | func (v *Element) carryPropagate() *Element {
10 | return v.carryPropagateGeneric()
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/curve25519/internal/field/sync.checkpoint:
--------------------------------------------------------------------------------
1 | b0c49ae9f59d233526f8934262c5bbbe14d4358d
2 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/curve25519/internal/field/sync.sh:
--------------------------------------------------------------------------------
1 | #! /bin/bash
2 | set -euo pipefail
3 |
4 | cd "$(git rev-parse --show-toplevel)"
5 |
6 | STD_PATH=src/crypto/ed25519/internal/edwards25519/field
7 | LOCAL_PATH=curve25519/internal/field
8 | LAST_SYNC_REF=$(cat $LOCAL_PATH/sync.checkpoint)
9 |
10 | git fetch https://go.googlesource.com/go master
11 |
12 | if git diff --quiet $LAST_SYNC_REF:$STD_PATH FETCH_HEAD:$STD_PATH; then
13 | echo "No changes."
14 | else
15 | NEW_REF=$(git rev-parse FETCH_HEAD | tee $LOCAL_PATH/sync.checkpoint)
16 | echo "Applying changes from $LAST_SYNC_REF to $NEW_REF..."
17 | git diff $LAST_SYNC_REF:$STD_PATH FETCH_HEAD:$STD_PATH | \
18 | git apply -3 --directory=$LOCAL_PATH
19 | fi
20 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/internal/alias/alias.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 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 | //go:build !purego
6 |
7 | // Package alias implements memory aliasing tests.
8 | package alias
9 |
10 | import "unsafe"
11 |
12 | // AnyOverlap reports whether x and y share memory at any (not necessarily
13 | // corresponding) index. The memory beyond the slice length is ignored.
14 | func AnyOverlap(x, y []byte) bool {
15 | return len(x) > 0 && len(y) > 0 &&
16 | uintptr(unsafe.Pointer(&x[0])) <= uintptr(unsafe.Pointer(&y[len(y)-1])) &&
17 | uintptr(unsafe.Pointer(&y[0])) <= uintptr(unsafe.Pointer(&x[len(x)-1]))
18 | }
19 |
20 | // InexactOverlap reports whether x and y share memory at any non-corresponding
21 | // index. The memory beyond the slice length is ignored. Note that x and y can
22 | // have different lengths and still not have any inexact overlap.
23 | //
24 | // InexactOverlap can be used to implement the requirements of the crypto/cipher
25 | // AEAD, Block, BlockMode and Stream interfaces.
26 | func InexactOverlap(x, y []byte) bool {
27 | if len(x) == 0 || len(y) == 0 || &x[0] == &y[0] {
28 | return false
29 | }
30 | return AnyOverlap(x, y)
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/internal/alias/alias_purego.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 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 | //go:build purego
6 |
7 | // Package alias implements memory aliasing tests.
8 | package alias
9 |
10 | // This is the Google App Engine standard variant based on reflect
11 | // because the unsafe package and cgo are disallowed.
12 |
13 | import "reflect"
14 |
15 | // AnyOverlap reports whether x and y share memory at any (not necessarily
16 | // corresponding) index. The memory beyond the slice length is ignored.
17 | func AnyOverlap(x, y []byte) bool {
18 | return len(x) > 0 && len(y) > 0 &&
19 | reflect.ValueOf(&x[0]).Pointer() <= reflect.ValueOf(&y[len(y)-1]).Pointer() &&
20 | reflect.ValueOf(&y[0]).Pointer() <= reflect.ValueOf(&x[len(x)-1]).Pointer()
21 | }
22 |
23 | // InexactOverlap reports whether x and y share memory at any non-corresponding
24 | // index. The memory beyond the slice length is ignored. Note that x and y can
25 | // have different lengths and still not have any inexact overlap.
26 | //
27 | // InexactOverlap can be used to implement the requirements of the crypto/cipher
28 | // AEAD, Block, BlockMode and Stream interfaces.
29 | func InexactOverlap(x, y []byte) bool {
30 | if len(x) == 0 || len(y) == 0 || &x[0] == &y[0] {
31 | return false
32 | }
33 | return AnyOverlap(x, y)
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/internal/poly1305/bits_compat.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 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 | //go:build !go1.13
6 |
7 | package poly1305
8 |
9 | // Generic fallbacks for the math/bits intrinsics, copied from
10 | // src/math/bits/bits.go. They were added in Go 1.12, but Add64 and Sum64 had
11 | // variable time fallbacks until Go 1.13.
12 |
13 | func bitsAdd64(x, y, carry uint64) (sum, carryOut uint64) {
14 | sum = x + y + carry
15 | carryOut = ((x & y) | ((x | y) &^ sum)) >> 63
16 | return
17 | }
18 |
19 | func bitsSub64(x, y, borrow uint64) (diff, borrowOut uint64) {
20 | diff = x - y - borrow
21 | borrowOut = ((^x & y) | (^(x ^ y) & diff)) >> 63
22 | return
23 | }
24 |
25 | func bitsMul64(x, y uint64) (hi, lo uint64) {
26 | const mask32 = 1<<32 - 1
27 | x0 := x & mask32
28 | x1 := x >> 32
29 | y0 := y & mask32
30 | y1 := y >> 32
31 | w0 := x0 * y0
32 | t := x1*y0 + w0>>32
33 | w1 := t & mask32
34 | w2 := t >> 32
35 | w1 += x0 * y1
36 | hi = x1*y1 + w2 + w1>>32
37 | lo = x * y
38 | return
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/internal/poly1305/bits_go1.13.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 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 | //go:build go1.13
6 |
7 | package poly1305
8 |
9 | import "math/bits"
10 |
11 | func bitsAdd64(x, y, carry uint64) (sum, carryOut uint64) {
12 | return bits.Add64(x, y, carry)
13 | }
14 |
15 | func bitsSub64(x, y, borrow uint64) (diff, borrowOut uint64) {
16 | return bits.Sub64(x, y, borrow)
17 | }
18 |
19 | func bitsMul64(x, y uint64) (hi, lo uint64) {
20 | return bits.Mul64(x, y)
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/internal/poly1305/mac_noasm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 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 | //go:build (!amd64 && !ppc64le && !s390x) || !gc || purego
6 |
7 | package poly1305
8 |
9 | type mac struct{ macGeneric }
10 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/internal/poly1305/sum_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 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 | //go:build gc && !purego
6 |
7 | package poly1305
8 |
9 | //go:noescape
10 | func update(state *macState, msg []byte)
11 |
12 | // mac is a wrapper for macGeneric that redirects calls that would have gone to
13 | // updateGeneric to update.
14 | //
15 | // Its Write and Sum methods are otherwise identical to the macGeneric ones, but
16 | // using function pointers would carry a major performance cost.
17 | type mac struct{ macGeneric }
18 |
19 | func (h *mac) Write(p []byte) (int, error) {
20 | nn := len(p)
21 | if h.offset > 0 {
22 | n := copy(h.buffer[h.offset:], p)
23 | if h.offset+n < TagSize {
24 | h.offset += n
25 | return nn, nil
26 | }
27 | p = p[n:]
28 | h.offset = 0
29 | update(&h.macState, h.buffer[:])
30 | }
31 | if n := len(p) - (len(p) % TagSize); n > 0 {
32 | update(&h.macState, p[:n])
33 | p = p[n:]
34 | }
35 | if len(p) > 0 {
36 | h.offset += copy(h.buffer[h.offset:], p)
37 | }
38 | return nn, nil
39 | }
40 |
41 | func (h *mac) Sum(out *[16]byte) {
42 | state := h.macState
43 | if h.offset > 0 {
44 | update(&state, h.buffer[:h.offset])
45 | }
46 | finalize(out, &state.h, &state.s)
47 | }
48 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 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 | //go:build gc && !purego
6 |
7 | package poly1305
8 |
9 | //go:noescape
10 | func update(state *macState, msg []byte)
11 |
12 | // mac is a wrapper for macGeneric that redirects calls that would have gone to
13 | // updateGeneric to update.
14 | //
15 | // Its Write and Sum methods are otherwise identical to the macGeneric ones, but
16 | // using function pointers would carry a major performance cost.
17 | type mac struct{ macGeneric }
18 |
19 | func (h *mac) Write(p []byte) (int, error) {
20 | nn := len(p)
21 | if h.offset > 0 {
22 | n := copy(h.buffer[h.offset:], p)
23 | if h.offset+n < TagSize {
24 | h.offset += n
25 | return nn, nil
26 | }
27 | p = p[n:]
28 | h.offset = 0
29 | update(&h.macState, h.buffer[:])
30 | }
31 | if n := len(p) - (len(p) % TagSize); n > 0 {
32 | update(&h.macState, p[:n])
33 | p = p[n:]
34 | }
35 | if len(p) > 0 {
36 | h.offset += copy(h.buffer[h.offset:], p)
37 | }
38 | return nn, nil
39 | }
40 |
41 | func (h *mac) Sum(out *[16]byte) {
42 | state := h.macState
43 | if h.offset > 0 {
44 | update(&state, h.buffer[:h.offset])
45 | }
46 | finalize(out, &state.h, &state.s)
47 | }
48 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/ssh/doc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 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 | /*
6 | Package ssh implements an SSH client and server.
7 |
8 | SSH is a transport security protocol, an authentication protocol and a
9 | family of application protocols. The most typical application level
10 | protocol is a remote shell and this is specifically implemented. However,
11 | the multiplexed nature of SSH is exposed to users that wish to support
12 | others.
13 |
14 | References:
15 |
16 | [PROTOCOL]: https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/PROTOCOL?rev=HEAD
17 | [PROTOCOL.certkeys]: http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/PROTOCOL.certkeys?rev=HEAD
18 | [SSH-PARAMETERS]: http://www.iana.org/assignments/ssh-parameters/ssh-parameters.xml#ssh-parameters-1
19 |
20 | This package does not fall under the stability promise of the Go language itself,
21 | so its API may be changed when pressing needs arise.
22 | */
23 | package ssh // import "golang.org/x/crypto/ssh"
24 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/PATENTS:
--------------------------------------------------------------------------------
1 | Additional IP Rights Grant (Patents)
2 |
3 | "This implementation" means the copyrightable works distributed by
4 | Google as part of the Go project.
5 |
6 | Google hereby grants to You a perpetual, worldwide, non-exclusive,
7 | no-charge, royalty-free, irrevocable (except as stated in this section)
8 | patent license to make, have made, use, offer to sell, sell, import,
9 | transfer and otherwise run, modify and propagate the contents of this
10 | implementation of Go, where such license applies only to those patent
11 | claims, both currently owned or controlled by Google and acquired in
12 | the future, licensable by Google that are necessarily infringed by this
13 | implementation of Go. This grant does not include claims that would be
14 | infringed only as a consequence of further modification of this
15 | implementation. If you or your agent or exclusive licensee institute or
16 | order or agree to the institution of patent litigation against any
17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging
18 | that this implementation of Go or any code incorporated within this
19 | implementation of Go constitutes direct or contributory patent
20 | infringement, or inducement of patent infringement, then any patent
21 | rights granted to you under this License for this implementation of Go
22 | shall terminate as of the date such litigation is filed.
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2018 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 | //go:build gc
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go
11 | //
12 |
13 | TEXT ·syscall6(SB),NOSPLIT,$0-88
14 | JMP syscall·syscall6(SB)
15 |
16 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88
17 | JMP syscall·rawSyscall6(SB)
18 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_aix.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 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 | //go:build aix
6 |
7 | package cpu
8 |
9 | const (
10 | // getsystemcfg constants
11 | _SC_IMPL = 2
12 | _IMPL_POWER8 = 0x10000
13 | _IMPL_POWER9 = 0x20000
14 | )
15 |
16 | func archInit() {
17 | impl := getsystemcfg(_SC_IMPL)
18 | if impl&_IMPL_POWER8 != 0 {
19 | PPC64.IsPOWER8 = true
20 | }
21 | if impl&_IMPL_POWER9 != 0 {
22 | PPC64.IsPOWER8 = true
23 | PPC64.IsPOWER9 = true
24 | }
25 |
26 | Initialized = true
27 | }
28 |
29 | func getsystemcfg(label int) (n uint64) {
30 | r0, _ := callgetsystemcfg(label)
31 | n = uint64(r0)
32 | return
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_arm64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2019 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 | //go:build gc
6 |
7 | #include "textflag.h"
8 |
9 | // func getisar0() uint64
10 | TEXT ·getisar0(SB),NOSPLIT,$0-8
11 | // get Instruction Set Attributes 0 into x0
12 | // mrs x0, ID_AA64ISAR0_EL1 = d5380600
13 | WORD $0xd5380600
14 | MOVD R0, ret+0(FP)
15 | RET
16 |
17 | // func getisar1() uint64
18 | TEXT ·getisar1(SB),NOSPLIT,$0-8
19 | // get Instruction Set Attributes 1 into x0
20 | // mrs x0, ID_AA64ISAR1_EL1 = d5380620
21 | WORD $0xd5380620
22 | MOVD R0, ret+0(FP)
23 | RET
24 |
25 | // func getpfr0() uint64
26 | TEXT ·getpfr0(SB),NOSPLIT,$0-8
27 | // get Processor Feature Register 0 into x0
28 | // mrs x0, ID_AA64PFR0_EL1 = d5380400
29 | WORD $0xd5380400
30 | MOVD R0, ret+0(FP)
31 | RET
32 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 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 | //go:build gc
6 |
7 | package cpu
8 |
9 | func getisar0() uint64
10 | func getisar1() uint64
11 | func getpfr0() uint64
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 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 | //go:build gc
6 |
7 | package cpu
8 |
9 | // haveAsmFunctions reports whether the other functions in this file can
10 | // be safely called.
11 | func haveAsmFunctions() bool { return true }
12 |
13 | // The following feature detection functions are defined in cpu_s390x.s.
14 | // They are likely to be expensive to call so the results should be cached.
15 | func stfle() facilityList
16 | func kmQuery() queryResult
17 | func kmcQuery() queryResult
18 | func kmctrQuery() queryResult
19 | func kmaQuery() queryResult
20 | func kimdQuery() queryResult
21 | func klmdQuery() queryResult
22 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 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 | //go:build (386 || amd64 || amd64p32) && gc
6 |
7 | package cpu
8 |
9 | // cpuid is implemented in cpu_x86.s for gc compiler
10 | // and in cpu_gccgo.c for gccgo.
11 | func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32)
12 |
13 | // xgetbv with ecx = 0 is implemented in cpu_x86.s for gc compiler
14 | // and in cpu_gccgo.c for gccgo.
15 | func xgetbv() (eax, edx uint32)
16 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 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 | //go:build gccgo
6 |
7 | package cpu
8 |
9 | func getisar0() uint64 { return 0 }
10 | func getisar1() uint64 { return 0 }
11 | func getpfr0() uint64 { return 0 }
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_gccgo_s390x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 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 | //go:build gccgo
6 |
7 | package cpu
8 |
9 | // haveAsmFunctions reports whether the other functions in this file can
10 | // be safely called.
11 | func haveAsmFunctions() bool { return false }
12 |
13 | // TODO(mundaym): the following feature detection functions are currently
14 | // stubs. See https://golang.org/cl/162887 for how to fix this.
15 | // They are likely to be expensive to call so the results should be cached.
16 | func stfle() facilityList { panic("not implemented for gccgo") }
17 | func kmQuery() queryResult { panic("not implemented for gccgo") }
18 | func kmcQuery() queryResult { panic("not implemented for gccgo") }
19 | func kmctrQuery() queryResult { panic("not implemented for gccgo") }
20 | func kmaQuery() queryResult { panic("not implemented for gccgo") }
21 | func kimdQuery() queryResult { panic("not implemented for gccgo") }
22 | func klmdQuery() queryResult { panic("not implemented for gccgo") }
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.c:
--------------------------------------------------------------------------------
1 | // Copyright 2018 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 | //go:build (386 || amd64 || amd64p32) && gccgo
6 |
7 | #include
8 | #include
9 | #include
10 |
11 | // Need to wrap __get_cpuid_count because it's declared as static.
12 | int
13 | gccgoGetCpuidCount(uint32_t leaf, uint32_t subleaf,
14 | uint32_t *eax, uint32_t *ebx,
15 | uint32_t *ecx, uint32_t *edx)
16 | {
17 | return __get_cpuid_count(leaf, subleaf, eax, ebx, ecx, edx);
18 | }
19 |
20 | #pragma GCC diagnostic ignored "-Wunknown-pragmas"
21 | #pragma GCC push_options
22 | #pragma GCC target("xsave")
23 | #pragma clang attribute push (__attribute__((target("xsave"))), apply_to=function)
24 |
25 | // xgetbv reads the contents of an XCR (Extended Control Register)
26 | // specified in the ECX register into registers EDX:EAX.
27 | // Currently, the only supported value for XCR is 0.
28 | void
29 | gccgoXgetbv(uint32_t *eax, uint32_t *edx)
30 | {
31 | uint64_t v = _xgetbv(0);
32 | *eax = v & 0xffffffff;
33 | *edx = v >> 32;
34 | }
35 |
36 | #pragma clang attribute pop
37 | #pragma GCC pop_options
38 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 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 | //go:build (386 || amd64 || amd64p32) && gccgo
6 |
7 | package cpu
8 |
9 | //extern gccgoGetCpuidCount
10 | func gccgoGetCpuidCount(eaxArg, ecxArg uint32, eax, ebx, ecx, edx *uint32)
11 |
12 | func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32) {
13 | var a, b, c, d uint32
14 | gccgoGetCpuidCount(eaxArg, ecxArg, &a, &b, &c, &d)
15 | return a, b, c, d
16 | }
17 |
18 | //extern gccgoXgetbv
19 | func gccgoXgetbv(eax, edx *uint32)
20 |
21 | func xgetbv() (eax, edx uint32) {
22 | var a, d uint32
23 | gccgoXgetbv(&a, &d)
24 | return a, d
25 | }
26 |
27 | // gccgo doesn't build on Darwin, per:
28 | // https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/gcc.rb#L76
29 | func darwinSupportsAVX512() bool {
30 | return false
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_linux.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 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 | //go:build !386 && !amd64 && !amd64p32 && !arm64
6 |
7 | package cpu
8 |
9 | func archInit() {
10 | if err := readHWCAP(); err != nil {
11 | return
12 | }
13 | doinit()
14 | Initialized = true
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 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 | //go:build linux && (mips64 || mips64le)
6 |
7 | package cpu
8 |
9 | // HWCAP bits. These are exposed by the Linux kernel 5.4.
10 | const (
11 | // CPU features
12 | hwcap_MIPS_MSA = 1 << 1
13 | )
14 |
15 | func doinit() {
16 | // HWCAP feature bits
17 | MIPS64X.HasMSA = isSet(hwCap, hwcap_MIPS_MSA)
18 | }
19 |
20 | func isSet(hwc uint, value uint) bool {
21 | return hwc&value != 0
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 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 | //go:build linux && !arm && !arm64 && !mips64 && !mips64le && !ppc64 && !ppc64le && !s390x
6 |
7 | package cpu
8 |
9 | func doinit() {}
10 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 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 | //go:build linux && (ppc64 || ppc64le)
6 |
7 | package cpu
8 |
9 | // HWCAP/HWCAP2 bits. These are exposed by the kernel.
10 | const (
11 | // ISA Level
12 | _PPC_FEATURE2_ARCH_2_07 = 0x80000000
13 | _PPC_FEATURE2_ARCH_3_00 = 0x00800000
14 |
15 | // CPU features
16 | _PPC_FEATURE2_DARN = 0x00200000
17 | _PPC_FEATURE2_SCV = 0x00100000
18 | )
19 |
20 | func doinit() {
21 | // HWCAP2 feature bits
22 | PPC64.IsPOWER8 = isSet(hwCap2, _PPC_FEATURE2_ARCH_2_07)
23 | PPC64.IsPOWER9 = isSet(hwCap2, _PPC_FEATURE2_ARCH_3_00)
24 | PPC64.HasDARN = isSet(hwCap2, _PPC_FEATURE2_DARN)
25 | PPC64.HasSCV = isSet(hwCap2, _PPC_FEATURE2_SCV)
26 | }
27 |
28 | func isSet(hwc uint, value uint) bool {
29 | return hwc&value != 0
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 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 cpu
6 |
7 | const (
8 | // bit mask values from /usr/include/bits/hwcap.h
9 | hwcap_ZARCH = 2
10 | hwcap_STFLE = 4
11 | hwcap_MSA = 8
12 | hwcap_LDISP = 16
13 | hwcap_EIMM = 32
14 | hwcap_DFP = 64
15 | hwcap_ETF3EH = 256
16 | hwcap_VX = 2048
17 | hwcap_VXE = 8192
18 | )
19 |
20 | func initS390Xbase() {
21 | // test HWCAP bit vector
22 | has := func(featureMask uint) bool {
23 | return hwCap&featureMask == featureMask
24 | }
25 |
26 | // mandatory
27 | S390X.HasZARCH = has(hwcap_ZARCH)
28 |
29 | // optional
30 | S390X.HasSTFLE = has(hwcap_STFLE)
31 | S390X.HasLDISP = has(hwcap_LDISP)
32 | S390X.HasEIMM = has(hwcap_EIMM)
33 | S390X.HasETF3EH = has(hwcap_ETF3EH)
34 | S390X.HasDFP = has(hwcap_DFP)
35 | S390X.HasMSA = has(hwcap_MSA)
36 | S390X.HasVX = has(hwcap_VX)
37 | if S390X.HasVX {
38 | S390X.HasVXE = has(hwcap_VXE)
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_loong64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 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 | //go:build loong64
6 |
7 | package cpu
8 |
9 | const cacheLineSize = 64
10 |
11 | func initOptions() {
12 | }
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_mips64x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 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 | //go:build mips64 || mips64le
6 |
7 | package cpu
8 |
9 | const cacheLineSize = 32
10 |
11 | func initOptions() {
12 | options = []option{
13 | {Name: "msa", Feature: &MIPS64X.HasMSA},
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_mipsx.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 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 | //go:build mips || mipsle
6 |
7 | package cpu
8 |
9 | const cacheLineSize = 32
10 |
11 | func initOptions() {}
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2022 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 | #include "textflag.h"
6 |
7 | TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
8 | JMP libc_sysctl(SB)
9 |
10 | GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8
11 | DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_other_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 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 | //go:build !linux && arm
6 |
7 | package cpu
8 |
9 | func archInit() {}
10 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 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 | //go:build !linux && !netbsd && !openbsd && arm64
6 |
7 | package cpu
8 |
9 | func doinit() {}
10 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_other_mips64x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 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 | //go:build !linux && (mips64 || mips64le)
6 |
7 | package cpu
8 |
9 | func archInit() {
10 | Initialized = true
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_other_ppc64x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 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 | //go:build !aix && !linux && (ppc64 || ppc64le)
6 |
7 | package cpu
8 |
9 | func archInit() {
10 | PPC64.IsPOWER8 = true
11 | Initialized = true
12 | }
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_other_riscv64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 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 | //go:build !linux && riscv64
6 |
7 | package cpu
8 |
9 | func archInit() {
10 | Initialized = true
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_ppc64x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 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 | //go:build ppc64 || ppc64le
6 |
7 | package cpu
8 |
9 | const cacheLineSize = 128
10 |
11 | func initOptions() {
12 | options = []option{
13 | {Name: "darn", Feature: &PPC64.HasDARN},
14 | {Name: "scv", Feature: &PPC64.HasSCV},
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_riscv64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 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 | //go:build riscv64
6 |
7 | package cpu
8 |
9 | const cacheLineSize = 64
10 |
11 | func initOptions() {}
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_wasm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 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 | //go:build wasm
6 |
7 | package cpu
8 |
9 | // We're compiling the cpu package for an unknown (software-abstracted) CPU.
10 | // Make CacheLinePad an empty struct and hope that the usual struct alignment
11 | // rules are good enough.
12 |
13 | const cacheLineSize = 0
14 |
15 | func initOptions() {}
16 |
17 | func archInit() {}
18 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_x86.s:
--------------------------------------------------------------------------------
1 | // Copyright 2018 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 | //go:build (386 || amd64 || amd64p32) && gc
6 |
7 | #include "textflag.h"
8 |
9 | // func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32)
10 | TEXT ·cpuid(SB), NOSPLIT, $0-24
11 | MOVL eaxArg+0(FP), AX
12 | MOVL ecxArg+4(FP), CX
13 | CPUID
14 | MOVL AX, eax+8(FP)
15 | MOVL BX, ebx+12(FP)
16 | MOVL CX, ecx+16(FP)
17 | MOVL DX, edx+20(FP)
18 | RET
19 |
20 | // func xgetbv() (eax, edx uint32)
21 | TEXT ·xgetbv(SB),NOSPLIT,$0-8
22 | MOVL $0, CX
23 | XGETBV
24 | MOVL AX, eax+0(FP)
25 | MOVL DX, edx+4(FP)
26 | RET
27 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_zos.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 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 cpu
6 |
7 | func archInit() {
8 | doinit()
9 | Initialized = true
10 | }
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_zos_s390x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 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 cpu
6 |
7 | func initS390Xbase() {
8 | // get the facilities list
9 | facilities := stfle()
10 |
11 | // mandatory
12 | S390X.HasZARCH = facilities.Has(zarch)
13 | S390X.HasSTFLE = facilities.Has(stflef)
14 | S390X.HasLDISP = facilities.Has(ldisp)
15 | S390X.HasEIMM = facilities.Has(eimm)
16 |
17 | // optional
18 | S390X.HasETF3EH = facilities.Has(etf3eh)
19 | S390X.HasDFP = facilities.Has(dfp)
20 | S390X.HasMSA = facilities.Has(msa)
21 | S390X.HasVX = facilities.Has(vx)
22 | if S390X.HasVX {
23 | S390X.HasVXE = facilities.Has(vxe)
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/endian_big.go:
--------------------------------------------------------------------------------
1 | // Copyright 2023 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 | //go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64
6 |
7 | package cpu
8 |
9 | // IsBigEndian records whether the GOARCH's byte order is big endian.
10 | const IsBigEndian = true
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/endian_little.go:
--------------------------------------------------------------------------------
1 | // Copyright 2023 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 | //go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh || wasm
6 |
7 | package cpu
8 |
9 | // IsBigEndian records whether the GOARCH's byte order is big endian.
10 | const IsBigEndian = false
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/parse.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 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 cpu
6 |
7 | import "strconv"
8 |
9 | // parseRelease parses a dot-separated version number. It follows the semver
10 | // syntax, but allows the minor and patch versions to be elided.
11 | //
12 | // This is a copy of the Go runtime's parseRelease from
13 | // https://golang.org/cl/209597.
14 | func parseRelease(rel string) (major, minor, patch int, ok bool) {
15 | // Strip anything after a dash or plus.
16 | for i := 0; i < len(rel); i++ {
17 | if rel[i] == '-' || rel[i] == '+' {
18 | rel = rel[:i]
19 | break
20 | }
21 | }
22 |
23 | next := func() (int, bool) {
24 | for i := 0; i < len(rel); i++ {
25 | if rel[i] == '.' {
26 | ver, err := strconv.Atoi(rel[:i])
27 | rel = rel[i+1:]
28 | return ver, err == nil
29 | }
30 | }
31 | ver, err := strconv.Atoi(rel)
32 | rel = ""
33 | return ver, err == nil
34 | }
35 | if major, ok = next(); !ok || rel == "" {
36 | return
37 | }
38 | if minor, ok = next(); !ok || rel == "" {
39 | return
40 | }
41 | patch, ok = next()
42 | return
43 | }
44 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/proc_cpuinfo_linux.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 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 | //go:build linux && arm64
6 |
7 | package cpu
8 |
9 | import (
10 | "errors"
11 | "io"
12 | "os"
13 | "strings"
14 | )
15 |
16 | func readLinuxProcCPUInfo() error {
17 | f, err := os.Open("/proc/cpuinfo")
18 | if err != nil {
19 | return err
20 | }
21 | defer f.Close()
22 |
23 | var buf [1 << 10]byte // enough for first CPU
24 | n, err := io.ReadFull(f, buf[:])
25 | if err != nil && err != io.ErrUnexpectedEOF {
26 | return err
27 | }
28 | in := string(buf[:n])
29 | const features = "\nFeatures : "
30 | i := strings.Index(in, features)
31 | if i == -1 {
32 | return errors.New("no CPU features found")
33 | }
34 | in = in[i+len(features):]
35 | if i := strings.Index(in, "\n"); i != -1 {
36 | in = in[:i]
37 | }
38 | m := map[string]*bool{}
39 |
40 | initOptions() // need it early here; it's harmless to call twice
41 | for _, o := range options {
42 | m[o.Name] = o.Feature
43 | }
44 | // The EVTSTRM field has alias "evstrm" in Go, but Linux calls it "evtstrm".
45 | m["evtstrm"] = &ARM64.HasEVTSTRM
46 |
47 | for _, f := range strings.Fields(in) {
48 | if p, ok := m[f]; ok {
49 | *p = true
50 | }
51 | }
52 | return nil
53 | }
54 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/runtime_auxv.go:
--------------------------------------------------------------------------------
1 | // Copyright 2023 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 cpu
6 |
7 | // getAuxvFn is non-nil on Go 1.21+ (via runtime_auxv_go121.go init)
8 | // on platforms that use auxv.
9 | var getAuxvFn func() []uintptr
10 |
11 | func getAuxv() []uintptr {
12 | if getAuxvFn == nil {
13 | return nil
14 | }
15 | return getAuxvFn()
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/runtime_auxv_go121.go:
--------------------------------------------------------------------------------
1 | // Copyright 2023 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 | //go:build go1.21
6 |
7 | package cpu
8 |
9 | import (
10 | _ "unsafe" // for linkname
11 | )
12 |
13 | //go:linkname runtime_getAuxv runtime.getAuxv
14 | func runtime_getAuxv() []uintptr
15 |
16 | func init() {
17 | getAuxvFn = runtime_getAuxv
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 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 | // Recreate a getsystemcfg syscall handler instead of
6 | // using the one provided by x/sys/unix to avoid having
7 | // the dependency between them. (See golang.org/issue/32102)
8 | // Moreover, this file will be used during the building of
9 | // gccgo's libgo and thus must not used a CGo method.
10 |
11 | //go:build aix && gccgo
12 |
13 | package cpu
14 |
15 | import (
16 | "syscall"
17 | )
18 |
19 | //extern getsystemcfg
20 | func gccgoGetsystemcfg(label uint32) (r uint64)
21 |
22 | func callgetsystemcfg(label int) (r1 uintptr, e1 syscall.Errno) {
23 | r1 = uintptr(gccgoGetsystemcfg(uint32(label)))
24 | e1 = syscall.GetErrno()
25 | return
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/syscall_aix_ppc64_gc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 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 | // Minimal copy of x/sys/unix so the cpu package can make a
6 | // system call on AIX without depending on x/sys/unix.
7 | // (See golang.org/issue/32102)
8 |
9 | //go:build aix && ppc64 && gc
10 |
11 | package cpu
12 |
13 | import (
14 | "syscall"
15 | "unsafe"
16 | )
17 |
18 | //go:cgo_import_dynamic libc_getsystemcfg getsystemcfg "libc.a/shr_64.o"
19 |
20 | //go:linkname libc_getsystemcfg libc_getsystemcfg
21 |
22 | type syscallFunc uintptr
23 |
24 | var libc_getsystemcfg syscallFunc
25 |
26 | type errno = syscall.Errno
27 |
28 | // Implemented in runtime/syscall_aix.go.
29 | func rawSyscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err errno)
30 | func syscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err errno)
31 |
32 | func callgetsystemcfg(label int) (r1 uintptr, e1 errno) {
33 | r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_getsystemcfg)), 1, uintptr(label), 0, 0, 0, 0, 0)
34 | return
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/plan9/asm.s:
--------------------------------------------------------------------------------
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 | #include "textflag.h"
6 |
7 | TEXT ·use(SB),NOSPLIT,$0
8 | RET
9 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/plan9/asm_plan9_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 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 | #include "textflag.h"
6 |
7 | //
8 | // System call support for 386, Plan 9
9 | //
10 |
11 | // Just jump to package syscall's implementation for all these functions.
12 | // The runtime may know about them.
13 |
14 | TEXT ·Syscall(SB),NOSPLIT,$0-32
15 | JMP syscall·Syscall(SB)
16 |
17 | TEXT ·Syscall6(SB),NOSPLIT,$0-44
18 | JMP syscall·Syscall6(SB)
19 |
20 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
21 | JMP syscall·RawSyscall(SB)
22 |
23 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
24 | JMP syscall·RawSyscall6(SB)
25 |
26 | TEXT ·seek(SB),NOSPLIT,$0-36
27 | JMP syscall·seek(SB)
28 |
29 | TEXT ·exit(SB),NOSPLIT,$4-4
30 | JMP syscall·exit(SB)
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/plan9/asm_plan9_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 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 | #include "textflag.h"
6 |
7 | //
8 | // System call support for amd64, Plan 9
9 | //
10 |
11 | // Just jump to package syscall's implementation for all these functions.
12 | // The runtime may know about them.
13 |
14 | TEXT ·Syscall(SB),NOSPLIT,$0-64
15 | JMP syscall·Syscall(SB)
16 |
17 | TEXT ·Syscall6(SB),NOSPLIT,$0-88
18 | JMP syscall·Syscall6(SB)
19 |
20 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
21 | JMP syscall·RawSyscall(SB)
22 |
23 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
24 | JMP syscall·RawSyscall6(SB)
25 |
26 | TEXT ·seek(SB),NOSPLIT,$0-56
27 | JMP syscall·seek(SB)
28 |
29 | TEXT ·exit(SB),NOSPLIT,$8-8
30 | JMP syscall·exit(SB)
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/plan9/asm_plan9_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 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 | #include "textflag.h"
6 |
7 | // System call support for plan9 on arm
8 |
9 | // Just jump to package syscall's implementation for all these functions.
10 | // The runtime may know about them.
11 |
12 | TEXT ·Syscall(SB),NOSPLIT,$0-32
13 | JMP syscall·Syscall(SB)
14 |
15 | TEXT ·Syscall6(SB),NOSPLIT,$0-44
16 | JMP syscall·Syscall6(SB)
17 |
18 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
19 | JMP syscall·RawSyscall(SB)
20 |
21 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
22 | JMP syscall·RawSyscall6(SB)
23 |
24 | TEXT ·seek(SB),NOSPLIT,$0-36
25 | JMP syscall·exit(SB)
26 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/plan9/const_plan9.go:
--------------------------------------------------------------------------------
1 | package plan9
2 |
3 | // Plan 9 Constants
4 |
5 | // Open modes
6 | const (
7 | O_RDONLY = 0
8 | O_WRONLY = 1
9 | O_RDWR = 2
10 | O_TRUNC = 16
11 | O_CLOEXEC = 32
12 | O_EXCL = 0x1000
13 | )
14 |
15 | // Rfork flags
16 | const (
17 | RFNAMEG = 1 << 0
18 | RFENVG = 1 << 1
19 | RFFDG = 1 << 2
20 | RFNOTEG = 1 << 3
21 | RFPROC = 1 << 4
22 | RFMEM = 1 << 5
23 | RFNOWAIT = 1 << 6
24 | RFCNAMEG = 1 << 10
25 | RFCENVG = 1 << 11
26 | RFCFDG = 1 << 12
27 | RFREND = 1 << 13
28 | RFNOMNT = 1 << 14
29 | )
30 |
31 | // Qid.Type bits
32 | const (
33 | QTDIR = 0x80
34 | QTAPPEND = 0x40
35 | QTEXCL = 0x20
36 | QTMOUNT = 0x10
37 | QTAUTH = 0x08
38 | QTTMP = 0x04
39 | QTFILE = 0x00
40 | )
41 |
42 | // Dir.Mode bits
43 | const (
44 | DMDIR = 0x80000000
45 | DMAPPEND = 0x40000000
46 | DMEXCL = 0x20000000
47 | DMMOUNT = 0x10000000
48 | DMAUTH = 0x08000000
49 | DMTMP = 0x04000000
50 | DMREAD = 0x4
51 | DMWRITE = 0x2
52 | DMEXEC = 0x1
53 | )
54 |
55 | const (
56 | STATMAX = 65535
57 | ERRMAX = 128
58 | STATFIXLEN = 49
59 | )
60 |
61 | // Mount and bind flags
62 | const (
63 | MREPL = 0x0000
64 | MBEFORE = 0x0001
65 | MAFTER = 0x0002
66 | MORDER = 0x0003
67 | MCREATE = 0x0004
68 | MCACHE = 0x0010
69 | MMASK = 0x0017
70 | )
71 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/plan9/env_plan9.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 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 | // Plan 9 environment variables.
6 |
7 | package plan9
8 |
9 | import (
10 | "syscall"
11 | )
12 |
13 | func Getenv(key string) (value string, found bool) {
14 | return syscall.Getenv(key)
15 | }
16 |
17 | func Setenv(key, value string) error {
18 | return syscall.Setenv(key, value)
19 | }
20 |
21 | func Clearenv() {
22 | syscall.Clearenv()
23 | }
24 |
25 | func Environ() []string {
26 | return syscall.Environ()
27 | }
28 |
29 | func Unsetenv(key string) error {
30 | return syscall.Unsetenv(key)
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/plan9/mksysnum_plan9.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # Copyright 2009 The Go Authors. All rights reserved.
3 | # Use of this source code is governed by a BSD-style
4 | # license that can be found in the LICENSE file.
5 |
6 | COMMAND="mksysnum_plan9.sh $@"
7 |
8 | cat <= 10 {
16 | buf[i] = byte(val%10 + '0')
17 | i--
18 | val /= 10
19 | }
20 | buf[i] = byte(val + '0')
21 | return string(buf[i:])
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/plan9/zsysnum_plan9.go:
--------------------------------------------------------------------------------
1 | // mksysnum_plan9.sh /opt/plan9/sys/src/libc/9syscall/sys.h
2 | // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
3 |
4 | package plan9
5 |
6 | const (
7 | SYS_SYSR1 = 0
8 | SYS_BIND = 2
9 | SYS_CHDIR = 3
10 | SYS_CLOSE = 4
11 | SYS_DUP = 5
12 | SYS_ALARM = 6
13 | SYS_EXEC = 7
14 | SYS_EXITS = 8
15 | SYS_FAUTH = 10
16 | SYS_SEGBRK = 12
17 | SYS_OPEN = 14
18 | SYS_OSEEK = 16
19 | SYS_SLEEP = 17
20 | SYS_RFORK = 19
21 | SYS_PIPE = 21
22 | SYS_CREATE = 22
23 | SYS_FD2PATH = 23
24 | SYS_BRK_ = 24
25 | SYS_REMOVE = 25
26 | SYS_NOTIFY = 28
27 | SYS_NOTED = 29
28 | SYS_SEGATTACH = 30
29 | SYS_SEGDETACH = 31
30 | SYS_SEGFREE = 32
31 | SYS_SEGFLUSH = 33
32 | SYS_RENDEZVOUS = 34
33 | SYS_UNMOUNT = 35
34 | SYS_SEMACQUIRE = 37
35 | SYS_SEMRELEASE = 38
36 | SYS_SEEK = 39
37 | SYS_FVERSION = 40
38 | SYS_ERRSTR = 41
39 | SYS_STAT = 42
40 | SYS_FSTAT = 43
41 | SYS_WSTAT = 44
42 | SYS_FWSTAT = 45
43 | SYS_MOUNT = 46
44 | SYS_AWAIT = 47
45 | SYS_PREAD = 50
46 | SYS_PWRITE = 51
47 | SYS_TSEMACQUIRE = 52
48 | SYS_NSEC = 53
49 | )
50 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/.gitignore:
--------------------------------------------------------------------------------
1 | _obj/
2 | unix.test
3 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/aliases.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 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 | //go:build (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos) && go1.9
6 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | type Signal = syscall.Signal
12 | type Errno = syscall.Errno
13 | type SysProcAttr = syscall.SysProcAttr
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_aix_ppc64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2018 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 | //go:build gc
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go
11 | //
12 |
13 | TEXT ·syscall6(SB),NOSPLIT,$0-88
14 | JMP syscall·syscall6(SB)
15 |
16 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88
17 | JMP syscall·rawSyscall6(SB)
18 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_bsd_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2021 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 | //go:build (freebsd || netbsd || openbsd) && gc
6 |
7 | #include "textflag.h"
8 |
9 | // System call support for 386 BSD
10 |
11 | // Just jump to package syscall's implementation for all these functions.
12 | // The runtime may know about them.
13 |
14 | TEXT ·Syscall(SB),NOSPLIT,$0-28
15 | JMP syscall·Syscall(SB)
16 |
17 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
18 | JMP syscall·Syscall6(SB)
19 |
20 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
21 | JMP syscall·Syscall9(SB)
22 |
23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
24 | JMP syscall·RawSyscall(SB)
25 |
26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
27 | JMP syscall·RawSyscall6(SB)
28 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_bsd_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2021 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 | //go:build (darwin || dragonfly || freebsd || netbsd || openbsd) && gc
6 |
7 | #include "textflag.h"
8 |
9 | // System call support for AMD64 BSD
10 |
11 | // Just jump to package syscall's implementation for all these functions.
12 | // The runtime may know about them.
13 |
14 | TEXT ·Syscall(SB),NOSPLIT,$0-56
15 | JMP syscall·Syscall(SB)
16 |
17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
18 | JMP syscall·Syscall6(SB)
19 |
20 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
21 | JMP syscall·Syscall9(SB)
22 |
23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
24 | JMP syscall·RawSyscall(SB)
25 |
26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
27 | JMP syscall·RawSyscall6(SB)
28 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_bsd_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2021 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 | //go:build (freebsd || netbsd || openbsd) && gc
6 |
7 | #include "textflag.h"
8 |
9 | // System call support for ARM BSD
10 |
11 | // Just jump to package syscall's implementation for all these functions.
12 | // The runtime may know about them.
13 |
14 | TEXT ·Syscall(SB),NOSPLIT,$0-28
15 | B syscall·Syscall(SB)
16 |
17 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
18 | B syscall·Syscall6(SB)
19 |
20 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
21 | B syscall·Syscall9(SB)
22 |
23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
24 | B syscall·RawSyscall(SB)
25 |
26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
27 | B syscall·RawSyscall6(SB)
28 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_bsd_arm64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2021 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 | //go:build (darwin || freebsd || netbsd || openbsd) && gc
6 |
7 | #include "textflag.h"
8 |
9 | // System call support for ARM64 BSD
10 |
11 | // Just jump to package syscall's implementation for all these functions.
12 | // The runtime may know about them.
13 |
14 | TEXT ·Syscall(SB),NOSPLIT,$0-56
15 | JMP syscall·Syscall(SB)
16 |
17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
18 | JMP syscall·Syscall6(SB)
19 |
20 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
21 | JMP syscall·Syscall9(SB)
22 |
23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
24 | JMP syscall·RawSyscall(SB)
25 |
26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
27 | JMP syscall·RawSyscall6(SB)
28 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_bsd_ppc64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2022 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 | //go:build (darwin || freebsd || netbsd || openbsd) && gc
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for ppc64, BSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_bsd_riscv64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2021 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 | //go:build (darwin || freebsd || netbsd || openbsd) && gc
6 |
7 | #include "textflag.h"
8 |
9 | // System call support for RISCV64 BSD
10 |
11 | // Just jump to package syscall's implementation for all these functions.
12 | // The runtime may know about them.
13 |
14 | TEXT ·Syscall(SB),NOSPLIT,$0-56
15 | JMP syscall·Syscall(SB)
16 |
17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
18 | JMP syscall·Syscall6(SB)
19 |
20 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
21 | JMP syscall·Syscall9(SB)
22 |
23 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
24 | JMP syscall·RawSyscall(SB)
25 |
26 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
27 | JMP syscall·RawSyscall6(SB)
28 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 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 | //go:build gc
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for AMD64, Linux
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
23 | CALL runtime·entersyscall(SB)
24 | MOVQ a1+8(FP), DI
25 | MOVQ a2+16(FP), SI
26 | MOVQ a3+24(FP), DX
27 | MOVQ $0, R10
28 | MOVQ $0, R8
29 | MOVQ $0, R9
30 | MOVQ trap+0(FP), AX // syscall entry
31 | SYSCALL
32 | MOVQ AX, r1+32(FP)
33 | MOVQ DX, r2+40(FP)
34 | CALL runtime·exitsyscall(SB)
35 | RET
36 |
37 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
38 | JMP syscall·RawSyscall(SB)
39 |
40 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
41 | JMP syscall·RawSyscall6(SB)
42 |
43 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
44 | MOVQ a1+8(FP), DI
45 | MOVQ a2+16(FP), SI
46 | MOVQ a3+24(FP), DX
47 | MOVQ $0, R10
48 | MOVQ $0, R8
49 | MOVQ $0, R9
50 | MOVQ trap+0(FP), AX // syscall entry
51 | SYSCALL
52 | MOVQ AX, r1+32(FP)
53 | MOVQ DX, r2+40(FP)
54 | RET
55 |
56 | TEXT ·gettimeofday(SB),NOSPLIT,$0-16
57 | JMP syscall·gettimeofday(SB)
58 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 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 | //go:build gc
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for arm, Linux
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | B syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | B syscall·Syscall6(SB)
21 |
22 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-24
23 | BL runtime·entersyscall(SB)
24 | MOVW trap+0(FP), R7
25 | MOVW a1+4(FP), R0
26 | MOVW a2+8(FP), R1
27 | MOVW a3+12(FP), R2
28 | MOVW $0, R3
29 | MOVW $0, R4
30 | MOVW $0, R5
31 | SWI $0
32 | MOVW R0, r1+16(FP)
33 | MOVW $0, R0
34 | MOVW R0, r2+20(FP)
35 | BL runtime·exitsyscall(SB)
36 | RET
37 |
38 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
39 | B syscall·RawSyscall(SB)
40 |
41 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
42 | B syscall·RawSyscall6(SB)
43 |
44 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24
45 | MOVW trap+0(FP), R7 // syscall entry
46 | MOVW a1+4(FP), R0
47 | MOVW a2+8(FP), R1
48 | MOVW a3+12(FP), R2
49 | SWI $0
50 | MOVW R0, r1+16(FP)
51 | MOVW $0, R0
52 | MOVW R0, r2+20(FP)
53 | RET
54 |
55 | TEXT ·seek(SB),NOSPLIT,$0-28
56 | B syscall·seek(SB)
57 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_arm64.s:
--------------------------------------------------------------------------------
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 | //go:build linux && arm64 && gc
6 |
7 | #include "textflag.h"
8 |
9 | // Just jump to package syscall's implementation for all these functions.
10 | // The runtime may know about them.
11 |
12 | TEXT ·Syscall(SB),NOSPLIT,$0-56
13 | B syscall·Syscall(SB)
14 |
15 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
16 | B syscall·Syscall6(SB)
17 |
18 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
19 | BL runtime·entersyscall(SB)
20 | MOVD a1+8(FP), R0
21 | MOVD a2+16(FP), R1
22 | MOVD a3+24(FP), R2
23 | MOVD $0, R3
24 | MOVD $0, R4
25 | MOVD $0, R5
26 | MOVD trap+0(FP), R8 // syscall entry
27 | SVC
28 | MOVD R0, r1+32(FP) // r1
29 | MOVD R1, r2+40(FP) // r2
30 | BL runtime·exitsyscall(SB)
31 | RET
32 |
33 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
34 | B syscall·RawSyscall(SB)
35 |
36 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
37 | B syscall·RawSyscall6(SB)
38 |
39 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
40 | MOVD a1+8(FP), R0
41 | MOVD a2+16(FP), R1
42 | MOVD a3+24(FP), R2
43 | MOVD $0, R3
44 | MOVD $0, R4
45 | MOVD $0, R5
46 | MOVD trap+0(FP), R8 // syscall entry
47 | SVC
48 | MOVD R0, r1+32(FP)
49 | MOVD R1, r2+40(FP)
50 | RET
51 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_loong64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2022 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 | //go:build linux && loong64 && gc
6 |
7 | #include "textflag.h"
8 |
9 |
10 | // Just jump to package syscall's implementation for all these functions.
11 | // The runtime may know about them.
12 |
13 | TEXT ·Syscall(SB),NOSPLIT,$0-56
14 | JMP syscall·Syscall(SB)
15 |
16 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
17 | JMP syscall·Syscall6(SB)
18 |
19 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
20 | JAL runtime·entersyscall(SB)
21 | MOVV a1+8(FP), R4
22 | MOVV a2+16(FP), R5
23 | MOVV a3+24(FP), R6
24 | MOVV R0, R7
25 | MOVV R0, R8
26 | MOVV R0, R9
27 | MOVV trap+0(FP), R11 // syscall entry
28 | SYSCALL
29 | MOVV R4, r1+32(FP)
30 | MOVV R0, r2+40(FP) // r2 is not used. Always set to 0
31 | JAL runtime·exitsyscall(SB)
32 | RET
33 |
34 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
35 | JMP syscall·RawSyscall(SB)
36 |
37 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
38 | JMP syscall·RawSyscall6(SB)
39 |
40 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
41 | MOVV a1+8(FP), R4
42 | MOVV a2+16(FP), R5
43 | MOVV a3+24(FP), R6
44 | MOVV R0, R7
45 | MOVV R0, R8
46 | MOVV R0, R9
47 | MOVV trap+0(FP), R11 // syscall entry
48 | SYSCALL
49 | MOVV R4, r1+32(FP)
50 | MOVV R0, r2+40(FP) // r2 is not used. Always set to 0
51 | RET
52 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s:
--------------------------------------------------------------------------------
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 | //go:build linux && (mips64 || mips64le) && gc
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for mips64, Linux
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
23 | JAL runtime·entersyscall(SB)
24 | MOVV a1+8(FP), R4
25 | MOVV a2+16(FP), R5
26 | MOVV a3+24(FP), R6
27 | MOVV R0, R7
28 | MOVV R0, R8
29 | MOVV R0, R9
30 | MOVV trap+0(FP), R2 // syscall entry
31 | SYSCALL
32 | MOVV R2, r1+32(FP)
33 | MOVV R3, r2+40(FP)
34 | JAL runtime·exitsyscall(SB)
35 | RET
36 |
37 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
38 | JMP syscall·RawSyscall(SB)
39 |
40 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
41 | JMP syscall·RawSyscall6(SB)
42 |
43 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
44 | MOVV a1+8(FP), R4
45 | MOVV a2+16(FP), R5
46 | MOVV a3+24(FP), R6
47 | MOVV R0, R7
48 | MOVV R0, R8
49 | MOVV R0, R9
50 | MOVV trap+0(FP), R2 // syscall entry
51 | SYSCALL
52 | MOVV R2, r1+32(FP)
53 | MOVV R3, r2+40(FP)
54 | RET
55 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s:
--------------------------------------------------------------------------------
1 | // Copyright 2016 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 | //go:build linux && (mips || mipsle) && gc
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for mips, Linux
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-24
26 | JAL runtime·entersyscall(SB)
27 | MOVW a1+4(FP), R4
28 | MOVW a2+8(FP), R5
29 | MOVW a3+12(FP), R6
30 | MOVW R0, R7
31 | MOVW trap+0(FP), R2 // syscall entry
32 | SYSCALL
33 | MOVW R2, r1+16(FP) // r1
34 | MOVW R3, r2+20(FP) // r2
35 | JAL runtime·exitsyscall(SB)
36 | RET
37 |
38 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
39 | JMP syscall·RawSyscall(SB)
40 |
41 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
42 | JMP syscall·RawSyscall6(SB)
43 |
44 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24
45 | MOVW a1+4(FP), R4
46 | MOVW a2+8(FP), R5
47 | MOVW a3+12(FP), R6
48 | MOVW trap+0(FP), R2 // syscall entry
49 | SYSCALL
50 | MOVW R2, r1+16(FP)
51 | MOVW R3, r2+20(FP)
52 | RET
53 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s:
--------------------------------------------------------------------------------
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 | //go:build linux && (ppc64 || ppc64le) && gc
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for ppc64, Linux
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
17 | BL runtime·entersyscall(SB)
18 | MOVD a1+8(FP), R3
19 | MOVD a2+16(FP), R4
20 | MOVD a3+24(FP), R5
21 | MOVD R0, R6
22 | MOVD R0, R7
23 | MOVD R0, R8
24 | MOVD trap+0(FP), R9 // syscall entry
25 | SYSCALL R9
26 | MOVD R3, r1+32(FP)
27 | MOVD R4, r2+40(FP)
28 | BL runtime·exitsyscall(SB)
29 | RET
30 |
31 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
32 | MOVD a1+8(FP), R3
33 | MOVD a2+16(FP), R4
34 | MOVD a3+24(FP), R5
35 | MOVD R0, R6
36 | MOVD R0, R7
37 | MOVD R0, R8
38 | MOVD trap+0(FP), R9 // syscall entry
39 | SYSCALL R9
40 | MOVD R3, r1+32(FP)
41 | MOVD R4, r2+40(FP)
42 | RET
43 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_riscv64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2019 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 | //go:build riscv64 && gc
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for linux/riscv64.
11 | //
12 | // Where available, just jump to package syscall's implementation of
13 | // these functions.
14 |
15 | TEXT ·Syscall(SB),NOSPLIT,$0-56
16 | JMP syscall·Syscall(SB)
17 |
18 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
19 | JMP syscall·Syscall6(SB)
20 |
21 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
22 | CALL runtime·entersyscall(SB)
23 | MOV a1+8(FP), A0
24 | MOV a2+16(FP), A1
25 | MOV a3+24(FP), A2
26 | MOV trap+0(FP), A7 // syscall entry
27 | ECALL
28 | MOV A0, r1+32(FP) // r1
29 | MOV A1, r2+40(FP) // r2
30 | CALL runtime·exitsyscall(SB)
31 | RET
32 |
33 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
34 | JMP syscall·RawSyscall(SB)
35 |
36 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
37 | JMP syscall·RawSyscall6(SB)
38 |
39 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
40 | MOV a1+8(FP), A0
41 | MOV a2+16(FP), A1
42 | MOV a3+24(FP), A2
43 | MOV trap+0(FP), A7 // syscall entry
44 | ECALL
45 | MOV A0, r1+32(FP)
46 | MOV A1, r2+40(FP)
47 | RET
48 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_s390x.s:
--------------------------------------------------------------------------------
1 | // Copyright 2016 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 | //go:build linux && s390x && gc
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for s390x, Linux
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | BR syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | BR syscall·Syscall6(SB)
21 |
22 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
23 | BL runtime·entersyscall(SB)
24 | MOVD a1+8(FP), R2
25 | MOVD a2+16(FP), R3
26 | MOVD a3+24(FP), R4
27 | MOVD $0, R5
28 | MOVD $0, R6
29 | MOVD $0, R7
30 | MOVD trap+0(FP), R1 // syscall entry
31 | SYSCALL
32 | MOVD R2, r1+32(FP)
33 | MOVD R3, r2+40(FP)
34 | BL runtime·exitsyscall(SB)
35 | RET
36 |
37 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
38 | BR syscall·RawSyscall(SB)
39 |
40 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
41 | BR syscall·RawSyscall6(SB)
42 |
43 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
44 | MOVD a1+8(FP), R2
45 | MOVD a2+16(FP), R3
46 | MOVD a3+24(FP), R4
47 | MOVD $0, R5
48 | MOVD $0, R6
49 | MOVD $0, R7
50 | MOVD trap+0(FP), R1 // syscall entry
51 | SYSCALL
52 | MOVD R2, r1+32(FP)
53 | MOVD R3, r2+40(FP)
54 | RET
55 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2019 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 | //go:build gc
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for mips64, OpenBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s:
--------------------------------------------------------------------------------
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 | //go:build gc
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go
11 | //
12 |
13 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88
14 | JMP syscall·sysvicall6(SB)
15 |
16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88
17 | JMP syscall·rawSysvicall6(SB)
18 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/bluetooth_linux.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 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 | // Bluetooth sockets and messages
6 |
7 | package unix
8 |
9 | // Bluetooth Protocols
10 | const (
11 | BTPROTO_L2CAP = 0
12 | BTPROTO_HCI = 1
13 | BTPROTO_SCO = 2
14 | BTPROTO_RFCOMM = 3
15 | BTPROTO_BNEP = 4
16 | BTPROTO_CMTP = 5
17 | BTPROTO_HIDP = 6
18 | BTPROTO_AVDTP = 7
19 | )
20 |
21 | const (
22 | HCI_CHANNEL_RAW = 0
23 | HCI_CHANNEL_USER = 1
24 | HCI_CHANNEL_MONITOR = 2
25 | HCI_CHANNEL_CONTROL = 3
26 | HCI_CHANNEL_LOGGING = 4
27 | )
28 |
29 | // Socketoption Level
30 | const (
31 | SOL_BLUETOOTH = 0x112
32 | SOL_HCI = 0x0
33 | SOL_L2CAP = 0x6
34 | SOL_RFCOMM = 0x12
35 | SOL_SCO = 0x11
36 | )
37 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/constants.go:
--------------------------------------------------------------------------------
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 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
6 |
7 | package unix
8 |
9 | const (
10 | R_OK = 0x4
11 | W_OK = 0x2
12 | X_OK = 0x1
13 | )
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_aix_ppc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 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 | //go:build aix && ppc
6 |
7 | // Functions to access/create device major and minor numbers matching the
8 | // encoding used by AIX.
9 |
10 | package unix
11 |
12 | // Major returns the major component of a Linux device number.
13 | func Major(dev uint64) uint32 {
14 | return uint32((dev >> 16) & 0xffff)
15 | }
16 |
17 | // Minor returns the minor component of a Linux device number.
18 | func Minor(dev uint64) uint32 {
19 | return uint32(dev & 0xffff)
20 | }
21 |
22 | // Mkdev returns a Linux device number generated from the given major and minor
23 | // components.
24 | func Mkdev(major, minor uint32) uint64 {
25 | return uint64(((major) << 16) | (minor))
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_aix_ppc64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 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 | //go:build aix && ppc64
6 |
7 | // Functions to access/create device major and minor numbers matching the
8 | // encoding used AIX.
9 |
10 | package unix
11 |
12 | // Major returns the major component of a Linux device number.
13 | func Major(dev uint64) uint32 {
14 | return uint32((dev & 0x3fffffff00000000) >> 32)
15 | }
16 |
17 | // Minor returns the minor component of a Linux device number.
18 | func Minor(dev uint64) uint32 {
19 | return uint32((dev & 0x00000000ffffffff) >> 0)
20 | }
21 |
22 | // Mkdev returns a Linux device number generated from the given major and minor
23 | // components.
24 | func Mkdev(major, minor uint32) uint64 {
25 | var DEVNO64 uint64
26 | DEVNO64 = 0x8000000000000000
27 | return ((uint64(major) << 32) | (uint64(minor) & 0x00000000FFFFFFFF) | DEVNO64)
28 | }
29 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_darwin.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 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 | // Functions to access/create device major and minor numbers matching the
6 | // encoding used in Darwin's sys/types.h header.
7 |
8 | package unix
9 |
10 | // Major returns the major component of a Darwin device number.
11 | func Major(dev uint64) uint32 {
12 | return uint32((dev >> 24) & 0xff)
13 | }
14 |
15 | // Minor returns the minor component of a Darwin device number.
16 | func Minor(dev uint64) uint32 {
17 | return uint32(dev & 0xffffff)
18 | }
19 |
20 | // Mkdev returns a Darwin device number generated from the given major and minor
21 | // components.
22 | func Mkdev(major, minor uint32) uint64 {
23 | return (uint64(major) << 24) | uint64(minor)
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_dragonfly.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 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 | // Functions to access/create device major and minor numbers matching the
6 | // encoding used in Dragonfly's sys/types.h header.
7 | //
8 | // The information below is extracted and adapted from sys/types.h:
9 | //
10 | // Minor gives a cookie instead of an index since in order to avoid changing the
11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for
12 | // devices that don't use them.
13 |
14 | package unix
15 |
16 | // Major returns the major component of a DragonFlyBSD device number.
17 | func Major(dev uint64) uint32 {
18 | return uint32((dev >> 8) & 0xff)
19 | }
20 |
21 | // Minor returns the minor component of a DragonFlyBSD device number.
22 | func Minor(dev uint64) uint32 {
23 | return uint32(dev & 0xffff00ff)
24 | }
25 |
26 | // Mkdev returns a DragonFlyBSD device number generated from the given major and
27 | // minor components.
28 | func Mkdev(major, minor uint32) uint64 {
29 | return (uint64(major) << 8) | uint64(minor)
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_freebsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 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 | // Functions to access/create device major and minor numbers matching the
6 | // encoding used in FreeBSD's sys/types.h header.
7 | //
8 | // The information below is extracted and adapted from sys/types.h:
9 | //
10 | // Minor gives a cookie instead of an index since in order to avoid changing the
11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for
12 | // devices that don't use them.
13 |
14 | package unix
15 |
16 | // Major returns the major component of a FreeBSD device number.
17 | func Major(dev uint64) uint32 {
18 | return uint32((dev >> 8) & 0xff)
19 | }
20 |
21 | // Minor returns the minor component of a FreeBSD device number.
22 | func Minor(dev uint64) uint32 {
23 | return uint32(dev & 0xffff00ff)
24 | }
25 |
26 | // Mkdev returns a FreeBSD device number generated from the given major and
27 | // minor components.
28 | func Mkdev(major, minor uint32) uint64 {
29 | return (uint64(major) << 8) | uint64(minor)
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_netbsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 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 | // Functions to access/create device major and minor numbers matching the
6 | // encoding used in NetBSD's sys/types.h header.
7 |
8 | package unix
9 |
10 | // Major returns the major component of a NetBSD device number.
11 | func Major(dev uint64) uint32 {
12 | return uint32((dev & 0x000fff00) >> 8)
13 | }
14 |
15 | // Minor returns the minor component of a NetBSD device number.
16 | func Minor(dev uint64) uint32 {
17 | minor := uint32((dev & 0x000000ff) >> 0)
18 | minor |= uint32((dev & 0xfff00000) >> 12)
19 | return minor
20 | }
21 |
22 | // Mkdev returns a NetBSD device number generated from the given major and minor
23 | // components.
24 | func Mkdev(major, minor uint32) uint64 {
25 | dev := (uint64(major) << 8) & 0x000fff00
26 | dev |= (uint64(minor) << 12) & 0xfff00000
27 | dev |= (uint64(minor) << 0) & 0x000000ff
28 | return dev
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_openbsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 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 | // Functions to access/create device major and minor numbers matching the
6 | // encoding used in OpenBSD's sys/types.h header.
7 |
8 | package unix
9 |
10 | // Major returns the major component of an OpenBSD device number.
11 | func Major(dev uint64) uint32 {
12 | return uint32((dev & 0x0000ff00) >> 8)
13 | }
14 |
15 | // Minor returns the minor component of an OpenBSD device number.
16 | func Minor(dev uint64) uint32 {
17 | minor := uint32((dev & 0x000000ff) >> 0)
18 | minor |= uint32((dev & 0xffff0000) >> 8)
19 | return minor
20 | }
21 |
22 | // Mkdev returns an OpenBSD device number generated from the given major and minor
23 | // components.
24 | func Mkdev(major, minor uint32) uint64 {
25 | dev := (uint64(major) << 8) & 0x0000ff00
26 | dev |= (uint64(minor) << 8) & 0xffff0000
27 | dev |= (uint64(minor) << 0) & 0x000000ff
28 | return dev
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_zos.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 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 | //go:build zos && s390x
6 |
7 | // Functions to access/create device major and minor numbers matching the
8 | // encoding used by z/OS.
9 | //
10 | // The information below is extracted and adapted from macros.
11 |
12 | package unix
13 |
14 | // Major returns the major component of a z/OS device number.
15 | func Major(dev uint64) uint32 {
16 | return uint32((dev >> 16) & 0x0000FFFF)
17 | }
18 |
19 | // Minor returns the minor component of a z/OS device number.
20 | func Minor(dev uint64) uint32 {
21 | return uint32(dev & 0x0000FFFF)
22 | }
23 |
24 | // Mkdev returns a z/OS device number generated from the given major and minor
25 | // components.
26 | func Mkdev(major, minor uint32) uint64 {
27 | return (uint64(major) << 16) | uint64(minor)
28 | }
29 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/endian_big.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 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 | //go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64
6 |
7 | package unix
8 |
9 | const isBigEndian = true
10 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/endian_little.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 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 | //go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh
6 |
7 | package unix
8 |
9 | const isBigEndian = false
10 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/env_unix.go:
--------------------------------------------------------------------------------
1 | // Copyright 2010 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 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
6 |
7 | // Unix environment variables.
8 |
9 | package unix
10 |
11 | import "syscall"
12 |
13 | func Getenv(key string) (value string, found bool) {
14 | return syscall.Getenv(key)
15 | }
16 |
17 | func Setenv(key, value string) error {
18 | return syscall.Setenv(key, value)
19 | }
20 |
21 | func Clearenv() {
22 | syscall.Clearenv()
23 | }
24 |
25 | func Environ() []string {
26 | return syscall.Environ()
27 | }
28 |
29 | func Unsetenv(key string) error {
30 | return syscall.Unsetenv(key)
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/fcntl.go:
--------------------------------------------------------------------------------
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 | //go:build dragonfly || freebsd || linux || netbsd
6 |
7 | package unix
8 |
9 | import "unsafe"
10 |
11 | // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux
12 | // systems by fcntl_linux_32bit.go to be SYS_FCNTL64.
13 | var fcntl64Syscall uintptr = SYS_FCNTL
14 |
15 | func fcntl(fd int, cmd, arg int) (int, error) {
16 | valptr, _, errno := Syscall(fcntl64Syscall, uintptr(fd), uintptr(cmd), uintptr(arg))
17 | var err error
18 | if errno != 0 {
19 | err = errno
20 | }
21 | return int(valptr), err
22 | }
23 |
24 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument.
25 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) {
26 | return fcntl(int(fd), cmd, arg)
27 | }
28 |
29 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
30 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
31 | _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk)))
32 | if errno == 0 {
33 | return nil
34 | }
35 | return errno
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/fcntl_darwin.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 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 unix
6 |
7 | import "unsafe"
8 |
9 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument.
10 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) {
11 | return fcntl(int(fd), cmd, arg)
12 | }
13 |
14 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
15 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
16 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(lk))))
17 | return err
18 | }
19 |
20 | // FcntlFstore performs a fcntl syscall for the F_PREALLOCATE command.
21 | func FcntlFstore(fd uintptr, cmd int, fstore *Fstore_t) error {
22 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(fstore))))
23 | return err
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go:
--------------------------------------------------------------------------------
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 | //go:build (linux && 386) || (linux && arm) || (linux && mips) || (linux && mipsle) || (linux && ppc)
6 |
7 | package unix
8 |
9 | func init() {
10 | // On 32-bit Linux systems, the fcntl syscall that matches Go's
11 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL.
12 | fcntl64Syscall = SYS_FCNTL64
13 | }
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/fdset.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 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 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
6 |
7 | package unix
8 |
9 | // Set adds fd to the set fds.
10 | func (fds *FdSet) Set(fd int) {
11 | fds.Bits[fd/NFDBITS] |= (1 << (uintptr(fd) % NFDBITS))
12 | }
13 |
14 | // Clear removes fd from the set fds.
15 | func (fds *FdSet) Clear(fd int) {
16 | fds.Bits[fd/NFDBITS] &^= (1 << (uintptr(fd) % NFDBITS))
17 | }
18 |
19 | // IsSet returns whether fd is in the set fds.
20 | func (fds *FdSet) IsSet(fd int) bool {
21 | return fds.Bits[fd/NFDBITS]&(1<<(uintptr(fd)%NFDBITS)) != 0
22 | }
23 |
24 | // Zero clears the set fds.
25 | func (fds *FdSet) Zero() {
26 | for i := range fds.Bits {
27 | fds.Bits[i] = 0
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go:
--------------------------------------------------------------------------------
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 | //go:build gccgo && linux && amd64
6 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | //extern gettimeofday
12 | func realGettimeofday(*Timeval, *byte) int32
13 |
14 | func gettimeofday(tv *Timeval) (err syscall.Errno) {
15 | r := realGettimeofday(tv, nil)
16 | if r < 0 {
17 | return syscall.GetErrno()
18 | }
19 | return 0
20 | }
21 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/mmap_nomremap.go:
--------------------------------------------------------------------------------
1 | // Copyright 2023 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 | //go:build aix || darwin || dragonfly || freebsd || openbsd || solaris
6 |
7 | package unix
8 |
9 | var mapper = &mmapper{
10 | active: make(map[*byte][]byte),
11 | mmap: mmap,
12 | munmap: munmap,
13 | }
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/pagesize_unix.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 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 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
6 |
7 | // For Unix, get the pagesize from the runtime.
8 |
9 | package unix
10 |
11 | import "syscall"
12 |
13 | func Getpagesize() int {
14 | return syscall.Getpagesize()
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/ptrace_darwin.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 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 | //go:build darwin && !ios
6 |
7 | package unix
8 |
9 | func ptrace(request int, pid int, addr uintptr, data uintptr) error {
10 | return ptrace1(request, pid, addr, data)
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/ptrace_ios.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 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 | //go:build ios
6 |
7 | package unix
8 |
9 | func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
10 | return ENOTSUP
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/race.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 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 | //go:build (darwin && race) || (linux && race) || (freebsd && race)
6 |
7 | package unix
8 |
9 | import (
10 | "runtime"
11 | "unsafe"
12 | )
13 |
14 | const raceenabled = true
15 |
16 | func raceAcquire(addr unsafe.Pointer) {
17 | runtime.RaceAcquire(addr)
18 | }
19 |
20 | func raceReleaseMerge(addr unsafe.Pointer) {
21 | runtime.RaceReleaseMerge(addr)
22 | }
23 |
24 | func raceReadRange(addr unsafe.Pointer, len int) {
25 | runtime.RaceReadRange(addr, len)
26 | }
27 |
28 | func raceWriteRange(addr unsafe.Pointer, len int) {
29 | runtime.RaceWriteRange(addr, len)
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/race0.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 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 | //go:build aix || (darwin && !race) || (linux && !race) || (freebsd && !race) || netbsd || openbsd || solaris || dragonfly || zos
6 |
7 | package unix
8 |
9 | import (
10 | "unsafe"
11 | )
12 |
13 | const raceenabled = false
14 |
15 | func raceAcquire(addr unsafe.Pointer) {
16 | }
17 |
18 | func raceReleaseMerge(addr unsafe.Pointer) {
19 | }
20 |
21 | func raceReadRange(addr unsafe.Pointer, len int) {
22 | }
23 |
24 | func raceWriteRange(addr unsafe.Pointer, len int) {
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/readdirent_getdents.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 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 | //go:build aix || dragonfly || freebsd || linux || netbsd || openbsd
6 |
7 | package unix
8 |
9 | // ReadDirent reads directory entries from fd and writes them into buf.
10 | func ReadDirent(fd int, buf []byte) (n int, err error) {
11 | return Getdents(fd, buf)
12 | }
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 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 | //go:build darwin
6 |
7 | package unix
8 |
9 | import "unsafe"
10 |
11 | // ReadDirent reads directory entries from fd and writes them into buf.
12 | func ReadDirent(fd int, buf []byte) (n int, err error) {
13 | // Final argument is (basep *uintptr) and the syscall doesn't take nil.
14 | // 64 bits should be enough. (32 bits isn't even on 386). Since the
15 | // actual system call is getdirentries64, 64 is a good guess.
16 | // TODO(rsc): Can we use a single global basep for all calls?
17 | var base = (*uintptr)(unsafe.Pointer(new(uint64)))
18 | return Getdirentries(fd, buf, base)
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 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 unix
6 |
7 | // Round the length of a raw sockaddr up to align it properly.
8 | func cmsgAlignOf(salen int) int {
9 | salign := SizeofPtr
10 | if SizeofPtr == 8 && !supportsABI(_dragonflyABIChangeVersion) {
11 | // 64-bit Dragonfly before the September 2019 ABI changes still requires
12 | // 32-bit aligned access to network subsystem.
13 | salign = 4
14 | }
15 | return (salen + salign - 1) & ^(salign - 1)
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 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 | //go:build aix || darwin || freebsd || linux || netbsd || openbsd || solaris || zos
6 |
7 | package unix
8 |
9 | import (
10 | "runtime"
11 | )
12 |
13 | // Round the length of a raw sockaddr up to align it properly.
14 | func cmsgAlignOf(salen int) int {
15 | salign := SizeofPtr
16 |
17 | // dragonfly needs to check ABI version at runtime, see cmsgAlignOf in
18 | // sockcmsg_dragonfly.go
19 | switch runtime.GOOS {
20 | case "aix":
21 | // There is no alignment on AIX.
22 | salign = 1
23 | case "darwin", "ios", "illumos", "solaris":
24 | // NOTE: It seems like 64-bit Darwin, Illumos and Solaris
25 | // kernels still require 32-bit aligned access to network
26 | // subsystem.
27 | if SizeofPtr == 8 {
28 | salign = 4
29 | }
30 | case "netbsd", "openbsd":
31 | // NetBSD and OpenBSD armv7 require 64-bit alignment.
32 | if runtime.GOARCH == "arm" {
33 | salign = 8
34 | }
35 | // NetBSD aarch64 requires 128-bit alignment.
36 | if runtime.GOOS == "netbsd" && runtime.GOARCH == "arm64" {
37 | salign = 16
38 | }
39 | case "zos":
40 | // z/OS socket macros use [32-bit] sizeof(int) alignment,
41 | // not pointer width.
42 | salign = SizeofInt
43 | }
44 |
45 | return (salen + salign - 1) & ^(salign - 1)
46 | }
47 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 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 | //go:build aix && ppc
6 |
7 | package unix
8 |
9 | //sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = getrlimit64
10 | //sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek64
11 |
12 | //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
13 |
14 | func setTimespec(sec, nsec int64) Timespec {
15 | return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
16 | }
17 |
18 | func setTimeval(sec, usec int64) Timeval {
19 | return Timeval{Sec: int32(sec), Usec: int32(usec)}
20 | }
21 |
22 | func (iov *Iovec) SetLen(length int) {
23 | iov.Len = uint32(length)
24 | }
25 |
26 | func (msghdr *Msghdr) SetControllen(length int) {
27 | msghdr.Controllen = uint32(length)
28 | }
29 |
30 | func (msghdr *Msghdr) SetIovlen(length int) {
31 | msghdr.Iovlen = int32(length)
32 | }
33 |
34 | func (cmsg *Cmsghdr) SetLen(length int) {
35 | cmsg.Len = uint32(length)
36 | }
37 |
38 | func Fstat(fd int, stat *Stat_t) error {
39 | return fstat(fd, stat)
40 | }
41 |
42 | func Fstatat(dirfd int, path string, stat *Stat_t, flags int) error {
43 | return fstatat(dirfd, path, stat, flags)
44 | }
45 |
46 | func Lstat(path string, stat *Stat_t) error {
47 | return lstat(path, stat)
48 | }
49 |
50 | func Stat(path string, statptr *Stat_t) error {
51 | return stat(path, statptr)
52 | }
53 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 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 | //go:build darwin && go1.12
6 |
7 | package unix
8 |
9 | import _ "unsafe"
10 |
11 | // Implemented in the runtime package (runtime/sys_darwin.go)
12 | func syscall_syscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
13 | func syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
14 | func syscall_syscall6X(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
15 | func syscall_syscall9(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) // 32-bit only
16 | func syscall_rawSyscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
17 | func syscall_rawSyscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
18 | func syscall_syscallPtr(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
19 |
20 | //go:linkname syscall_syscall syscall.syscall
21 | //go:linkname syscall_syscall6 syscall.syscall6
22 | //go:linkname syscall_syscall6X syscall.syscall6X
23 | //go:linkname syscall_syscall9 syscall.syscall9
24 | //go:linkname syscall_rawSyscall syscall.rawSyscall
25 | //go:linkname syscall_rawSyscall6 syscall.rawSyscall6
26 | //go:linkname syscall_syscallPtr syscall.syscallPtr
27 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_hurd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 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 | //go:build hurd
6 |
7 | package unix
8 |
9 | /*
10 | #include
11 | int ioctl(int, unsigned long int, uintptr_t);
12 | */
13 | import "C"
14 |
15 | func ioctl(fd int, req uint, arg uintptr) (err error) {
16 | r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(arg))
17 | if r0 == -1 && er != nil {
18 | err = er
19 | }
20 | return
21 | }
22 |
23 | func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
24 | r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(uintptr(arg)))
25 | if r0 == -1 && er != nil {
26 | err = er
27 | }
28 | return
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_hurd_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 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 | //go:build 386 && hurd
6 |
7 | package unix
8 |
9 | const (
10 | TIOCGETA = 0x62251713
11 | )
12 |
13 | type Winsize struct {
14 | Row uint16
15 | Col uint16
16 | Xpixel uint16
17 | Ypixel uint16
18 | }
19 |
20 | type Termios struct {
21 | Iflag uint32
22 | Oflag uint32
23 | Cflag uint32
24 | Lflag uint32
25 | Cc [20]uint8
26 | Ispeed int32
27 | Ospeed int32
28 | }
29 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_alarm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 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 | //go:build linux && (386 || amd64 || mips || mipsle || mips64 || mipsle || ppc64 || ppc64le || ppc || s390x || sparc64)
6 |
7 | package unix
8 |
9 | // SYS_ALARM is not defined on arm or riscv, but is available for other GOARCH
10 | // values.
11 |
12 | //sys Alarm(seconds uint) (remaining uint, err error)
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 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 | //go:build amd64 && linux && gc
6 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | //go:noescape
12 | func gettimeofday(tv *Timeval) (err syscall.Errno)
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_gc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 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 | //go:build linux && gc
6 |
7 | package unix
8 |
9 | // SyscallNoError may be used instead of Syscall for syscalls that don't fail.
10 | func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr)
11 |
12 | // RawSyscallNoError may be used instead of RawSyscall for syscalls that don't
13 | // fail.
14 | func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr)
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 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 | //go:build linux && gc && 386
6 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | // Underlying system call writes to newoffset via pointer.
12 | // Implemented in assembly to avoid allocation.
13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno)
14 |
15 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)
16 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 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 | //go:build arm && gc && linux
6 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | // Underlying system call writes to newoffset via pointer.
12 | // Implemented in assembly to avoid allocation.
13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno)
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 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 | //go:build linux && gccgo && 386
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) {
15 | var newoffset int64
16 | offsetLow := uint32(offset & 0xffffffff)
17 | offsetHigh := uint32((offset >> 32) & 0xffffffff)
18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0)
19 | return newoffset, err
20 | }
21 |
22 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) {
23 | fd, _, err := Syscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0)
24 | return int(fd), err
25 | }
26 |
27 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) {
28 | fd, _, err := RawSyscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0)
29 | return int(fd), err
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 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 | //go:build linux && gccgo && arm
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) {
15 | var newoffset int64
16 | offsetLow := uint32(offset & 0xffffffff)
17 | offsetHigh := uint32((offset >> 32) & 0xffffffff)
18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0)
19 | return newoffset, err
20 | }
21 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 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 | //go:build 386 && netbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: int32(nsec)}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint32(fd)
19 | k.Filter = uint32(mode)
20 | k.Flags = uint32(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint32(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = int32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 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 | //go:build amd64 && netbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint64(fd)
19 | k.Filter = uint32(mode)
20 | k.Flags = uint32(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint64(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = int32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 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 | //go:build arm && netbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: int32(nsec)}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint32(fd)
19 | k.Filter = uint32(mode)
20 | k.Flags = uint32(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint32(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = int32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 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 | //go:build arm64 && netbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint64(fd)
19 | k.Filter = uint32(mode)
20 | k.Flags = uint32(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint64(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = int32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 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 | //go:build 386 && openbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: int32(nsec)}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint32(fd)
19 | k.Filter = int16(mode)
20 | k.Flags = uint16(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint32(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = uint32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
40 | // of openbsd/386 the syscall is called sysctl instead of __sysctl.
41 | const SYS___SYSCTL = SYS_SYSCTL
42 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 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 | //go:build amd64 && openbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: usec}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint64(fd)
19 | k.Filter = int16(mode)
20 | k.Flags = uint16(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint64(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = uint32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
40 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl.
41 | const SYS___SYSCTL = SYS_SYSCTL
42 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 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 | //go:build arm && openbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: int32(nsec)}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint32(fd)
19 | k.Filter = int16(mode)
20 | k.Flags = uint16(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint32(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = uint32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
40 | // of openbsd/arm the syscall is called sysctl instead of __sysctl.
41 | const SYS___SYSCTL = SYS_SYSCTL
42 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 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 | //go:build arm64 && openbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: usec}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint64(fd)
19 | k.Filter = int16(mode)
20 | k.Flags = uint16(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint64(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = uint32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
40 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl.
41 | const SYS___SYSCTL = SYS_SYSCTL
42 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_openbsd_libc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 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 | //go:build openbsd
6 |
7 | package unix
8 |
9 | import _ "unsafe"
10 |
11 | // Implemented in the runtime package (runtime/sys_openbsd3.go)
12 | func syscall_syscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
13 | func syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
14 | func syscall_syscall10(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 uintptr) (r1, r2 uintptr, err Errno)
15 | func syscall_rawSyscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
16 | func syscall_rawSyscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
17 |
18 | //go:linkname syscall_syscall syscall.syscall
19 | //go:linkname syscall_syscall6 syscall.syscall6
20 | //go:linkname syscall_syscall10 syscall.syscall10
21 | //go:linkname syscall_rawSyscall syscall.rawSyscall
22 | //go:linkname syscall_rawSyscall6 syscall.rawSyscall6
23 |
24 | func syscall_syscall9(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) {
25 | return syscall_syscall10(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, 0)
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_openbsd_mips64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 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 unix
6 |
7 | func setTimespec(sec, nsec int64) Timespec {
8 | return Timespec{Sec: sec, Nsec: nsec}
9 | }
10 |
11 | func setTimeval(sec, usec int64) Timeval {
12 | return Timeval{Sec: sec, Usec: usec}
13 | }
14 |
15 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
16 | k.Ident = uint64(fd)
17 | k.Filter = int16(mode)
18 | k.Flags = uint16(flags)
19 | }
20 |
21 | func (iov *Iovec) SetLen(length int) {
22 | iov.Len = uint64(length)
23 | }
24 |
25 | func (msghdr *Msghdr) SetControllen(length int) {
26 | msghdr.Controllen = uint32(length)
27 | }
28 |
29 | func (msghdr *Msghdr) SetIovlen(length int) {
30 | msghdr.Iovlen = uint32(length)
31 | }
32 |
33 | func (cmsg *Cmsghdr) SetLen(length int) {
34 | cmsg.Len = uint32(length)
35 | }
36 |
37 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
38 | // of OpenBSD the syscall is called sysctl instead of __sysctl.
39 | const SYS___SYSCTL = SYS_SYSCTL
40 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_openbsd_ppc64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 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 | //go:build ppc64 && openbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: usec}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint64(fd)
19 | k.Filter = int16(mode)
20 | k.Flags = uint16(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint64(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = uint32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
40 | // of openbsd/ppc64 the syscall is called sysctl instead of __sysctl.
41 | const SYS___SYSCTL = SYS_SYSCTL
42 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_openbsd_riscv64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 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 | //go:build riscv64 && openbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: usec}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint64(fd)
19 | k.Filter = int16(mode)
20 | k.Flags = uint16(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint64(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = uint32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
40 | // of openbsd/riscv64 the syscall is called sysctl instead of __sysctl.
41 | const SYS___SYSCTL = SYS_SYSCTL
42 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 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 | //go:build amd64 && solaris
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: usec}
15 | }
16 |
17 | func (iov *Iovec) SetLen(length int) {
18 | iov.Len = uint64(length)
19 | }
20 |
21 | func (msghdr *Msghdr) SetIovlen(length int) {
22 | msghdr.Iovlen = int32(length)
23 | }
24 |
25 | func (cmsg *Cmsghdr) SetLen(length int) {
26 | cmsg.Len = uint32(length)
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_unix_gc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 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 | //go:build (darwin || dragonfly || freebsd || (linux && !ppc64 && !ppc64le) || netbsd || openbsd || solaris) && gc
6 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
12 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
13 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
14 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 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 | //go:build linux && (ppc64le || ppc64) && gc
6 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
12 | return syscall.Syscall(trap, a1, a2, a3)
13 | }
14 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) {
15 | return syscall.Syscall6(trap, a1, a2, a3, a4, a5, a6)
16 | }
17 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
18 | return syscall.RawSyscall(trap, a1, a2, a3)
19 | }
20 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) {
21 | return syscall.RawSyscall6(trap, a1, a2, a3, a4, a5, a6)
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/sysvshm_linux.go:
--------------------------------------------------------------------------------
1 | // Copyright 2021 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 | //go:build linux
6 |
7 | package unix
8 |
9 | import "runtime"
10 |
11 | // SysvShmCtl performs control operations on the shared memory segment
12 | // specified by id.
13 | func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) {
14 | if runtime.GOARCH == "arm" ||
15 | runtime.GOARCH == "mips64" || runtime.GOARCH == "mips64le" {
16 | cmd |= ipc_64
17 | }
18 |
19 | return shmctl(id, cmd, desc)
20 | }
21 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/sysvshm_unix_other.go:
--------------------------------------------------------------------------------
1 | // Copyright 2021 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 | //go:build darwin && !ios
6 |
7 | package unix
8 |
9 | // SysvShmCtl performs control operations on the shared memory segment
10 | // specified by id.
11 | func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) {
12 | return shmctl(id, cmd, desc)
13 | }
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/unveil_openbsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 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 unix
6 |
7 | import "fmt"
8 |
9 | // Unveil implements the unveil syscall.
10 | // For more information see unveil(2).
11 | // Note that the special case of blocking further
12 | // unveil calls is handled by UnveilBlock.
13 | func Unveil(path string, flags string) error {
14 | if err := supportsUnveil(); err != nil {
15 | return err
16 | }
17 | pathPtr, err := BytePtrFromString(path)
18 | if err != nil {
19 | return err
20 | }
21 | flagsPtr, err := BytePtrFromString(flags)
22 | if err != nil {
23 | return err
24 | }
25 | return unveil(pathPtr, flagsPtr)
26 | }
27 |
28 | // UnveilBlock blocks future unveil calls.
29 | // For more information see unveil(2).
30 | func UnveilBlock() error {
31 | if err := supportsUnveil(); err != nil {
32 | return err
33 | }
34 | return unveil(nil, nil)
35 | }
36 |
37 | // supportsUnveil checks for availability of the unveil(2) system call based
38 | // on the running OpenBSD version.
39 | func supportsUnveil() error {
40 | maj, min, err := majmin()
41 | if err != nil {
42 | return err
43 | }
44 |
45 | // unveil is not available before 6.4
46 | if maj < 6 || (maj == 6 && min <= 3) {
47 | return fmt.Errorf("cannot call Unveil on OpenBSD %d.%d", maj, min)
48 | }
49 |
50 | return nil
51 | }
52 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go:
--------------------------------------------------------------------------------
1 | // Code generated by linux/mkall.go generatePtracePair("arm", "arm64"). DO NOT EDIT.
2 |
3 | //go:build linux && (arm || arm64)
4 |
5 | package unix
6 |
7 | import "unsafe"
8 |
9 | // PtraceRegsArm is the registers used by arm binaries.
10 | type PtraceRegsArm struct {
11 | Uregs [18]uint32
12 | }
13 |
14 | // PtraceGetRegsArm fetches the registers used by arm binaries.
15 | func PtraceGetRegsArm(pid int, regsout *PtraceRegsArm) error {
16 | return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))
17 | }
18 |
19 | // PtraceSetRegsArm sets the registers used by arm binaries.
20 | func PtraceSetRegsArm(pid int, regs *PtraceRegsArm) error {
21 | return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))
22 | }
23 |
24 | // PtraceRegsArm64 is the registers used by arm64 binaries.
25 | type PtraceRegsArm64 struct {
26 | Regs [31]uint64
27 | Sp uint64
28 | Pc uint64
29 | Pstate uint64
30 | }
31 |
32 | // PtraceGetRegsArm64 fetches the registers used by arm64 binaries.
33 | func PtraceGetRegsArm64(pid int, regsout *PtraceRegsArm64) error {
34 | return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))
35 | }
36 |
37 | // PtraceSetRegsArm64 sets the registers used by arm64 binaries.
38 | func PtraceSetRegsArm64(pid int, regs *PtraceRegsArm64) error {
39 | return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))
40 | }
41 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/zptrace_linux_arm64.go:
--------------------------------------------------------------------------------
1 | // Code generated by linux/mkall.go generatePtraceRegSet("arm64"). DO NOT EDIT.
2 |
3 | package unix
4 |
5 | import "unsafe"
6 |
7 | // PtraceGetRegSetArm64 fetches the registers used by arm64 binaries.
8 | func PtraceGetRegSetArm64(pid, addr int, regsout *PtraceRegsArm64) error {
9 | iovec := Iovec{(*byte)(unsafe.Pointer(regsout)), uint64(unsafe.Sizeof(*regsout))}
10 | return ptracePtr(PTRACE_GETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec))
11 | }
12 |
13 | // PtraceSetRegSetArm64 sets the registers used by arm64 binaries.
14 | func PtraceSetRegSetArm64(pid, addr int, regs *PtraceRegsArm64) error {
15 | iovec := Iovec{(*byte)(unsafe.Pointer(regs)), uint64(unsafe.Sizeof(*regs))}
16 | return ptracePtr(PTRACE_SETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec))
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/aliases.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 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 | //go:build windows && go1.9
6 |
7 | package windows
8 |
9 | import "syscall"
10 |
11 | type Errno = syscall.Errno
12 | type SysProcAttr = syscall.SysProcAttr
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/empty.s:
--------------------------------------------------------------------------------
1 | // Copyright 2019 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 | //go:build !go1.12
6 |
7 | // This file is here to allow bodyless functions with go:linkname for Go 1.11
8 | // and earlier (see https://golang.org/issue/23311).
9 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/env_windows.go:
--------------------------------------------------------------------------------
1 | // Copyright 2010 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 | // Windows environment variables.
6 |
7 | package windows
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func Getenv(key string) (value string, found bool) {
15 | return syscall.Getenv(key)
16 | }
17 |
18 | func Setenv(key, value string) error {
19 | return syscall.Setenv(key, value)
20 | }
21 |
22 | func Clearenv() {
23 | syscall.Clearenv()
24 | }
25 |
26 | func Environ() []string {
27 | return syscall.Environ()
28 | }
29 |
30 | // Returns a default environment associated with the token, rather than the current
31 | // process. If inheritExisting is true, then this environment also inherits the
32 | // environment of the current process.
33 | func (token Token) Environ(inheritExisting bool) (env []string, err error) {
34 | var block *uint16
35 | err = CreateEnvironmentBlock(&block, token, inheritExisting)
36 | if err != nil {
37 | return nil, err
38 | }
39 | defer DestroyEnvironmentBlock(block)
40 | blockp := unsafe.Pointer(block)
41 | for {
42 | entry := UTF16PtrToString((*uint16)(blockp))
43 | if len(entry) == 0 {
44 | break
45 | }
46 | env = append(env, entry)
47 | blockp = unsafe.Add(blockp, 2*(len(entry)+1))
48 | }
49 | return env, nil
50 | }
51 |
52 | func Unsetenv(key string) error {
53 | return syscall.Unsetenv(key)
54 | }
55 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/eventlog.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 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 | //go:build windows
6 |
7 | package windows
8 |
9 | const (
10 | EVENTLOG_SUCCESS = 0
11 | EVENTLOG_ERROR_TYPE = 1
12 | EVENTLOG_WARNING_TYPE = 2
13 | EVENTLOG_INFORMATION_TYPE = 4
14 | EVENTLOG_AUDIT_SUCCESS = 8
15 | EVENTLOG_AUDIT_FAILURE = 16
16 | )
17 |
18 | //sys RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) [failretval==0] = advapi32.RegisterEventSourceW
19 | //sys DeregisterEventSource(handle Handle) (err error) = advapi32.DeregisterEventSource
20 | //sys ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) = advapi32.ReportEventW
21 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/mkknownfolderids.bash:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Copyright 2019 The Go Authors. All rights reserved.
4 | # Use of this source code is governed by a BSD-style
5 | # license that can be found in the LICENSE file.
6 |
7 | set -e
8 | shopt -s nullglob
9 |
10 | knownfolders="$(printf '%s\n' "/mnt/c/Program Files (x86)/Windows Kits/"/*/Include/*/um/KnownFolders.h | sort -Vr | head -n 1)"
11 | [[ -n $knownfolders ]] || { echo "Unable to find KnownFolders.h" >&2; exit 1; }
12 |
13 | {
14 | echo "// Code generated by 'mkknownfolderids.bash'; DO NOT EDIT."
15 | echo
16 | echo "package windows"
17 | echo "type KNOWNFOLDERID GUID"
18 | echo "var ("
19 | while read -r line; do
20 | [[ $line =~ DEFINE_KNOWN_FOLDER\((FOLDERID_[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+)\) ]] || continue
21 | printf "%s = &KNOWNFOLDERID{0x%08x, 0x%04x, 0x%04x, [8]byte{0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x}}\n" \
22 | "${BASH_REMATCH[1]}" $(( "${BASH_REMATCH[2]}" )) $(( "${BASH_REMATCH[3]}" )) $(( "${BASH_REMATCH[4]}" )) \
23 | $(( "${BASH_REMATCH[5]}" )) $(( "${BASH_REMATCH[6]}" )) $(( "${BASH_REMATCH[7]}" )) $(( "${BASH_REMATCH[8]}" )) \
24 | $(( "${BASH_REMATCH[9]}" )) $(( "${BASH_REMATCH[10]}" )) $(( "${BASH_REMATCH[11]}" )) $(( "${BASH_REMATCH[12]}" ))
25 | done < "$knownfolders"
26 | echo ")"
27 | } | gofmt > "zknownfolderids_windows.go"
28 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/mksyscall.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 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 | //go:build generate
6 |
7 | package windows
8 |
9 | //go:generate go run golang.org/x/sys/windows/mkwinsyscall -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go setupapi_windows.go
10 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/race.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 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 | //go:build windows && race
6 |
7 | package windows
8 |
9 | import (
10 | "runtime"
11 | "unsafe"
12 | )
13 |
14 | const raceenabled = true
15 |
16 | func raceAcquire(addr unsafe.Pointer) {
17 | runtime.RaceAcquire(addr)
18 | }
19 |
20 | func raceReleaseMerge(addr unsafe.Pointer) {
21 | runtime.RaceReleaseMerge(addr)
22 | }
23 |
24 | func raceReadRange(addr unsafe.Pointer, len int) {
25 | runtime.RaceReadRange(addr, len)
26 | }
27 |
28 | func raceWriteRange(addr unsafe.Pointer, len int) {
29 | runtime.RaceWriteRange(addr, len)
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/race0.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 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 | //go:build windows && !race
6 |
7 | package windows
8 |
9 | import (
10 | "unsafe"
11 | )
12 |
13 | const raceenabled = false
14 |
15 | func raceAcquire(addr unsafe.Pointer) {
16 | }
17 |
18 | func raceReleaseMerge(addr unsafe.Pointer) {
19 | }
20 |
21 | func raceReadRange(addr unsafe.Pointer, len int) {
22 | }
23 |
24 | func raceWriteRange(addr unsafe.Pointer, len int) {
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/str.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 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 | //go:build windows
6 |
7 | package windows
8 |
9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency
10 | if val < 0 {
11 | return "-" + itoa(-val)
12 | }
13 | var buf [32]byte // big enough for int64
14 | i := len(buf) - 1
15 | for val >= 10 {
16 | buf[i] = byte(val%10 + '0')
17 | i--
18 | val /= 10
19 | }
20 | buf[i] = byte(val + '0')
21 | return string(buf[i:])
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/types_windows_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 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 windows
6 |
7 | type WSAData struct {
8 | Version uint16
9 | HighVersion uint16
10 | Description [WSADESCRIPTION_LEN + 1]byte
11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte
12 | MaxSockets uint16
13 | MaxUdpDg uint16
14 | VendorInfo *byte
15 | }
16 |
17 | type Servent struct {
18 | Name *byte
19 | Aliases **byte
20 | Port uint16
21 | Proto *byte
22 | }
23 |
24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct {
25 | PerProcessUserTimeLimit int64
26 | PerJobUserTimeLimit int64
27 | LimitFlags uint32
28 | MinimumWorkingSetSize uintptr
29 | MaximumWorkingSetSize uintptr
30 | ActiveProcessLimit uint32
31 | Affinity uintptr
32 | PriorityClass uint32
33 | SchedulingClass uint32
34 | _ uint32 // pad to 8 byte boundary
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/types_windows_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 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 windows
6 |
7 | type WSAData struct {
8 | Version uint16
9 | HighVersion uint16
10 | MaxSockets uint16
11 | MaxUdpDg uint16
12 | VendorInfo *byte
13 | Description [WSADESCRIPTION_LEN + 1]byte
14 | SystemStatus [WSASYS_STATUS_LEN + 1]byte
15 | }
16 |
17 | type Servent struct {
18 | Name *byte
19 | Aliases **byte
20 | Proto *byte
21 | Port uint16
22 | }
23 |
24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct {
25 | PerProcessUserTimeLimit int64
26 | PerJobUserTimeLimit int64
27 | LimitFlags uint32
28 | MinimumWorkingSetSize uintptr
29 | MaximumWorkingSetSize uintptr
30 | ActiveProcessLimit uint32
31 | Affinity uintptr
32 | PriorityClass uint32
33 | SchedulingClass uint32
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/types_windows_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 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 windows
6 |
7 | type WSAData struct {
8 | Version uint16
9 | HighVersion uint16
10 | Description [WSADESCRIPTION_LEN + 1]byte
11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte
12 | MaxSockets uint16
13 | MaxUdpDg uint16
14 | VendorInfo *byte
15 | }
16 |
17 | type Servent struct {
18 | Name *byte
19 | Aliases **byte
20 | Port uint16
21 | Proto *byte
22 | }
23 |
24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct {
25 | PerProcessUserTimeLimit int64
26 | PerJobUserTimeLimit int64
27 | LimitFlags uint32
28 | MinimumWorkingSetSize uintptr
29 | MaximumWorkingSetSize uintptr
30 | ActiveProcessLimit uint32
31 | Affinity uintptr
32 | PriorityClass uint32
33 | SchedulingClass uint32
34 | _ uint32 // pad to 8 byte boundary
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/types_windows_arm64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 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 windows
6 |
7 | type WSAData struct {
8 | Version uint16
9 | HighVersion uint16
10 | MaxSockets uint16
11 | MaxUdpDg uint16
12 | VendorInfo *byte
13 | Description [WSADESCRIPTION_LEN + 1]byte
14 | SystemStatus [WSASYS_STATUS_LEN + 1]byte
15 | }
16 |
17 | type Servent struct {
18 | Name *byte
19 | Aliases **byte
20 | Proto *byte
21 | Port uint16
22 | }
23 |
24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct {
25 | PerProcessUserTimeLimit int64
26 | PerJobUserTimeLimit int64
27 | LimitFlags uint32
28 | MinimumWorkingSetSize uintptr
29 | MaximumWorkingSetSize uintptr
30 | ActiveProcessLimit uint32
31 | Affinity uintptr
32 | PriorityClass uint32
33 | SchedulingClass uint32
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/term/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to Go
2 |
3 | Go is an open source project.
4 |
5 | It is the work of hundreds of contributors. We appreciate your help!
6 |
7 | ## Filing issues
8 |
9 | When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions:
10 |
11 | 1. What version of Go are you using (`go version`)?
12 | 2. What operating system and processor architecture are you using?
13 | 3. What did you do?
14 | 4. What did you expect to see?
15 | 5. What did you see instead?
16 |
17 | General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker.
18 | The gophers there will answer or ask you to file an issue if you've tripped over a bug.
19 |
20 | ## Contributing code
21 |
22 | Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html)
23 | before sending patches.
24 |
25 | Unless otherwise noted, the Go source files are distributed under
26 | the BSD-style license found in the LICENSE file.
27 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/term/PATENTS:
--------------------------------------------------------------------------------
1 | Additional IP Rights Grant (Patents)
2 |
3 | "This implementation" means the copyrightable works distributed by
4 | Google as part of the Go project.
5 |
6 | Google hereby grants to You a perpetual, worldwide, non-exclusive,
7 | no-charge, royalty-free, irrevocable (except as stated in this section)
8 | patent license to make, have made, use, offer to sell, sell, import,
9 | transfer and otherwise run, modify and propagate the contents of this
10 | implementation of Go, where such license applies only to those patent
11 | claims, both currently owned or controlled by Google and acquired in
12 | the future, licensable by Google that are necessarily infringed by this
13 | implementation of Go. This grant does not include claims that would be
14 | infringed only as a consequence of further modification of this
15 | implementation. If you or your agent or exclusive licensee institute or
16 | order or agree to the institution of patent litigation against any
17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging
18 | that this implementation of Go or any code incorporated within this
19 | implementation of Go constitutes direct or contributory patent
20 | infringement, or inducement of patent infringement, then any patent
21 | rights granted to you under this License for this implementation of Go
22 | shall terminate as of the date such litigation is filed.
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/term/README.md:
--------------------------------------------------------------------------------
1 | # Go terminal/console support
2 |
3 | [](https://pkg.go.dev/golang.org/x/term)
4 |
5 | This repository provides Go terminal and console support packages.
6 |
7 | ## Download/Install
8 |
9 | The easiest way to install is to run `go get -u golang.org/x/term`. You can
10 | also manually git clone the repository to `$GOPATH/src/golang.org/x/term`.
11 |
12 | ## Report Issues / Send Patches
13 |
14 | This repository uses Gerrit for code changes. To learn how to submit changes to
15 | this repository, see https://golang.org/doc/contribute.html.
16 |
17 | The main issue tracker for the term repository is located at
18 | https://github.com/golang/go/issues. Prefix your issue with "x/term:" in the
19 | subject line, so it is easy to find.
20 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/term/codereview.cfg:
--------------------------------------------------------------------------------
1 | issuerepo: golang/go
2 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/term/go.mod:
--------------------------------------------------------------------------------
1 | module golang.org/x/term
2 |
3 | go 1.18
4 |
5 | require golang.org/x/sys v0.15.0
6 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/term/go.sum:
--------------------------------------------------------------------------------
1 | golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
2 | golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
3 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/term/term_plan9.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 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 term
6 |
7 | import (
8 | "fmt"
9 | "runtime"
10 |
11 | "golang.org/x/sys/plan9"
12 | )
13 |
14 | type state struct{}
15 |
16 | func isTerminal(fd int) bool {
17 | path, err := plan9.Fd2path(fd)
18 | if err != nil {
19 | return false
20 | }
21 | return path == "/dev/cons" || path == "/mnt/term/dev/cons"
22 | }
23 |
24 | func makeRaw(fd int) (*State, error) {
25 | return nil, fmt.Errorf("terminal: MakeRaw not implemented on %s/%s", runtime.GOOS, runtime.GOARCH)
26 | }
27 |
28 | func getState(fd int) (*State, error) {
29 | return nil, fmt.Errorf("terminal: GetState not implemented on %s/%s", runtime.GOOS, runtime.GOARCH)
30 | }
31 |
32 | func restore(fd int, state *State) error {
33 | return fmt.Errorf("terminal: Restore not implemented on %s/%s", runtime.GOOS, runtime.GOARCH)
34 | }
35 |
36 | func getSize(fd int) (width, height int, err error) {
37 | return 0, 0, fmt.Errorf("terminal: GetSize not implemented on %s/%s", runtime.GOOS, runtime.GOARCH)
38 | }
39 |
40 | func readPassword(fd int) ([]byte, error) {
41 | return nil, fmt.Errorf("terminal: ReadPassword not implemented on %s/%s", runtime.GOOS, runtime.GOARCH)
42 | }
43 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/term/term_unix_bsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 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 | //go:build darwin || dragonfly || freebsd || netbsd || openbsd
6 |
7 | package term
8 |
9 | import "golang.org/x/sys/unix"
10 |
11 | const ioctlReadTermios = unix.TIOCGETA
12 | const ioctlWriteTermios = unix.TIOCSETA
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/term/term_unix_other.go:
--------------------------------------------------------------------------------
1 | // Copyright 2021 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 | //go:build aix || linux || solaris || zos
6 |
7 | package term
8 |
9 | import "golang.org/x/sys/unix"
10 |
11 | const ioctlReadTermios = unix.TCGETS
12 | const ioctlWriteTermios = unix.TCSETS
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/term/term_unsupported.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 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 | //go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !zos && !windows && !solaris && !plan9
6 |
7 | package term
8 |
9 | import (
10 | "fmt"
11 | "runtime"
12 | )
13 |
14 | type state struct{}
15 |
16 | func isTerminal(fd int) bool {
17 | return false
18 | }
19 |
20 | func makeRaw(fd int) (*State, error) {
21 | return nil, fmt.Errorf("terminal: MakeRaw not implemented on %s/%s", runtime.GOOS, runtime.GOARCH)
22 | }
23 |
24 | func getState(fd int) (*State, error) {
25 | return nil, fmt.Errorf("terminal: GetState not implemented on %s/%s", runtime.GOOS, runtime.GOARCH)
26 | }
27 |
28 | func restore(fd int, state *State) error {
29 | return fmt.Errorf("terminal: Restore not implemented on %s/%s", runtime.GOOS, runtime.GOARCH)
30 | }
31 |
32 | func getSize(fd int) (width, height int, err error) {
33 | return 0, 0, fmt.Errorf("terminal: GetSize not implemented on %s/%s", runtime.GOOS, runtime.GOARCH)
34 | }
35 |
36 | func readPassword(fd int) ([]byte, error) {
37 | return nil, fmt.Errorf("terminal: ReadPassword not implemented on %s/%s", runtime.GOOS, runtime.GOARCH)
38 | }
39 |
--------------------------------------------------------------------------------
/vendor/modules.txt:
--------------------------------------------------------------------------------
1 | # github.com/fatih/color v1.9.0
2 | ## explicit
3 | github.com/fatih/color
4 | # github.com/howeyc/gopass v0.0.0-20190910152052-7cb4b85ec19c
5 | ## explicit
6 | github.com/howeyc/gopass
7 | # github.com/jessevdk/go-flags v1.4.0
8 | ## explicit
9 | github.com/jessevdk/go-flags
10 | # github.com/kr/fs v0.1.0
11 | github.com/kr/fs
12 | # github.com/mattn/go-colorable v0.1.4
13 | github.com/mattn/go-colorable
14 | # github.com/mattn/go-isatty v0.0.11
15 | github.com/mattn/go-isatty
16 | # github.com/pkg/errors v0.9.1
17 | github.com/pkg/errors
18 | # github.com/pkg/sftp v1.12.0
19 | ## explicit
20 | github.com/pkg/sftp
21 | # golang.org/x/crypto v0.17.0
22 | ## explicit
23 | golang.org/x/crypto/blowfish
24 | golang.org/x/crypto/chacha20
25 | golang.org/x/crypto/curve25519
26 | golang.org/x/crypto/curve25519/internal/field
27 | golang.org/x/crypto/internal/alias
28 | golang.org/x/crypto/internal/poly1305
29 | golang.org/x/crypto/ssh
30 | golang.org/x/crypto/ssh/internal/bcrypt_pbkdf
31 | golang.org/x/crypto/ssh/terminal
32 | # golang.org/x/sys v0.15.0
33 | golang.org/x/sys/cpu
34 | golang.org/x/sys/plan9
35 | golang.org/x/sys/unix
36 | golang.org/x/sys/windows
37 | # golang.org/x/term v0.15.0
38 | golang.org/x/term
39 |
--------------------------------------------------------------------------------