Skip to content

Commit

Permalink
linux-user: fix translation of statx structures
Browse files Browse the repository at this point in the history
All timestamps were copied to atime instead of to their respective
fields.

Fixes: efa9218 ("linux-user: Add support for translation of statx() syscall")
Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20191122174040.569252-1-ariadne@dereferenced.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
  • Loading branch information
kaniini authored and vivier committed Nov 25, 2019
1 parent 2061735 commit d1e2670
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions linux-user/syscall.c
Expand Up @@ -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);
Expand Down

0 comments on commit d1e2670

Please sign in to comment.