qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Tomas Krcka <tomas.krcka@gmail.com>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, Riku Voipio <riku.voipio@iki.fi>,
	Laurent Vivier <laurent@vivier.eu>,
	Tomas Krcka <tomas.krcka@gmail.com>
Subject: [PATCH 2/2] linux-user: add do_setsockopt CAN_RAW_FD_FRAMES support
Date: Wed,  6 May 2020 15:21:14 +0200	[thread overview]
Message-ID: <20200506132114.76406-2-tomas.krcka@gmail.com> (raw)
In-Reply-To: <20200506132114.76406-1-tomas.krcka@gmail.com>

Signed-off-by: Tomas Krcka <tomas.krcka@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;
+            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



  reply	other threads:[~2020-05-06 14:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-06 13:21 [PATCH 1/2] linux-user: add do_setsockopt SOL_CAN_RAW CAN_RAW_FILTER support Tomas Krcka
2020-05-06 13:21 ` Tomas Krcka [this message]
2020-05-12 20:20   ` [PATCH 2/2] linux-user: add do_setsockopt CAN_RAW_FD_FRAMES support Laurent Vivier
2020-05-12 20:09 ` [PATCH 1/2] linux-user: add do_setsockopt SOL_CAN_RAW CAN_RAW_FILTER support Laurent Vivier
2020-05-12 21:05   ` Tomas Krcka
2020-05-13  8:56     ` Laurent Vivier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200506132114.76406-2-tomas.krcka@gmail.com \
    --to=tomas.krcka@gmail.com \
    --cc=laurent@vivier.eu \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=riku.voipio@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).