qemu-e2k/linux-user
Laurent Vivier 3f9ac9b39b linux-user: remove duplicate tswap32() from do_getsockopt()
This issue has been detected with tests/linux-tests.c:

linux-test.c:330: getsockopt

327     len = sizeof(val);
328     chk_error(getsockopt(server_fd, SOL_SOCKET, SO_TYPE, &val, &len));
329     if (val != SOCK_STREAM)
330         error("getsockopt");

In linux-user/syscall.c:do_getsockopt(), we have:
...
        val = tswap32(val);
...
            if (put_user_u32(val, optval_addr))
...

whereas "put_user_u32" calls in the end "__put_user" which uses "tswap32".

So the "val = tswap32(val);" is useless and wrong.

This patch removes it.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
2009-06-16 16:58:45 +03:00
..
alpha
arm linux-user: update syscall list 2009-06-16 16:56:29 +03:00
cris
i386 linux-user: update syscall list 2009-06-16 16:56:29 +03:00
m68k linux-user: update syscall list 2009-06-16 16:56:29 +03:00
microblaze
mips linux-user: update syscall list 2009-06-16 16:56:29 +03:00
mips64 linux-user: update syscall list 2009-06-16 16:56:29 +03:00
mipsn32 linux-user: update syscall list 2009-06-16 16:56:29 +03:00
ppc linux-user: update syscall list 2009-06-16 16:56:29 +03:00
sh4 linux-user: update syscall list 2009-06-16 16:56:29 +03:00
sparc linux-user: update syscall list 2009-06-16 16:56:29 +03:00
sparc64 linux-user: update syscall list 2009-06-16 16:56:29 +03:00
x86_64 linux-user: update syscall list 2009-06-16 16:56:29 +03:00
elfload32.c
elfload.c linux-user: added x86 and x86_64 support for ELF coredump 2009-06-16 16:56:28 +03:00
envlist.c
envlist.h
errno_defs.h
flat.h
flatload.c
ioctls.h
linux_loop.h
linuxload.c linux-user: implemented ELF coredump support for ARM target 2009-06-16 16:56:28 +03:00
m68k-sim.c
main.c linux-user: implemented ELF coredump support for ARM target 2009-06-16 16:56:28 +03:00
mmap.c linux-user: initialize mmap_mutex properly 2009-06-16 16:58:45 +03:00
path.c
qemu-types.h
qemu.h linux-user: implemented ELF coredump support for ARM target 2009-06-16 16:56:28 +03:00
signal.c linux-user: implemented ELF coredump support for ARM target 2009-06-16 16:56:28 +03:00
socket.h
strace.c linux-user: strace now handles guest strings correctly [v2] 2009-06-16 16:56:28 +03:00
strace.list linux-user: strace now handles guest strings correctly [v2] 2009-06-16 16:56:28 +03:00
syscall_defs.h RFC: fix fcntl support in linux-user - new try 2009-06-16 16:58:45 +03:00
syscall_types.h
syscall.c linux-user: remove duplicate tswap32() from do_getsockopt() 2009-06-16 16:58:45 +03:00
uaccess.c
vm86.c