From: Warner Losh <imp@bsdimp.com>
To: Karim Taha <kariem.taha2.7@gmail.com>
Cc: qemu-devel@nongnu.org, Kyle Evans <kevans@freebsd.org>
Subject: Re: [PATCH v4 11/11] Signed-off-by: Karim Taha <kariem.taha2.7@gmail.com>
Date: Fri, 21 Apr 2023 16:46:19 -0600 [thread overview]
Message-ID: <CANCZdfoy_V10Ug2q6tF0LyAZQv0KFN_ERyaxnmRoSCh5PZDq0g@mail.gmail.com> (raw)
In-Reply-To: <20230421165351.3177-12-kariem.taha2.7@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2058 bytes --]
Oh, I see you've uploaded an improved version of the patches, with the
fixes I'd
recommended. I'll queue that series instead.
Warner
On Fri, Apr 21, 2023 at 10:58 AM Karim Taha <kariem.taha2.7@gmail.com>
wrote:
> From: Warner Losh <imp@bsdimp.com>
>
> Add the dispatching code of bind(2),connect(2), accpet(2), getpeername(2).
>
> Add the bind(2), connect(2), accept(2), getpeername(2) syscalls case
> statements to freebsd_syscall function defined in
> bsd-user/freebsd/os-syscall.c
>
> Signed-off-by: Warner Losh <imp@bsdimp.com>
> Signed-off-by: Karim Taha <kariem.taha2.7@gmail.com>
> ---
> bsd-user/freebsd/os-syscall.c | 21 +++++++++++++++++++++
> 1 file changed, 21 insertions(+)
>
> diff --git a/bsd-user/freebsd/os-syscall.c b/bsd-user/freebsd/os-syscall.c
> index c8f998ecec..7f29196a05 100644
> --- a/bsd-user/freebsd/os-syscall.c
> +++ b/bsd-user/freebsd/os-syscall.c
> @@ -44,6 +44,8 @@
> #include "signal-common.h"
> #include "user/syscall-trace.h"
>
> +/* BSD independent syscall shims */
> +#include "bsd-socket.h"
> #include "bsd-file.h"
> #include "bsd-proc.h"
>
> @@ -508,6 +510,25 @@ static abi_long freebsd_syscall(void *cpu_env, int
> num, abi_long arg1,
> ret = do_freebsd_sysarch(cpu_env, arg1, arg2);
> break;
>
> + /*
> + * socket related system calls
> + */
> + case TARGET_FREEBSD_NR_accept: /* accept(2) */
> + ret = do_bsd_accept(arg1, arg2, arg3);
> + break;
> +
> + case TARGET_FREEBSD_NR_bind: /* bind(2) */
> + ret = do_bsd_bind(arg1, arg2, arg3);
> + break;
> +
> + case TARGET_FREEBSD_NR_connect: /* connect(2) */
> + ret = do_bsd_connect(arg1, arg2, arg3);
> + break;
> +
> + case TARGET_FREEBSD_NR_getpeername: /* getpeername(2) */
> + ret = do_bsd_getpeername(arg1, arg2, arg3);
> + break;
> +
> default:
> qemu_log_mask(LOG_UNIMP, "Unsupported syscall: %d\n", num);
> ret = -TARGET_ENOSYS;
> --
> 2.40.0
>
>
[-- Attachment #2: Type: text/html, Size: 2817 bytes --]
prev parent reply other threads:[~2023-04-21 22:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-21 16:53 [PATCH v4 00/11] Contribution task implementations, for the 'FreeBSD user emulation improvements' project Karim Taha
2023-04-21 16:53 ` [PATCH v4 01/11] Signed-off-by: Karim Taha <kariem.taha2.7@gmail.com> Karim Taha
2023-04-24 8:30 ` Daniel P. Berrangé
2023-04-21 16:53 ` [PATCH v4 02/11] " Karim Taha
2023-04-21 16:53 ` [PATCH v4 03/11] " Karim Taha
2023-04-21 16:53 ` [PATCH v4 04/11] " Karim Taha
2023-04-21 16:53 ` [PATCH v4 05/11] " Karim Taha
2023-04-21 16:53 ` [PATCH v4 06/11] " Karim Taha
2023-04-21 16:53 ` [PATCH v4 07/11] " Karim Taha
2023-04-21 16:53 ` [PATCH v4 08/11] " Karim Taha
2023-04-21 16:53 ` [PATCH v4 09/11] " Karim Taha
2023-04-21 16:53 ` [PATCH v4 10/11] " Karim Taha
2023-04-21 16:53 ` [PATCH v4 11/11] " Karim Taha
2023-04-21 22:46 ` Warner Losh [this message]
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=CANCZdfoy_V10Ug2q6tF0LyAZQv0KFN_ERyaxnmRoSCh5PZDq0g@mail.gmail.com \
--to=imp@bsdimp.com \
--cc=kariem.taha2.7@gmail.com \
--cc=kevans@freebsd.org \
--cc=qemu-devel@nongnu.org \
/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).