[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 1/1] linux-user: fix translation of statx structures
From: |
Laurent Vivier |
Subject: |
[PULL 1/1] linux-user: fix translation of statx structures |
Date: |
Mon, 25 Nov 2019 17:30:14 +0100 |
From: Ariadne Conill <address@hidden>
All timestamps were copied to atime instead of to their respective
fields.
Fixes: efa921845c03 ("linux-user: Add support for translation of statx()
syscall")
Signed-off-by: Ariadne Conill <address@hidden>
Reviewed-by: Aleksandar Markovic <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>
---
linux-user/syscall.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index ce399a55f0db..171c0caef3a1 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -6743,12 +6743,12 @@ static inline abi_long host_to_target_statx(struct
target_statx *host_stx,
__put_user(host_stx->stx_attributes_mask,
&target_stx->stx_attributes_mask);
__put_user(host_stx->stx_atime.tv_sec, &target_stx->stx_atime.tv_sec);
__put_user(host_stx->stx_atime.tv_nsec, &target_stx->stx_atime.tv_nsec);
- __put_user(host_stx->stx_btime.tv_sec, &target_stx->stx_atime.tv_sec);
- __put_user(host_stx->stx_btime.tv_nsec, &target_stx->stx_atime.tv_nsec);
- __put_user(host_stx->stx_ctime.tv_sec, &target_stx->stx_atime.tv_sec);
- __put_user(host_stx->stx_ctime.tv_nsec, &target_stx->stx_atime.tv_nsec);
- __put_user(host_stx->stx_mtime.tv_sec, &target_stx->stx_atime.tv_sec);
- __put_user(host_stx->stx_mtime.tv_nsec, &target_stx->stx_atime.tv_nsec);
+ __put_user(host_stx->stx_btime.tv_sec, &target_stx->stx_btime.tv_sec);
+ __put_user(host_stx->stx_btime.tv_nsec, &target_stx->stx_btime.tv_nsec);
+ __put_user(host_stx->stx_ctime.tv_sec, &target_stx->stx_ctime.tv_sec);
+ __put_user(host_stx->stx_ctime.tv_nsec, &target_stx->stx_ctime.tv_nsec);
+ __put_user(host_stx->stx_mtime.tv_sec, &target_stx->stx_mtime.tv_sec);
+ __put_user(host_stx->stx_mtime.tv_nsec, &target_stx->stx_mtime.tv_nsec);
__put_user(host_stx->stx_rdev_major, &target_stx->stx_rdev_major);
__put_user(host_stx->stx_rdev_minor, &target_stx->stx_rdev_minor);
__put_user(host_stx->stx_dev_major, &target_stx->stx_dev_major);
--
2.21.0