qemu-patch-raspberry4/linux-user
Petar Jovanovic f651e6ae55 linux-user: improve target_to_host_sock_type conversion
Previous implementation has failed to take into account different value of
SOCK_NONBLOCK on target and host, and existence of SOCK_CLOEXEC.
The same conversion has to be applied both for do_socket and do_socketpair,
so the code has been isolated in a static inline function.

enum sock_type in linux-user/socket.h has been extended to include
TARGET_SOCK_CLOEXEC and TARGET_SOCK_NONBLOCK, similar to definition in libc.
The patch also includes necessary code style changes (tab to spaces) in the
header file since most of the file has been touched by this change.

Signed-off-by: Petar Jovanovic <petar.jovanovic@imgtec.com>
Message-id: 1372639454-7560-1-git-send-email-petar.jovanovic@rt-rk.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
2013-07-05 15:45:40 +03:00
..
alpha alpha-linux-user: Fix sigaltstack structure definition 2012-10-12 14:01:04 +03:00
arm fpu: move public header file to include/fpu 2012-12-19 08:32:46 +01:00
cris janitor: add guards to headers 2012-12-19 08:31:31 +01:00
i386 linux-user: Merge pread/pwrite into pread64/pwrite64 2012-12-08 18:49:30 +00:00
m68k linux-user: Don't overuse CPUState 2012-03-14 22:20:24 +01:00
microblaze janitor: add guards to headers 2012-12-19 08:31:31 +01:00
mips linux-user: Add syscall numbers from kernel 2.6.39.2 2011-07-11 16:12:51 +03:00
mips64 mipsn32-linux-user: Configure the architecture properly 2013-03-05 15:04:20 +01:00
openrisc target-or32: Add linux syscall, signal and termbits 2012-07-27 21:13:05 +00:00
ppc linux-user: Add syscall numbers from kernel 2.6.39.2 2011-07-11 16:12:51 +03:00
s390x target-s390: Reorg exception handling 2013-01-05 12:00:28 -08:00
sh4 linux-user: correct syscall 123 on sh4 2011-07-13 17:11:37 +03:00
sparc linux-user: Add more sparc syscall numbers 2013-03-11 13:05:14 +02:00
sparc64 linux-user: Add syscall numbers from kernel 2.6.39.2 2011-07-11 16:12:51 +03:00
unicore32 linux-user: Merge pread/pwrite into pread64/pwrite64 2012-12-08 18:49:30 +00:00
x86_64 Fix spelling in comments, documentation and messages 2011-12-14 11:09:44 +00:00
cpu-uname.c target-arm: Remove ARM_CPUID_* macros 2012-06-20 12:13:28 +00:00
cpu-uname.h linux-user: adapt uname machine to emulated CPU 2010-02-06 17:19:43 +01:00
elfload.c target-i386: Replace cpuid_*features fields with a feature word array 2013-05-02 00:27:55 +02: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 flatload: fix bss clearing 2012-08-14 20:26:55 +01:00
ioctls.h linux-user: add SIOCADDRT/SIOCDELRT support 2013-07-05 15:45:40 +03: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: If loading fails, print error as string, not number 2012-10-12 14:25:56 +03:00
m68k-sim.c linux-user: Fix typo m86k -> m68k 2010-10-05 13:53:56 -05:00
main.c cpu: Turn cpu_dump_{state,statistics}() into CPUState hooks 2013-06-28 13:25:12 +02:00
Makefile.objs build: move *-user/ objects to nested Makefile.objs 2012-06-07 07:17:33 +02:00
mmap.c linux-user: Allocate the right amount of space for non-fixed file maps 2012-08-04 09:37:49 -07:00
qemu.h linux-user: Restore cast to target type in get_user() 2013-02-06 16:37:39 -06:00
signal.c linux-user: fix signal number range check 2013-07-05 15:45:40 +03:00
socket.h linux-user: improve target_to_host_sock_type conversion 2013-07-05 15:45:40 +03:00
strace.c linux-user: Don't omit comma for strace of rt_sigaction() 2013-04-05 14:40:54 +02:00
strace.list linux-user: Merge pread/pwrite into pread64/pwrite64 2012-12-08 18:49:30 +00:00
syscall.c linux-user: improve target_to_host_sock_type conversion 2013-07-05 15:45:40 +03:00
syscall_defs.h alpha-linux-user: Translate fcntl l_type 2013-01-16 08:13:17 -08:00
syscall_types.h linux-user: Fix SNDCTL_DSP_MAP{IN, OUT}BUF ioctl definitions 2012-08-13 12:45:46 +01:00
target_flat.h linux-user/FLAT: allow targets to override FLAT processing 2011-02-09 10:33:54 +02:00
uaccess.c Fix missing strnlen problems 2009-07-01 18:24:44 +00:00
vm86.c linux-user: fix abi_(u)long, target_ulong mismatch 2011-10-27 14:42:16 +03:00