From eb33cdaeda55d951f915152ad23816d47aca9955 Mon Sep 17 00:00:00 2001 From: Cameron Esfahani Date: Thu, 27 Jan 2022 16:12:51 -0800 Subject: linux-user: Implement starttime field in self stat emulation Instead of always returning 0, return actual starttime. Signed-off-by: Cameron Esfahani Reviewed-by: Laurent Vivier Message-Id: <20220128001251.45165-1-dirty@apple.com> Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'linux-user/syscall.c') 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); -- cgit v1.2.3