From: Dmitry V. Levin Date: Sun, 5 Aug 2018 18:57:25 +0000 (+0000) Subject: xlat: regenerate sock_options.in X-Git-Tag: v4.24~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f22adb0c7c2cae50ad02858bfc2f2adc0f1c8692;p=strace xlat: regenerate sock_options.in * xlat/sock_options.in: Regenerate using maint/gen_xlat_defs.sh script. * xlat/sock_options.sh: Remove. --- diff --git a/xlat/sock_options.in b/xlat/sock_options.in index 6104f4a0..2d2d4390 100644 --- a/xlat/sock_options.in +++ b/xlat/sock_options.in @@ -1,445 +1,447 @@ -SO_DEBUG 1 +/* Generated by maint/gen_xlat_defs.sh -f 'u' -p 'SO_' -c 'asm-generic/socket.h' -a 'asm/socket.h' */ + +SO_DEBUG 1 #if defined __alpha__ || defined __hppa__ || defined __mips__ || defined __sparc__ -SO_REUSEADDR 4 +SO_REUSEADDR 4 #else -SO_REUSEADDR 2 +SO_REUSEADDR 2 #endif #if defined __alpha__ || defined __hppa__ || defined __mips__ || defined __sparc__ -SO_TYPE 4104 +SO_TYPE 4104 #else -SO_TYPE 3 +SO_TYPE 3 #endif #if defined __alpha__ || defined __hppa__ || defined __mips__ || defined __sparc__ -SO_ERROR 4103 +SO_ERROR 4103 #else -SO_ERROR 4 +SO_ERROR 4 #endif #if defined __alpha__ || defined __hppa__ || defined __mips__ || defined __sparc__ -SO_DONTROUTE 16 +SO_DONTROUTE 16 #else -SO_DONTROUTE 5 +SO_DONTROUTE 5 #endif #if defined __alpha__ || defined __hppa__ || defined __mips__ || defined __sparc__ -SO_BROADCAST 32 +SO_BROADCAST 32 #else -SO_BROADCAST 6 +SO_BROADCAST 6 #endif #if defined __alpha__ || defined __hppa__ || defined __mips__ || defined __sparc__ -SO_SNDBUF 4097 +SO_SNDBUF 4097 #else -SO_SNDBUF 7 +SO_SNDBUF 7 #endif #if defined __alpha__ || defined __hppa__ || defined __mips__ || defined __sparc__ -SO_RCVBUF 4098 +SO_RCVBUF 4098 #else -SO_RCVBUF 8 +SO_RCVBUF 8 #endif #if defined __alpha__ || defined __hppa__ || defined __mips__ || defined __sparc__ -SO_KEEPALIVE 8 +SO_KEEPALIVE 8 #else -SO_KEEPALIVE 9 +SO_KEEPALIVE 9 #endif #if defined __alpha__ || defined __hppa__ || defined __mips__ || defined __sparc__ -SO_OOBINLINE 256 +SO_OOBINLINE 256 #else -SO_OOBINLINE 10 +SO_OOBINLINE 10 #endif #if defined __hppa__ -SO_NO_CHECK 16395 +SO_NO_CHECK 16395 #else -SO_NO_CHECK 11 +SO_NO_CHECK 11 #endif #if defined __hppa__ -SO_PRIORITY 16396 +SO_PRIORITY 16396 #else -SO_PRIORITY 12 +SO_PRIORITY 12 #endif #if defined __alpha__ || defined __hppa__ || defined __mips__ || defined __sparc__ -SO_LINGER 128 +SO_LINGER 128 #else -SO_LINGER 13 +SO_LINGER 13 #endif #if defined __sparc__ -SO_BSDCOMPAT 1024 +SO_BSDCOMPAT 1024 #elif defined __hppa__ -SO_BSDCOMPAT 16398 +SO_BSDCOMPAT 16398 #else -SO_BSDCOMPAT 14 +SO_BSDCOMPAT 14 #endif #if defined __alpha__ || defined __hppa__ || defined __mips__ || defined __sparc__ -SO_REUSEPORT 512 +SO_REUSEPORT 512 #else -SO_REUSEPORT 15 +SO_REUSEPORT 15 #endif #if defined __sparc__ -SO_PASSCRED 2 +SO_PASSCRED 2 #elif defined __alpha__ || defined __mips__ -SO_PASSCRED 17 +SO_PASSCRED 17 #elif defined __powerpc__ -SO_PASSCRED 20 +SO_PASSCRED 20 #elif defined __hppa__ -SO_PASSCRED 16400 +SO_PASSCRED 16400 #else -SO_PASSCRED 16 +SO_PASSCRED 16 #endif #if defined __alpha__ || defined __mips__ -SO_PEERCRED 18 +SO_PEERCRED 18 #elif defined __powerpc__ -SO_PEERCRED 21 +SO_PEERCRED 21 #elif defined __sparc__ -SO_PEERCRED 64 +SO_PEERCRED 64 #elif defined __hppa__ -SO_PEERCRED 16401 +SO_PEERCRED 16401 #else -SO_PEERCRED 17 +SO_PEERCRED 17 #endif #if defined __powerpc__ -SO_RCVLOWAT 16 +SO_RCVLOWAT 16 #elif defined __sparc__ -SO_RCVLOWAT 2048 +SO_RCVLOWAT 2048 #elif defined __hppa__ || defined __mips__ -SO_RCVLOWAT 4100 +SO_RCVLOWAT 4100 #elif defined __alpha__ -SO_RCVLOWAT 4112 +SO_RCVLOWAT 4112 #else -SO_RCVLOWAT 18 +SO_RCVLOWAT 18 #endif #if defined __powerpc__ -SO_SNDLOWAT 17 +SO_SNDLOWAT 17 #elif defined __sparc__ -SO_SNDLOWAT 4096 +SO_SNDLOWAT 4096 #elif defined __hppa__ || defined __mips__ -SO_SNDLOWAT 4099 +SO_SNDLOWAT 4099 #elif defined __alpha__ -SO_SNDLOWAT 4113 +SO_SNDLOWAT 4113 #else -SO_SNDLOWAT 19 +SO_SNDLOWAT 19 #endif #if defined __powerpc__ -SO_RCVTIMEO 18 +SO_RCVTIMEO 18 #elif defined __hppa__ || defined __mips__ -SO_RCVTIMEO 4102 +SO_RCVTIMEO 4102 #elif defined __alpha__ -SO_RCVTIMEO 4114 +SO_RCVTIMEO 4114 #elif defined __sparc__ -SO_RCVTIMEO 8192 +SO_RCVTIMEO 8192 #else -SO_RCVTIMEO 20 +SO_RCVTIMEO 20 #endif #if defined __powerpc__ -SO_SNDTIMEO 19 +SO_SNDTIMEO 19 #elif defined __hppa__ || defined __mips__ -SO_SNDTIMEO 4101 +SO_SNDTIMEO 4101 #elif defined __alpha__ -SO_SNDTIMEO 4115 +SO_SNDTIMEO 4115 #elif defined __sparc__ -SO_SNDTIMEO 16384 +SO_SNDTIMEO 16384 #else -SO_SNDTIMEO 21 +SO_SNDTIMEO 21 #endif #if defined __alpha__ -SO_SECURITY_AUTHENTICATION 19 +SO_SECURITY_AUTHENTICATION 19 #elif defined __hppa__ -SO_SECURITY_AUTHENTICATION 16406 +SO_SECURITY_AUTHENTICATION 16406 #elif defined __sparc__ -SO_SECURITY_AUTHENTICATION 20481 +SO_SECURITY_AUTHENTICATION 20481 #else -SO_SECURITY_AUTHENTICATION 22 +SO_SECURITY_AUTHENTICATION 22 #endif #if defined __alpha__ -SO_SECURITY_ENCRYPTION_TRANSPORT 20 +SO_SECURITY_ENCRYPTION_TRANSPORT 20 #elif defined __hppa__ -SO_SECURITY_ENCRYPTION_TRANSPORT 16407 +SO_SECURITY_ENCRYPTION_TRANSPORT 16407 #elif defined __sparc__ -SO_SECURITY_ENCRYPTION_TRANSPORT 20482 +SO_SECURITY_ENCRYPTION_TRANSPORT 20482 #else -SO_SECURITY_ENCRYPTION_TRANSPORT 23 +SO_SECURITY_ENCRYPTION_TRANSPORT 23 #endif #if defined __alpha__ -SO_SECURITY_ENCRYPTION_NETWORK 21 +SO_SECURITY_ENCRYPTION_NETWORK 21 #elif defined __hppa__ -SO_SECURITY_ENCRYPTION_NETWORK 16408 +SO_SECURITY_ENCRYPTION_NETWORK 16408 #elif defined __sparc__ -SO_SECURITY_ENCRYPTION_NETWORK 20484 +SO_SECURITY_ENCRYPTION_NETWORK 20484 #else -SO_SECURITY_ENCRYPTION_NETWORK 24 +SO_SECURITY_ENCRYPTION_NETWORK 24 #endif #if defined __sparc__ -SO_BINDTODEVICE 13 +SO_BINDTODEVICE 13 #elif defined __hppa__ -SO_BINDTODEVICE 16409 +SO_BINDTODEVICE 16409 #else -SO_BINDTODEVICE 25 +SO_BINDTODEVICE 25 #endif #if defined __hppa__ -SO_DETACH_FILTER 16411 +SO_DETACH_FILTER 16411 #else -SO_DETACH_FILTER 27 +SO_DETACH_FILTER 27 #endif #if defined __hppa__ -SO_PEERNAME 8192 +SO_PEERNAME 8192 #else -SO_PEERNAME 28 +SO_PEERNAME 28 #endif #if defined __hppa__ -SO_TIMESTAMP 16402 +SO_TIMESTAMP 16402 #else -SO_TIMESTAMP 29 +SO_TIMESTAMP 29 #endif #if defined __mips__ -SO_ACCEPTCONN 4105 +SO_ACCEPTCONN 4105 #elif defined __alpha__ -SO_ACCEPTCONN 4116 +SO_ACCEPTCONN 4116 #elif defined __hppa__ -SO_ACCEPTCONN 16412 +SO_ACCEPTCONN 16412 #elif defined __sparc__ -SO_ACCEPTCONN 32768 +SO_ACCEPTCONN 32768 #else -SO_ACCEPTCONN 30 +SO_ACCEPTCONN 30 #endif #if defined __alpha__ || defined __mips__ || defined __sparc__ -SO_PEERSEC 30 +SO_PEERSEC 30 #elif defined __hppa__ -SO_PEERSEC 16413 +SO_PEERSEC 16413 #else -SO_PEERSEC 31 +SO_PEERSEC 31 #endif #if defined __mips__ -SO_SNDBUFFORCE 31 +SO_SNDBUFFORCE 31 #elif defined __alpha__ || defined __hppa__ || defined __sparc__ -SO_SNDBUFFORCE 4106 +SO_SNDBUFFORCE 4106 #else -SO_SNDBUFFORCE 32 +SO_SNDBUFFORCE 32 #endif #if defined __alpha__ || defined __hppa__ || defined __sparc__ -SO_RCVBUFFORCE 4107 +SO_RCVBUFFORCE 4107 #else -SO_RCVBUFFORCE 33 +SO_RCVBUFFORCE 33 #endif #if defined __sparc__ -SO_PASSSEC 31 +SO_PASSSEC 31 #elif defined __hppa__ -SO_PASSSEC 16414 +SO_PASSSEC 16414 #else -SO_PASSSEC 34 +SO_PASSSEC 34 #endif #if defined __sparc__ -SO_TIMESTAMPNS 33 +SO_TIMESTAMPNS 33 #elif defined __hppa__ -SO_TIMESTAMPNS 16403 +SO_TIMESTAMPNS 16403 #else -SO_TIMESTAMPNS 35 +SO_TIMESTAMPNS 35 #endif #if defined __sparc__ -SO_MARK 34 +SO_MARK 34 #elif defined __hppa__ -SO_MARK 16415 +SO_MARK 16415 #else -SO_MARK 36 +SO_MARK 36 #endif #if defined __sparc__ -SO_TIMESTAMPING 35 +SO_TIMESTAMPING 35 #elif defined __hppa__ -SO_TIMESTAMPING 16416 +SO_TIMESTAMPING 16416 #else -SO_TIMESTAMPING 37 +SO_TIMESTAMPING 37 #endif #if defined __alpha__ || defined __hppa__ || defined __mips__ || defined __sparc__ -SO_PROTOCOL 4136 +SO_PROTOCOL 4136 #else -SO_PROTOCOL 38 +SO_PROTOCOL 38 #endif #if defined __alpha__ || defined __hppa__ || defined __mips__ || defined __sparc__ -SO_DOMAIN 4137 +SO_DOMAIN 4137 #else -SO_DOMAIN 39 +SO_DOMAIN 39 #endif #if defined __sparc__ -SO_RXQ_OVFL 36 +SO_RXQ_OVFL 36 #elif defined __hppa__ -SO_RXQ_OVFL 16417 +SO_RXQ_OVFL 16417 #else -SO_RXQ_OVFL 40 +SO_RXQ_OVFL 40 #endif #if defined __sparc__ -SO_WIFI_STATUS 37 +SO_WIFI_STATUS 37 #elif defined __hppa__ -SO_WIFI_STATUS 16418 +SO_WIFI_STATUS 16418 #else -SO_WIFI_STATUS 41 +SO_WIFI_STATUS 41 #endif #if defined __sparc__ -SO_PEEK_OFF 38 +SO_PEEK_OFF 38 #elif defined __hppa__ -SO_PEEK_OFF 16419 +SO_PEEK_OFF 16419 #else -SO_PEEK_OFF 42 +SO_PEEK_OFF 42 #endif #if defined __sparc__ -SO_NOFCS 39 +SO_NOFCS 39 #elif defined __hppa__ -SO_NOFCS 16420 +SO_NOFCS 16420 #else -SO_NOFCS 43 +SO_NOFCS 43 #endif #if defined __sparc__ -SO_LOCK_FILTER 40 +SO_LOCK_FILTER 40 #elif defined __hppa__ -SO_LOCK_FILTER 16421 +SO_LOCK_FILTER 16421 #else -SO_LOCK_FILTER 44 +SO_LOCK_FILTER 44 #endif #if defined __sparc__ -SO_SELECT_ERR_QUEUE 41 +SO_SELECT_ERR_QUEUE 41 #elif defined __hppa__ -SO_SELECT_ERR_QUEUE 16422 +SO_SELECT_ERR_QUEUE 16422 #else -SO_SELECT_ERR_QUEUE 45 +SO_SELECT_ERR_QUEUE 45 #endif #if defined __sparc__ -SO_BUSY_POLL 48 +SO_BUSY_POLL 48 #elif defined __hppa__ -SO_BUSY_POLL 16423 +SO_BUSY_POLL 16423 #else -SO_BUSY_POLL 46 +SO_BUSY_POLL 46 #endif #if defined __sparc__ -SO_MAX_PACING_RATE 49 +SO_MAX_PACING_RATE 49 #elif defined __hppa__ -SO_MAX_PACING_RATE 16424 +SO_MAX_PACING_RATE 16424 #else -SO_MAX_PACING_RATE 47 +SO_MAX_PACING_RATE 47 #endif #if defined __sparc__ -SO_BPF_EXTENSIONS 50 +SO_BPF_EXTENSIONS 50 #elif defined __hppa__ -SO_BPF_EXTENSIONS 16425 +SO_BPF_EXTENSIONS 16425 #else -SO_BPF_EXTENSIONS 48 +SO_BPF_EXTENSIONS 48 #endif #if defined __sparc__ -SO_INCOMING_CPU 51 +SO_INCOMING_CPU 51 #elif defined __hppa__ -SO_INCOMING_CPU 16426 +SO_INCOMING_CPU 16426 #else -SO_INCOMING_CPU 49 +SO_INCOMING_CPU 49 #endif #if defined __sparc__ -SO_ATTACH_BPF 52 +SO_ATTACH_BPF 52 #elif defined __hppa__ -SO_ATTACH_BPF 16427 +SO_ATTACH_BPF 16427 #else -SO_ATTACH_BPF 50 +SO_ATTACH_BPF 50 #endif #if defined __sparc__ -SO_ATTACH_REUSEPORT_CBPF 53 +SO_ATTACH_REUSEPORT_CBPF 53 #elif defined __hppa__ -SO_ATTACH_REUSEPORT_CBPF 16428 +SO_ATTACH_REUSEPORT_CBPF 16428 #else -SO_ATTACH_REUSEPORT_CBPF 51 +SO_ATTACH_REUSEPORT_CBPF 51 #endif #if defined __sparc__ -SO_ATTACH_REUSEPORT_EBPF 54 +SO_ATTACH_REUSEPORT_EBPF 54 #elif defined __hppa__ -SO_ATTACH_REUSEPORT_EBPF 16429 +SO_ATTACH_REUSEPORT_EBPF 16429 #else -SO_ATTACH_REUSEPORT_EBPF 52 +SO_ATTACH_REUSEPORT_EBPF 52 #endif #if defined __sparc__ -SO_CNX_ADVICE 55 +SO_CNX_ADVICE 55 #elif defined __hppa__ -SO_CNX_ADVICE 16430 +SO_CNX_ADVICE 16430 #else -SO_CNX_ADVICE 53 +SO_CNX_ADVICE 53 #endif #if defined __sparc__ -SO_MEMINFO 57 +SO_MEMINFO 57 #elif defined __hppa__ -SO_MEMINFO 16432 +SO_MEMINFO 16432 #else -SO_MEMINFO 55 +SO_MEMINFO 55 #endif #if defined __sparc__ -SO_INCOMING_NAPI_ID 58 +SO_INCOMING_NAPI_ID 58 #elif defined __hppa__ -SO_INCOMING_NAPI_ID 16433 +SO_INCOMING_NAPI_ID 16433 #else -SO_INCOMING_NAPI_ID 56 +SO_INCOMING_NAPI_ID 56 #endif #if defined __sparc__ -SO_COOKIE 59 +SO_COOKIE 59 #elif defined __hppa__ -SO_COOKIE 16434 +SO_COOKIE 16434 #else -SO_COOKIE 57 +SO_COOKIE 57 #endif #if defined __sparc__ -SO_PEERGROUPS 61 +SO_PEERGROUPS 61 #elif defined __hppa__ -SO_PEERGROUPS 16436 +SO_PEERGROUPS 16436 #else -SO_PEERGROUPS 59 +SO_PEERGROUPS 59 #endif #if defined __sparc__ -SO_ZEROCOPY 62 +SO_ZEROCOPY 62 #elif defined __hppa__ -SO_ZEROCOPY 16437 +SO_ZEROCOPY 16437 #else -SO_ZEROCOPY 60 +SO_ZEROCOPY 60 #endif diff --git a/xlat/sock_options.sh b/xlat/sock_options.sh deleted file mode 100755 index 948a4fc3..00000000 --- a/xlat/sock_options.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/sh -eu -# -# Copyright (c) 2018 The strace developers. -# All rights reserved. -# -# Generate fallback definitions of SO_* constants in xlat/sock_options.in file. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. 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. -# 3. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. - -linux="$1"; shift -in="${0%.sh}.in" - -sed -n 's/^\(SO_[^[:space:]]*\).*/\1/p' < "$in" | -uniq | -while read name; do - sed -rn 's/#define[[:space:]]+('"$name"')[[:space:]]+([[:digit:]]+)$/\2\t\1/p' \ - "$linux"/include/uapi/asm-generic/socket.h -done | -sort -n | -while read def name; do - grep -EH '#define[[:space:]]+'"$name"'[[:space:]]+(0x[[:xdigit:]]+|[[:digit:]]+)' \ - "$linux"/arch/*/include/uapi/asm/socket.h | - sed -rn 's|^[^#]*/arch/([^/]+)/include/uapi/asm/socket\.h:#define[[:space:]]+'"$name"'[[:space:]]+([^[:space:]]+)([[:space:]].*)?$|\1\t\2|p' | - sed s/parisc/hppa/ |sort | - awk -vname="$name" -vdef="$def" ' -{ - i = strtonum($2) - if (i == def) next - if (a[i]) - a[i] = a[i] " || defined __" $1 "__" - else - a[i] = "defined __" $1 "__" -} -END { - iftext = "#if" - for (i in a) { - printf("%s %s\n%s %u\n", iftext, a[i], name, i) - iftext = "#elif" - } - if (iftext != "#if") - print "#else" - printf("%s %s\n", name, def) - if (iftext != "#if") - print "#endif" - print "" -} - ' -done