From 4e6760a101f91a504f519f184f6c860395889426 Mon Sep 17 00:00:00 2001 From: Dmytro Shynkevych Date: Sun, 27 Feb 2022 22:40:16 +0000 Subject: [PATCH] unix: add SPEED_UNKNOWN The rest of the SPEED_* constants are redundant: SPEED_x is defined to simply x for x in 10, 100, ... Change-Id: I8b29a90ea1b914a65fa165a6801fcf77c667ebb0 GitHub-Last-Rev: 1428dcc5176f46ecedbc4e52c3bc691bbd84eb72 GitHub-Pull-Request: golang/sys#119 Reviewed-on: https://go-review.googlesource.com/c/sys/+/388214 Trust: Brad Fitzpatrick Reviewed-by: Matt Layher Trust: Matt Layher Run-TryBot: Matt Layher TryBot-Result: Gopher Robot --- unix/linux/types.go | 2 ++ unix/ztypes_linux.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/unix/linux/types.go b/unix/linux/types.go index afbfae7b..9063349b 100644 --- a/unix/linux/types.go +++ b/unix/linux/types.go @@ -3755,6 +3755,8 @@ const ( ETHTOOL_A_TUNNEL_INFO_MAX = C.ETHTOOL_A_TUNNEL_INFO_MAX ) +const SPEED_UNKNOWN = C.SPEED_UNKNOWN + type EthtoolDrvinfo C.struct_ethtool_drvinfo type ( diff --git a/unix/ztypes_linux.go b/unix/ztypes_linux.go index e6a8d88c..cbf32f71 100644 --- a/unix/ztypes_linux.go +++ b/unix/ztypes_linux.go @@ -3771,6 +3771,8 @@ const ( ETHTOOL_A_TUNNEL_INFO_MAX = 0x2 ) +const SPEED_UNKNOWN = -0x1 + type EthtoolDrvinfo struct { Cmd uint32 Driver [32]byte