From d5e6a3e2c0ae16fc7480523ebcb7fd4dd3215489 Mon Sep 17 00:00:00 2001 From: Nikson Kanti Paul Date: Sun, 16 Feb 2020 20:14:09 +0100 Subject: [PATCH] unix: add adjtimex return constants Fixes golang/go#37234 Change-Id: I6deda79bc0b8f34c7bb210b64adabbfff5fe675e Reviewed-on: https://go-review.googlesource.com/c/sys/+/219697 Run-TryBot: Tobias Klauser TryBot-Result: Gobot Gobot Reviewed-by: Tobias Klauser --- unix/linux/types.go | 10 ++++++++++ unix/ztypes_linux_386.go | 10 ++++++++++ unix/ztypes_linux_amd64.go | 10 ++++++++++ unix/ztypes_linux_arm.go | 10 ++++++++++ unix/ztypes_linux_arm64.go | 10 ++++++++++ unix/ztypes_linux_mips.go | 10 ++++++++++ unix/ztypes_linux_mips64.go | 10 ++++++++++ unix/ztypes_linux_mips64le.go | 10 ++++++++++ unix/ztypes_linux_mipsle.go | 10 ++++++++++ unix/ztypes_linux_ppc64.go | 10 ++++++++++ unix/ztypes_linux_ppc64le.go | 10 ++++++++++ unix/ztypes_linux_riscv64.go | 10 ++++++++++ unix/ztypes_linux_s390x.go | 10 ++++++++++ unix/ztypes_linux_sparc64.go | 10 ++++++++++ 14 files changed, 140 insertions(+) diff --git a/unix/linux/types.go b/unix/linux/types.go index 139c2b5b..b909c4c1 100644 --- a/unix/linux/types.go +++ b/unix/linux/types.go @@ -406,6 +406,16 @@ type Timeval C.struct_timeval type Timex C.struct_timex +const ( + TIME_OK = C.TIME_OK + TIME_INS = C.TIME_INS + TIME_DEL = C.TIME_DEL + TIME_OOP = C.TIME_OOP + TIME_WAIT = C.TIME_WAIT + TIME_ERROR = C.TIME_ERROR + TIME_BAD = C.TIME_BAD +) + type Time_t C.time_t type Tms C.struct_tms diff --git a/unix/ztypes_linux_386.go b/unix/ztypes_linux_386.go index d8089584..5d835d08 100644 --- a/unix/ztypes_linux_386.go +++ b/unix/ztypes_linux_386.go @@ -55,6 +55,16 @@ type Timex struct { _ [44]byte } +const ( + TIME_OK = 0x0 + TIME_INS = 0x1 + TIME_DEL = 0x2 + TIME_OOP = 0x3 + TIME_WAIT = 0x4 + TIME_ERROR = 0x5 + TIME_BAD = 0x5 +) + type Time_t int32 type Tms struct { diff --git a/unix/ztypes_linux_amd64.go b/unix/ztypes_linux_amd64.go index 88c76390..55a9902a 100644 --- a/unix/ztypes_linux_amd64.go +++ b/unix/ztypes_linux_amd64.go @@ -55,6 +55,16 @@ type Timex struct { _ [44]byte } +const ( + TIME_OK = 0x0 + TIME_INS = 0x1 + TIME_DEL = 0x2 + TIME_OOP = 0x3 + TIME_WAIT = 0x4 + TIME_ERROR = 0x5 + TIME_BAD = 0x5 +) + type Time_t int64 type Tms struct { diff --git a/unix/ztypes_linux_arm.go b/unix/ztypes_linux_arm.go index 0c0f24c7..91cbbb74 100644 --- a/unix/ztypes_linux_arm.go +++ b/unix/ztypes_linux_arm.go @@ -55,6 +55,16 @@ type Timex struct { _ [44]byte } +const ( + TIME_OK = 0x0 + TIME_INS = 0x1 + TIME_DEL = 0x2 + TIME_OOP = 0x3 + TIME_WAIT = 0x4 + TIME_ERROR = 0x5 + TIME_BAD = 0x5 +) + type Time_t int32 type Tms struct { diff --git a/unix/ztypes_linux_arm64.go b/unix/ztypes_linux_arm64.go index 6065d2d5..ea231fa9 100644 --- a/unix/ztypes_linux_arm64.go +++ b/unix/ztypes_linux_arm64.go @@ -55,6 +55,16 @@ type Timex struct { _ [44]byte } +const ( + TIME_OK = 0x0 + TIME_INS = 0x1 + TIME_DEL = 0x2 + TIME_OOP = 0x3 + TIME_WAIT = 0x4 + TIME_ERROR = 0x5 + TIME_BAD = 0x5 +) + type Time_t int64 type Tms struct { diff --git a/unix/ztypes_linux_mips.go b/unix/ztypes_linux_mips.go index 29d4408d..a577a5ae 100644 --- a/unix/ztypes_linux_mips.go +++ b/unix/ztypes_linux_mips.go @@ -55,6 +55,16 @@ type Timex struct { _ [44]byte } +const ( + TIME_OK = 0x0 + TIME_INS = 0x1 + TIME_DEL = 0x2 + TIME_OOP = 0x3 + TIME_WAIT = 0x4 + TIME_ERROR = 0x5 + TIME_BAD = 0x5 +) + type Time_t int32 type Tms struct { diff --git a/unix/ztypes_linux_mips64.go b/unix/ztypes_linux_mips64.go index 9cac9ff8..efbf921d 100644 --- a/unix/ztypes_linux_mips64.go +++ b/unix/ztypes_linux_mips64.go @@ -55,6 +55,16 @@ type Timex struct { _ [44]byte } +const ( + TIME_OK = 0x0 + TIME_INS = 0x1 + TIME_DEL = 0x2 + TIME_OOP = 0x3 + TIME_WAIT = 0x4 + TIME_ERROR = 0x5 + TIME_BAD = 0x5 +) + type Time_t int64 type Tms struct { diff --git a/unix/ztypes_linux_mips64le.go b/unix/ztypes_linux_mips64le.go index dbc21cf3..4d961479 100644 --- a/unix/ztypes_linux_mips64le.go +++ b/unix/ztypes_linux_mips64le.go @@ -55,6 +55,16 @@ type Timex struct { _ [44]byte } +const ( + TIME_OK = 0x0 + TIME_INS = 0x1 + TIME_DEL = 0x2 + TIME_OOP = 0x3 + TIME_WAIT = 0x4 + TIME_ERROR = 0x5 + TIME_BAD = 0x5 +) + type Time_t int64 type Tms struct { diff --git a/unix/ztypes_linux_mipsle.go b/unix/ztypes_linux_mipsle.go index a2662370..e7127c23 100644 --- a/unix/ztypes_linux_mipsle.go +++ b/unix/ztypes_linux_mipsle.go @@ -55,6 +55,16 @@ type Timex struct { _ [44]byte } +const ( + TIME_OK = 0x0 + TIME_INS = 0x1 + TIME_DEL = 0x2 + TIME_OOP = 0x3 + TIME_WAIT = 0x4 + TIME_ERROR = 0x5 + TIME_BAD = 0x5 +) + type Time_t int32 type Tms struct { diff --git a/unix/ztypes_linux_ppc64.go b/unix/ztypes_linux_ppc64.go index e93b73cd..515c1d7d 100644 --- a/unix/ztypes_linux_ppc64.go +++ b/unix/ztypes_linux_ppc64.go @@ -55,6 +55,16 @@ type Timex struct { _ [44]byte } +const ( + TIME_OK = 0x0 + TIME_INS = 0x1 + TIME_DEL = 0x2 + TIME_OOP = 0x3 + TIME_WAIT = 0x4 + TIME_ERROR = 0x5 + TIME_BAD = 0x5 +) + type Time_t int64 type Tms struct { diff --git a/unix/ztypes_linux_ppc64le.go b/unix/ztypes_linux_ppc64le.go index 1f431b6f..82a35862 100644 --- a/unix/ztypes_linux_ppc64le.go +++ b/unix/ztypes_linux_ppc64le.go @@ -55,6 +55,16 @@ type Timex struct { _ [44]byte } +const ( + TIME_OK = 0x0 + TIME_INS = 0x1 + TIME_DEL = 0x2 + TIME_OOP = 0x3 + TIME_WAIT = 0x4 + TIME_ERROR = 0x5 + TIME_BAD = 0x5 +) + type Time_t int64 type Tms struct { diff --git a/unix/ztypes_linux_riscv64.go b/unix/ztypes_linux_riscv64.go index 81a5dc14..826523f9 100644 --- a/unix/ztypes_linux_riscv64.go +++ b/unix/ztypes_linux_riscv64.go @@ -55,6 +55,16 @@ type Timex struct { _ [44]byte } +const ( + TIME_OK = 0x0 + TIME_INS = 0x1 + TIME_DEL = 0x2 + TIME_OOP = 0x3 + TIME_WAIT = 0x4 + TIME_ERROR = 0x5 + TIME_BAD = 0x5 +) + type Time_t int64 type Tms struct { diff --git a/unix/ztypes_linux_s390x.go b/unix/ztypes_linux_s390x.go index ae765d47..a715285b 100644 --- a/unix/ztypes_linux_s390x.go +++ b/unix/ztypes_linux_s390x.go @@ -55,6 +55,16 @@ type Timex struct { _ [44]byte } +const ( + TIME_OK = 0x0 + TIME_INS = 0x1 + TIME_DEL = 0x2 + TIME_OOP = 0x3 + TIME_WAIT = 0x4 + TIME_ERROR = 0x5 + TIME_BAD = 0x5 +) + type Time_t int64 type Tms struct { diff --git a/unix/ztypes_linux_sparc64.go b/unix/ztypes_linux_sparc64.go index 63685ca8..1755c0c2 100644 --- a/unix/ztypes_linux_sparc64.go +++ b/unix/ztypes_linux_sparc64.go @@ -56,6 +56,16 @@ type Timex struct { _ [44]byte } +const ( + TIME_OK = 0x0 + TIME_INS = 0x1 + TIME_DEL = 0x2 + TIME_OOP = 0x3 + TIME_WAIT = 0x4 + TIME_ERROR = 0x5 + TIME_BAD = 0x5 +) + type Time_t int64 type Tms struct {