mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-31 06:16:41 -04:00
unix: add SEEK_* constants on Darwin, FreeBSD, Linux
The Go "os" package already provides bindings for SEEK_CUR, SEEK_SET and SEEK_END. Most operating systems also support SEEK_HOLE and SEEK_DATA, which you can use to skip sparse regions in a file. Let's add bindings, so we can also do this from within Go. Change-Id: If9243b05a8f563b4bce2452aa4bff145d9442cc2 GitHub-Last-Rev: ac8aed2d4aaddc4a28aab657d027f67ba6717e19 GitHub-Pull-Request: golang/sys#112 Reviewed-on: https://go-review.googlesource.com/c/sys/+/328170 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
This commit is contained in:
committed by
Tobias Klauser
parent
665e8c7367
commit
e2b7044e8c
@@ -2284,6 +2284,12 @@ const (
|
||||
SECCOMP_MODE_FILTER = 0x2
|
||||
SECCOMP_MODE_STRICT = 0x1
|
||||
SECURITYFS_MAGIC = 0x73636673
|
||||
SEEK_CUR = 0x1
|
||||
SEEK_DATA = 0x3
|
||||
SEEK_END = 0x2
|
||||
SEEK_HOLE = 0x4
|
||||
SEEK_MAX = 0x4
|
||||
SEEK_SET = 0x0
|
||||
SELINUX_MAGIC = 0xf97cff8c
|
||||
SHUT_RD = 0x0
|
||||
SHUT_RDWR = 0x2
|
||||
|
||||
Reference in New Issue
Block a user