diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2003-03-24 23:12:16 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2003-03-24 23:12:16 +0000 |
commit | 8083a3e50895abb6070d9f339363d05d2c5e0017 (patch) | |
tree | 9a1915b2df7338d074c5615f6e6415136bb5581f /linux-user | |
parent | 644c433cb3759599aa1440b412964f8e49cc0b71 (diff) |
dirent fixes
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@48 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user')
-rw-r--r-- | linux-user/syscall.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 5f02fb72e6..f0f790f5f8 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -1603,10 +1603,10 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3, int reclen; de = dirp; while (len > 0) { - reclen = tswap16(de->d_reclen); + reclen = de->d_reclen; if (reclen > len) break; - de->d_reclen = reclen; + de->d_reclen = tswap16(reclen); tswapls(&de->d_ino); tswapls(&de->d_off); de = (struct dirent *)((char *)de + reclen); @@ -1626,10 +1626,10 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3, int reclen; de = dirp; while (len > 0) { - reclen = tswap16(de->d_reclen); + reclen = de->d_reclen; if (reclen > len) break; - de->d_reclen = reclen; + de->d_reclen = tswap16(reclen); tswap64s(&de->d_ino); tswap64s(&de->d_off); de = (struct dirent64 *)((char *)de + reclen); |