dirent fixes
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@48 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
644c433cb3
commit
8083a3e508
@ -1603,10 +1603,10 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3,
|
|||||||
int reclen;
|
int reclen;
|
||||||
de = dirp;
|
de = dirp;
|
||||||
while (len > 0) {
|
while (len > 0) {
|
||||||
reclen = tswap16(de->d_reclen);
|
reclen = de->d_reclen;
|
||||||
if (reclen > len)
|
if (reclen > len)
|
||||||
break;
|
break;
|
||||||
de->d_reclen = reclen;
|
de->d_reclen = tswap16(reclen);
|
||||||
tswapls(&de->d_ino);
|
tswapls(&de->d_ino);
|
||||||
tswapls(&de->d_off);
|
tswapls(&de->d_off);
|
||||||
de = (struct dirent *)((char *)de + reclen);
|
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;
|
int reclen;
|
||||||
de = dirp;
|
de = dirp;
|
||||||
while (len > 0) {
|
while (len > 0) {
|
||||||
reclen = tswap16(de->d_reclen);
|
reclen = de->d_reclen;
|
||||||
if (reclen > len)
|
if (reclen > len)
|
||||||
break;
|
break;
|
||||||
de->d_reclen = reclen;
|
de->d_reclen = tswap16(reclen);
|
||||||
tswap64s(&de->d_ino);
|
tswap64s(&de->d_ino);
|
||||||
tswap64s(&de->d_off);
|
tswap64s(&de->d_off);
|
||||||
de = (struct dirent64 *)((char *)de + reclen);
|
de = (struct dirent64 *)((char *)de + reclen);
|
||||||
|
Loading…
Reference in New Issue
Block a user