[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] fix bug in host_to_target_bitmask
From: |
Harald Welte |
Subject: |
[Qemu-devel] [PATCH] fix bug in host_to_target_bitmask |
Date: |
Tue, 9 Nov 2004 12:24:59 +0100 |
User-agent: |
Mutt/1.5.6+20040907i |
Hi!
While running software in i386 user mode emulation on my PPC box, I
discovered that fcntl(F_GETFL) always returned (O_RDWR|O_WRONLY) instead
of just O_RDWR. Some debugging code inside syscall.c confirmed that
0x02 was erroneously converted to 0x03.
After some reading through the code, I found that
host_to_target_bitmask() erroneously uses x86_mask instead of x86_bits.
Please apply the following fix:
diff -u -r1.4 thunk.c
--- qemu/thunk.c 15 Jun 2003 19:52:54 -0000 1.4
+++ qemu/thunk.c 9 Nov 2004 11:24:34 -0000
@@ -236,7 +236,7 @@
for(btp = trans_tbl; btp->x86_mask && btp->alpha_mask; btp++) {
if((alpha_mask & btp->alpha_mask) == btp->alpha_bits) {
- x86_mask |= btp->x86_mask;
+ x86_mask |= btp->x86_bits;
}
}
return(x86_mask);
--
- Harald Welte <address@hidden> http://www.gnumonks.org/
============================================================================
Programming is like sex: One mistake and you have to support it your lifetime
signature.asc
Description: Digital signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [PATCH] fix bug in host_to_target_bitmask,
Harald Welte <=