diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2017-08-09 11:42:54 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2017-08-09 11:42:54 +0200 |
| commit | 0a26880b8d9264c06eb7e62d9b26ef5e98fe9475 (patch) | |
| tree | 7bcd2fa47af6c8cde1ba1ae5ceccc63e145b3ad7 | |
| parent | a5c7c2c4bd608ab010a2494161da800f305a9ca5 (diff) | |
sys: fix typo in ETHTOOLGCHANNELS const and diagnose such cases
| -rw-r--r-- | sys/socket.txt | 2 | ||||
| -rw-r--r-- | sys/socket_amd64.const | 1 | ||||
| -rw-r--r-- | sys/socket_arm64.const | 1 | ||||
| -rw-r--r-- | sys/socket_ppc64le.const | 1 | ||||
| -rw-r--r-- | sys/syz-sysgen/sysgen.go | 8 |
5 files changed, 12 insertions, 1 deletions
diff --git a/sys/socket.txt b/sys/socket.txt index bd90ca759..47f0b0189 100644 --- a/sys/socket.txt +++ b/sys/socket.txt @@ -584,7 +584,7 @@ ethtool_ringparam { tx_pending int32 } -ethtool_channels_cmd_flags = ETHTOOLGCHANNELS, ETHTOOL_SCHANNELS +ethtool_channels_cmd_flags = ETHTOOL_GCHANNELS, ETHTOOL_SCHANNELS ethtool_channels { cmd flags[ethtool_channels_cmd_flags, int32] max_rx int32 diff --git a/sys/socket_amd64.const b/sys/socket_amd64.const index 0f6e3aa0e..bd1ed2626 100644 --- a/sys/socket_amd64.const +++ b/sys/socket_amd64.const @@ -25,6 +25,7 @@ ETHTOOL_EROMVERS_LEN = 32 ETHTOOL_FLASHDEV = 51 ETHTOOL_FLASH_MAX_FILENAME = 128 ETHTOOL_FWVERS_LEN = 32 +ETHTOOL_GCHANNELS = 60 ETHTOOL_GCOALESCE = 14 ETHTOOL_GDRVINFO = 3 ETHTOOL_GEEE = 68 diff --git a/sys/socket_arm64.const b/sys/socket_arm64.const index eabfbc81c..883e210ad 100644 --- a/sys/socket_arm64.const +++ b/sys/socket_arm64.const @@ -25,6 +25,7 @@ ETHTOOL_EROMVERS_LEN = 32 ETHTOOL_FLASHDEV = 51 ETHTOOL_FLASH_MAX_FILENAME = 128 ETHTOOL_FWVERS_LEN = 32 +ETHTOOL_GCHANNELS = 60 ETHTOOL_GCOALESCE = 14 ETHTOOL_GDRVINFO = 3 ETHTOOL_GEEE = 68 diff --git a/sys/socket_ppc64le.const b/sys/socket_ppc64le.const index e5aa20458..5c27956ec 100644 --- a/sys/socket_ppc64le.const +++ b/sys/socket_ppc64le.const @@ -25,6 +25,7 @@ ETHTOOL_EROMVERS_LEN = 32 ETHTOOL_FLASHDEV = 51 ETHTOOL_FLASH_MAX_FILENAME = 128 ETHTOOL_FWVERS_LEN = 32 +ETHTOOL_GCHANNELS = 60 ETHTOOL_GCOALESCE = 14 ETHTOOL_GDRVINFO = 3 ETHTOOL_GEEE = 68 diff --git a/sys/syz-sysgen/sysgen.go b/sys/syz-sysgen/sysgen.go index c1a6caf27..903361af6 100644 --- a/sys/syz-sysgen/sysgen.go +++ b/sys/syz-sysgen/sysgen.go @@ -55,6 +55,7 @@ func main() { logf(1, "Parse system call descriptions") desc := Parse(r) + unsupportedFlags := make(map[string]int) consts := make(map[string]map[string]uint64) for _, arch := range archs { logf(0, "generating %v...", arch.Name) @@ -71,6 +72,7 @@ func main() { } else { if !unsupported[val] { unsupported[val] = true + unsupportedFlags[val]++ logf(0, "unsupported flag: %v", val) } } @@ -91,6 +93,12 @@ func main() { logf(0, "") } + for flag, count := range unsupportedFlags { + if count == len(archs) { + failf("flag %v is unsupported on all arches (typo?)", flag) + } + } + generateExecutorSyscalls(desc.Syscalls, consts) if *flagMemProfile != "" { |
