Kirill A. Shutemov wrote: > TARGET_F_*64 should be used instead of F_*64, because on 64-bit host > systems F_GETLK == F_GETLK64(same for SETLK and SETLKW), so we cannot > determinate if it's a long lock or not on a target 32-bit system. > Patch in the attachment. > > P.S. Please, review my privious patches, which I have added description > recently. Or should I repost it? >
> diff -uNr qemu-0.9.0.cvs20070304.orig/linux-user/syscall.c > qemu-0.9.0.cvs20070304/linux-user/syscall.c > --- qemu-0.9.0.cvs20070304.orig/linux-user/syscall.c 2007-03-09 20:08:59 > +0200 > +++ qemu-0.9.0.cvs20070304/linux-user/syscall.c 2007-03-09 20:09:54 > +0200 > @@ -4063,7 +4063,7 @@ > #endif > > switch(arg2) { > - case F_GETLK64: > + case TARGET_F_GETLK64: > ret = get_errno(fcntl(arg1, arg2, &fl)); This changes the bug from checking the wrong flag to (potentially) passing down the wrong flag... > if (ret == 0) { > #ifdef TARGET_ARM > @@ -4089,8 +4089,8 @@ > } > break; > > - case F_SETLK64: > - case F_SETLKW64: > + case TARGET_F_SETLK64: > + case TARGET_F_SETLKW64: > #ifdef TARGET_ARM > if (((CPUARMState *)cpu_env)->eabi) { > lock_user_struct(target_efl, arg3, 1); Likewise here. We should always check TARGET_* flags and pass down the corresponding host flag. Thiemo _______________________________________________ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel