From: Eugene Syromyatnikov Date: Wed, 9 May 2018 12:04:43 +0000 (+0200) Subject: xlat/sock_rds_options.in: make it sorted X-Git-Tag: v4.23~147 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2604ea997b31d12358f93e00f656ddd04afd4b25;p=strace xlat/sock_rds_options.in: make it sorted 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) : Use printxval_search instead of printxval. --- diff --git a/net.c b/net.c index 4108314d..8c71efa9 100644 --- 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_???"); diff --git a/xlat/sock_rds_options.in b/xlat/sock_rds_options.in index 806fd46f..776d64a7 100644 --- a/xlat/sock_rds_options.in +++ b/xlat/sock_rds_options.in @@ -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