]> granicus.if.org Git - strace/commitdiff
xlat/sock_rds_options.in: make it sorted
authorEugene Syromyatnikov <evgsyr@gmail.com>
Wed, 9 May 2018 12:04:43 +0000 (14:04 +0200)
committerDmitry V. Levin <ldv@altlinux.org>
Sat, 19 May 2018 09:15:27 +0000 (09:15 +0000)
Define SO_TIMESTAMP twice, for PA-RISC and all the other architectures.

* xlat/sock_rds_options.in [!__hppa__] (SO_TIMESTAMP): Define to 29.
[__hppa__] (SO_TIMESTAMP): Define to 0x4012.
* net.c (print_sockopt_fd_level_name) <case SOL_RDS>: Use
printxval_search instead of printxval.

net.c
xlat/sock_rds_options.in

diff --git a/net.c b/net.c
index 4108314d66c651c1707867fec9fbcaace0e5236d..8c71efa96507e671e35de71eb8ebf760081a760a 100644 (file)
--- a/net.c
+++ b/net.c
@@ -528,7 +528,7 @@ print_sockopt_fd_level_name(struct tcb *tcp, int fd, unsigned int level,
                printxval(sock_pnp_options, name, "PNPIPE_???");
                break;
        case SOL_RDS:
-               printxval(sock_rds_options, name, "RDS_???");
+               printxval_search(sock_rds_options, name, "RDS_???");
                break;
        case SOL_IUCV:
                printxval(sock_iucv_options, name, "SO_???");
index 806fd46f25c36802d6dfe54562b5b2b0ad7cc33e..776d64a79636c209837ad3df147afa95c6e08f92 100644 (file)
@@ -8,8 +8,9 @@ RDS_GET_MR_FOR_DEST     7
 SO_RDS_TRANSPORT       8
 SO_RDS_MSG_RXPATH_LATENCY      10
 
-/* It's 29 except for hppa where it's 0x4012, so we can't even simply assume that the xlat is sorted */
-SO_TIMESTAMP
+#ifndef __hppa__
+SO_TIMESTAMP           29
+#endif
 
 RDS_INFO_COUNTERS              10000
 RDS_INFO_CONNECTIONS           10001
@@ -22,3 +23,7 @@ RDS_INFO_TCP_SOCKETS          10007
 RDS_INFO_IB_CONNECTIONS                10008
 RDS_INFO_CONNECTION_STATS      10009
 RDS_INFO_IWARP_CONNECTIONS     10010
+
+#ifdef __hppa__
+SO_TIMESTAMP           0x4012
+#endif