Skip to content

Commit 6187219

Browse files
committed
add st_mode convert for h2t_stat64
1 parent b348da6 commit 6187219

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

darwin-user/syscall.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7323,6 +7323,8 @@ static inline abi_long host_to_target_stat64(void *cpu_env,
73237323
#else
73247324
struct target_stat *target_st;
73257325
#endif
7326+
int cnvt_st_mode = host_to_target_bitmask(host_st->st_mode, st_mode_tlb);
7327+
73267328

73277329
if (!lock_user_struct(VERIFY_WRITE, target_st, target_addr, 0))
73287330
return -TARGET_EFAULT;
@@ -7332,7 +7334,7 @@ static inline abi_long host_to_target_stat64(void *cpu_env,
73327334
#ifdef TARGET_STAT64_HAS_BROKEN_ST_INO
73337335
__put_user(host_st->st_ino, &target_st->__st_ino);
73347336
#endif
7335-
__put_user(host_st->st_mode, &target_st->st_mode);
7337+
__put_user(cnvt_st_mode, &target_st->st_mode);
73367338
__put_user(host_st->st_nlink, &target_st->st_nlink);
73377339
__put_user(host_st->st_uid, &target_st->st_uid);
73387340
__put_user(host_st->st_gid, &target_st->st_gid);

0 commit comments

Comments
 (0)