[PATCH v5 04/12] timespec32: Rename to old_timespec32
Alistair Francis
alistair.francis at wdc.com
Thu Mar 12 17:55:15 UTC 2020
The Linux kernel calls the 32-bit timespec struct old_timespec32, so
let's rename it to be clear. This avoids confusing with the about to be
added kernel_old_timespec_t which will also be 32-bit on 32-bit systems.
Signed-off-by: Alistair Francis <alistair.francis at wdc.com>
---
aio.c | 4 ++--
defs.h | 10 +++++-----
desc.c | 2 +-
futex.c | 2 +-
ipc_sem.c | 2 +-
kernel_timespec.h | 2 +-
mmsghdr.c | 2 +-
mq.c | 4 ++--
poll.c | 4 ++--
print_timespec.c | 6 +++---
print_timespec32.c | 12 ++++++------
sched.c | 2 +-
signal.c | 2 +-
time.c | 8 ++++----
utimes.c | 2 +-
15 files changed, 32 insertions(+), 32 deletions(-)
diff --git a/aio.c b/aio.c
index 45b1da88..61e0ff26 100644
--- a/aio.c
+++ b/aio.c
@@ -270,7 +270,7 @@ print_io_getevents(struct tcb *const tcp, const print_obj_by_addr_fn print_ts,
#if HAVE_ARCH_TIME32_SYSCALLS
SYS_FUNC(io_getevents_time32)
{
- return print_io_getevents(tcp, print_timespec32, false);
+ return print_io_getevents(tcp, print_old_timespec32, false);
}
#endif
@@ -284,7 +284,7 @@ SYS_FUNC(io_getevents_time64)
#if HAVE_ARCH_TIME32_SYSCALLS
SYS_FUNC(io_pgetevents_time32)
{
- return print_io_getevents(tcp, print_timespec32, true);
+ return print_io_getevents(tcp, print_old_timespec32, true);
}
#endif
diff --git a/defs.h b/defs.h
index 46b3fbb0..fa746c99 100644
--- a/defs.h
+++ b/defs.h
@@ -1285,13 +1285,13 @@ tprint_iov(struct tcb *tcp, kernel_ulong_t len, kernel_ulong_t addr,
}
# if HAVE_ARCH_TIME32_SYSCALLS
-extern bool print_timespec32_data_size(const void *arg, size_t size);
-extern bool print_timespec32_array_data_size(const void *arg,
+extern bool print_old_timespec32_data_size(const void *arg, size_t size);
+extern bool print_old_timespec32_array_data_size(const void *arg,
unsigned int nmemb,
size_t size);
-extern int print_timespec32(struct tcb *, kernel_ulong_t);
-extern const char *sprint_timespec32(struct tcb *, kernel_ulong_t);
-extern int print_timespec32_utime_pair(struct tcb *, kernel_ulong_t);
+extern int print_old_timespec32(struct tcb *, kernel_ulong_t);
+extern const char *sprint_old_timespec32(struct tcb *, kernel_ulong_t);
+extern int print_old_timespec32_utime_pair(struct tcb *, kernel_ulong_t);
extern int print_itimerspec32(struct tcb *, kernel_ulong_t);
extern int print_timex32(struct tcb *, kernel_ulong_t);
# endif /* HAVE_ARCH_TIME32_SYSCALLS */
diff --git a/desc.c b/desc.c
index 92e6fe16..f69d9aa5 100644
--- a/desc.c
+++ b/desc.c
@@ -248,7 +248,7 @@ do_pselect6(struct tcb *const tcp, const print_obj_by_addr_fn print_ts,
#if HAVE_ARCH_TIME32_SYSCALLS
SYS_FUNC(pselect6_time32)
{
- return do_pselect6(tcp, print_timespec32, sprint_timespec32);
+ return do_pselect6(tcp, print_old_timespec32, sprint_old_timespec32);
}
#endif
diff --git a/futex.c b/futex.c
index f59d96a1..36bb7bd0 100644
--- a/futex.c
+++ b/futex.c
@@ -126,7 +126,7 @@ do_futex(struct tcb *const tcp, const print_obj_by_addr_fn print_ts)
#if HAVE_ARCH_TIME32_SYSCALLS
SYS_FUNC(futex_time32)
{
- return do_futex(tcp, print_timespec32);
+ return do_futex(tcp, print_old_timespec32);
}
#endif
diff --git a/ipc_sem.c b/ipc_sem.c
index 2f1acdbc..5af20265 100644
--- a/ipc_sem.c
+++ b/ipc_sem.c
@@ -75,7 +75,7 @@ do_semtimedop(struct tcb *const tcp, const print_obj_by_addr_fn print_ts)
#if HAVE_ARCH_TIME32_SYSCALLS
SYS_FUNC(semtimedop_time32)
{
- return do_semtimedop(tcp, print_timespec32);
+ return do_semtimedop(tcp, print_old_timespec32);
}
#endif
diff --git a/kernel_timespec.h b/kernel_timespec.h
index 99fb2c6c..90133f8d 100644
--- a/kernel_timespec.h
+++ b/kernel_timespec.h
@@ -18,7 +18,7 @@ typedef struct {
typedef struct {
int tv_sec;
int tv_nsec;
-} kernel_timespec32_t;
+} kernel_old_timespec32_t;
# endif /* HAVE_ARCH_TIME32_SYSCALLS */
diff --git a/mmsghdr.c b/mmsghdr.c
index 3fede19f..40122730 100644
--- a/mmsghdr.c
+++ b/mmsghdr.c
@@ -228,7 +228,7 @@ do_recvmmsg(struct tcb *const tcp, const print_obj_by_addr_fn print_ts,
#if HAVE_ARCH_TIME32_SYSCALLS
SYS_FUNC(recvmmsg_time32)
{
- return do_recvmmsg(tcp, print_timespec32, sprint_timespec32);
+ return do_recvmmsg(tcp, print_old_timespec32, sprint_old_timespec32);
}
#endif
diff --git a/mq.c b/mq.c
index a8021a71..f7b83971 100644
--- a/mq.c
+++ b/mq.c
@@ -41,7 +41,7 @@ do_mq_timedsend(struct tcb *const tcp, const print_obj_by_addr_fn print_ts)
#if HAVE_ARCH_TIME32_SYSCALLS
SYS_FUNC(mq_timedsend_time32)
{
- return do_mq_timedsend(tcp, print_timespec32);
+ return do_mq_timedsend(tcp, print_old_timespec32);
}
#endif
@@ -79,7 +79,7 @@ do_mq_timedreceive(struct tcb *const tcp, const print_obj_by_addr_fn print_ts)
#if HAVE_ARCH_TIME32_SYSCALLS
SYS_FUNC(mq_timedreceive_time32)
{
- return do_mq_timedreceive(tcp, print_timespec32);
+ return do_mq_timedreceive(tcp, print_old_timespec32);
}
#endif
diff --git a/poll.c b/poll.c
index 3f06443a..e328aed9 100644
--- a/poll.c
+++ b/poll.c
@@ -151,7 +151,7 @@ do_poll(struct tcb *const tcp, const sprint_obj_by_addr_fn sprint_ts)
#if HAVE_ARCH_TIME32_SYSCALLS
SYS_FUNC(poll_time32)
{
- return do_poll(tcp, sprint_timespec32);
+ return do_poll(tcp, sprint_old_timespec32);
}
#endif
@@ -184,7 +184,7 @@ do_ppoll(struct tcb *const tcp, const print_obj_by_addr_fn print_ts,
#if HAVE_ARCH_TIME32_SYSCALLS
SYS_FUNC(ppoll_time32)
{
- return do_ppoll(tcp, print_timespec32, sprint_timespec32);
+ return do_ppoll(tcp, print_old_timespec32, sprint_old_timespec32);
}
#endif
diff --git a/print_timespec.c b/print_timespec.c
index 5b353cea..4df2a4f4 100644
--- a/print_timespec.c
+++ b/print_timespec.c
@@ -23,9 +23,9 @@
#endif
#if TIMESPEC_IS_32BIT
-typedef kernel_timespec32_t timespec_t;
-# define PRINT_TIMESPEC_DATA_SIZE print_timespec32_data_size
-# define PRINT_TIMESPEC_ARRAY_DATA_SIZE print_timespec32_array_data_size
+typedef kernel_old_timespec32_t timespec_t;
+# define PRINT_TIMESPEC_DATA_SIZE print_old_timespec32_data_size
+# define PRINT_TIMESPEC_ARRAY_DATA_SIZE print_old_timespec32_array_data_size
#else
typedef kernel_timespec64_t timespec_t;
# define PRINT_TIMESPEC_DATA_SIZE print_timespec64_data_size
diff --git a/print_timespec32.c b/print_timespec32.c
index f6a16bc9..e2e8bfb9 100644
--- a/print_timespec32.c
+++ b/print_timespec32.c
@@ -9,12 +9,12 @@
#if HAVE_ARCH_TIME32_SYSCALLS
-# define TIMESPEC_T kernel_timespec32_t
-# define PRINT_TIMESPEC_DATA_SIZE print_timespec32_data_size
-# define PRINT_TIMESPEC_ARRAY_DATA_SIZE print_timespec32_array_data_size
-# define PRINT_TIMESPEC print_timespec32
-# define SPRINT_TIMESPEC sprint_timespec32
-# define PRINT_TIMESPEC_UTIME_PAIR print_timespec32_utime_pair
+# define TIMESPEC_T kernel_old_timespec32_t
+# define PRINT_TIMESPEC_DATA_SIZE print_old_timespec32_data_size
+# define PRINT_TIMESPEC_ARRAY_DATA_SIZE print_old_timespec32_array_data_size
+# define PRINT_TIMESPEC print_old_timespec32
+# define SPRINT_TIMESPEC sprint_old_timespec32
+# define PRINT_TIMESPEC_UTIME_PAIR print_old_timespec32_utime_pair
# define PRINT_ITIMERSPEC print_itimerspec32
# include "kernel_timespec.h"
diff --git a/sched.c b/sched.c
index 417ff742..197ea834 100644
--- a/sched.c
+++ b/sched.c
@@ -79,7 +79,7 @@ do_sched_rr_get_interval(struct tcb *const tcp,
#if HAVE_ARCH_TIME32_SYSCALLS
SYS_FUNC(sched_rr_get_interval_time32)
{
- return do_sched_rr_get_interval(tcp, print_timespec32);
+ return do_sched_rr_get_interval(tcp, print_old_timespec32);
}
#endif
diff --git a/signal.c b/signal.c
index 3cb54bb3..8d34e442 100644
--- a/signal.c
+++ b/signal.c
@@ -683,7 +683,7 @@ do_rt_sigtimedwait(struct tcb *const tcp, const print_obj_by_addr_fn print_ts,
#if HAVE_ARCH_TIME32_SYSCALLS
SYS_FUNC(rt_sigtimedwait_time32)
{
- return do_rt_sigtimedwait(tcp, print_timespec32, sprint_timespec32);
+ return do_rt_sigtimedwait(tcp, print_old_timespec32, sprint_old_timespec32);
}
#endif
diff --git a/time.c b/time.c
index 19b06c40..3ae13b0c 100644
--- a/time.c
+++ b/time.c
@@ -97,7 +97,7 @@ do_nanosleep(struct tcb *const tcp, const print_obj_by_addr_fn print_ts)
#if HAVE_ARCH_TIME32_SYSCALLS
SYS_FUNC(nanosleep_time32)
{
- return do_nanosleep(tcp, print_timespec32);
+ return do_nanosleep(tcp, print_old_timespec32);
}
#endif
@@ -248,7 +248,7 @@ do_clock_settime(struct tcb *const tcp, const print_obj_by_addr_fn print_ts)
#if HAVE_ARCH_TIME32_SYSCALLS
SYS_FUNC(clock_settime32)
{
- return do_clock_settime(tcp, print_timespec32);
+ return do_clock_settime(tcp, print_old_timespec32);
}
#endif
@@ -272,7 +272,7 @@ do_clock_gettime(struct tcb *const tcp, const print_obj_by_addr_fn print_ts)
#if HAVE_ARCH_TIME32_SYSCALLS
SYS_FUNC(clock_gettime32)
{
- return do_clock_gettime(tcp, print_timespec32);
+ return do_clock_gettime(tcp, print_old_timespec32);
}
#endif
@@ -310,7 +310,7 @@ do_clock_nanosleep(struct tcb *const tcp, const print_obj_by_addr_fn print_ts)
#if HAVE_ARCH_TIME32_SYSCALLS
SYS_FUNC(clock_nanosleep_time32)
{
- return do_clock_nanosleep(tcp, print_timespec32);
+ return do_clock_nanosleep(tcp, print_old_timespec32);
}
#endif
diff --git a/utimes.c b/utimes.c
index d969133a..3950bd32 100644
--- a/utimes.c
+++ b/utimes.c
@@ -51,7 +51,7 @@ do_utimensat(struct tcb *const tcp, const print_obj_by_addr_fn print_ts)
#if HAVE_ARCH_TIME32_SYSCALLS
SYS_FUNC(utimensat_time32)
{
- return do_utimensat(tcp, print_timespec32_utime_pair);
+ return do_utimensat(tcp, print_old_timespec32_utime_pair);
}
#endif
--
2.25.1
More information about the Strace-devel
mailing list