[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/2] linux-user: add do_setsockopt CAN_RAW_FD_FRAMES support
From: |
Tomas Krcka |
Subject: |
[PATCH 2/2] linux-user: add do_setsockopt CAN_RAW_FD_FRAMES support |
Date: |
Wed, 6 May 2020 15:21:14 +0200 |
Signed-off-by: Tomas Krcka <address@hidden>
---
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;
+ if (optlen < sizeof(uint32_t)) {
+ 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;
}
--
2.17.1