qemu/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 Remove unnecessary trailing newlines 2008-12-13 09:32:43 +00:00
arm linux-user: update syscall list 2009-06-16 16:56:29 +03:00
cris CRIS: Add a bunch of syscall numbers. 2009-01-07 19:47:53 +00:00
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 microblaze: Add syscall, signal and termbits defs for linux-user. 2009-05-26 21:10:21 +02:00
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
elfload.c linux-user: added x86 and x86_64 support for ELF coredump 2009-06-16 16:56:28 +03:00
elfload32.c Remove unwanted executable properties 2008-04-06 06:04:39 +00:00
envlist.c linux-user: Add generic env variable handling 2009-01-30 19:59:17 +00:00
envlist.h linux-user: Add generic env variable handling 2009-01-30 19:59:17 +00:00
errno_defs.h Remove unnecessary trailing newlines 2008-12-13 09:32:43 +00:00
flat.h Support for 32 bit ABI on 64 bit targets (only enabled Sparc64) 2007-10-14 16:27:31 +00:00
flatload.c Replace gcc variadic macro extension with C99 version 2009-05-13 17:53:17 +00:00
ioctls.h Add MTIOCTOP, MTIOCGET and MTIOCPOS ioctls (Kirill Shutemov). 2008-09-20 03:03:09 +00:00
linux_loop.h Fix build failure with old kernel headers (loop.h is incompatible with 2008-05-23 16:06:43 +00:00
linuxload.c linux-user: implemented ELF coredump support for ARM target 2009-06-16 16:56:28 +03:00
m68k-sim.c Fix more FSF addresses 2009-01-05 18:11:53 +00:00
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 linux-user: don't crash with null name 2009-01-30 19:48:07 +00:00
qemu-types.h linux-user: Move abi_* typedefs into qemu-types.h 2008-12-08 18:12:04 +00:00
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 Various linux-user structures and definitions fixes for PowerPC targets. 2007-12-10 08:24:59 +00:00
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.c linux-user: remove duplicate tswap32() from do_getsockopt() 2009-06-16 16:58:45 +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 Add MTIOCTOP, MTIOCGET and MTIOCPOS ioctls (Kirill Shutemov). 2008-09-20 03:03:09 +00:00
uaccess.c Suppress gcc 4.x -Wpointer-sign (included in -Wall) warnings 2008-09-20 08:07:15 +00:00
vm86.c Convert references to logfile/loglevel to use qemu_log*() macros 2009-01-15 22:34:14 +00:00