aboutsummaryrefslogtreecommitdiff
path: root/linux-user/syscall.c
diff options
context:
space:
mode:
authorCameron Esfahani <dirty@apple.com>2022-01-27 16:12:51 -0800
committerLaurent Vivier <laurent@vivier.eu>2022-01-28 11:08:54 +0100
commiteb33cdaeda55d951f915152ad23816d47aca9955 (patch)
tree80047456f49e6a26144043469bde7df9163217b8 /linux-user/syscall.c
parentebce1719ac0a2a71b64742ecf1c9ec2497a65a55 (diff)
linux-user: Implement starttime field in self stat emulation
Instead of always returning 0, return actual starttime. Signed-off-by: Cameron Esfahani <dirty@apple.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20220128001251.45165-1-dirty@apple.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r--linux-user/syscall.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 84cfa223df..b3948d13a9 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -8077,6 +8077,9 @@ static int open_self_stat(void *cpu_env, int fd)
} else if (i == 3) {
/* ppid */
g_string_printf(buf, FMT_pid " ", getppid());
+ } else if (i == 21) {
+ /* starttime */
+ g_string_printf(buf, "%" PRIu64 " ", ts->start_boottime);
} else if (i == 27) {
/* stack bottom */
g_string_printf(buf, TARGET_ABI_FMT_ld " ", ts->info->start_stack);