Le 06/05/2020 à 15:21, Tomas Krcka a écrit : > Signed-off-by: Tomas Krcka <tomas.kr...@gmail.com> > --- > linux-user/syscall.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/linux-user/syscall.c b/linux-user/syscall.c > index 88d4c85b70..f751ed8b37 100644 > --- a/linux-user/syscall.c > +++ b/linux-user/syscall.c > @@ -2141,6 +2141,19 @@ static abi_long do_setsockopt(int sockfd, int level, > int optname, > g_free(can_filters); > break; > } > + case CAN_RAW_FD_FRAMES: > + { > + val = 0;
You don't need to set val to 0. > + if (optlen < sizeof(uint32_t)) { kernel checks for the exact size and fails otherwise. > + return -TARGET_EINVAL; > + } > + if (get_user_u32(val, optval_addr)) { > + return -TARGET_EFAULT; > + } > + ret = get_errno(setsockopt(sockfd, level, optname, > + &val, sizeof(val))); > + break; > + } > default: > goto unimplemented; > } > Could you implement getsockopt() too? Thanks, Laurent