qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Sean Bruno <sbruno@freebsd.org>
Cc: Stacey Son <sson@freebsd.org>, QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 3/3] bsd-user: move strace OS/arch dependent code to host/arch dirs
Date: Thu, 5 Jun 2014 18:35:13 +0100	[thread overview]
Message-ID: <CAFEAcA8g5cwDya7rorwtZ2=zEsge__nc3W6tSi+bT95PHAx-Cw@mail.gmail.com> (raw)
In-Reply-To: <1401989261-42050-4-git-send-email-sbruno@freebsd.org>

On 5 June 2014 18:27, Sean Bruno <sbruno@freebsd.org> wrote:
> From: Stacey Son <sson@FreeBSD.org>
>
> This change moves host OS and arch dependent code for the sysarch
> system call related to the -strace functionality into the
> appropriate host OS and target arch directories.

> +{ TARGET_FREEBSD_NR___acl_aclcheck_fd, "__acl_get_fd", "%s(%d, %d, %#x)", NULL, NULL },
> +{ TARGET_FREEBSD_NR___acl_aclcheck_file, "__acl_get_file", "%s(\"%s\", %d, %#x)", NULL, NULL },
> +{ TARGET_FREEBSD_NR___acl_aclcheck_link, "__acl_get_link", "%s(\"%s\", %d, %#x)", NULL, NULL },
> +{ TARGET_FREEBSD_NR___acl_delete_fd, "__acl_delete_fd", "%s(%d, %d)", NULL, NULL },
> +{ TARGET_FREEBSD_NR___acl_delete_file, "__acl_delete_file", "%s(\"%s\", %d)", NULL, NULL },
> +{ TARGET_FREEBSD_NR___acl_delete_link, "__acl_delete_link", "%s(\"%s\", %d)", NULL, NULL },
> +{ TARGET_FREEBSD_NR___acl_get_fd, "__acl_get_fd", "%s(\"%s\", %d, %#x)", NULL, NULL },
> +{ TARGET_FREEBSD_NR___acl_get_file, "__acl_get_file", "%s(\"%s\", %d, %#x)", NULL, NULL },
> +{ TARGET_FREEBSD_NR___acl_get_link, "__acl_get_link", "%s(\"%s\", %d, %#x)", NULL, NULL },
> +{ TARGET_FREEBSD_NR___acl_set_fd, "__acl_get_fd", "%s(\"%s\", %d, %#x)", NULL, NULL },
> +{ TARGET_FREEBSD_NR___acl_set_file, "__acl_get_file", "%s(\"%s\", %d, %#x)", NULL, NULL },
> +{ TARGET_FREEBSD_NR___acl_set_link, "__acl_get_link", "%s(\"%s\", %d, %#x)", NULL, NULL },

This sort of change to the set of supported syscalls for strace looks
like it should
be in a separate patch to the "move files" patch.

> -static void
> -print_syscall(int num, const struct syscallname *scnames, unsigned int nscnames,
> -              abi_long arg1, abi_long arg2, abi_long arg3,
> -              abi_long arg4, abi_long arg5, abi_long arg6)
> +static void print_syscall(int num, const struct syscallname *scnames,
> +        unsigned int nscnames, abi_long arg1, abi_long arg2, abi_long arg3,
> +        abi_long arg4, abi_long arg5, abi_long arg6)
>  {
>      unsigned int i;
>      const char *format="%s(" TARGET_ABI_FMT_ld "," TARGET_ABI_FMT_ld ","
> @@ -102,36 +164,37 @@ print_syscall(int num, const struct syscallname *scnames, unsigned int nscnames,
>
>      gemu_log("%d ", getpid() );
>
> -    for (i = 0; i < nscnames; i++)
> +    for (i = 0; i < nscnames; i++) {
>          if (scnames[i].nr == num) {
>              if (scnames[i].call != NULL) {
>                  scnames[i].call(&scnames[i], arg1, arg2, arg3, arg4, arg5,
> -                                arg6);
> +                        arg6);
>              } else {
>                  /* XXX: this format system is broken because it uses
>                     host types and host pointers for strings */
> -                if (scnames[i].format != NULL)
> +                if (scnames[i].format != NULL) {
>                      format = scnames[i].format;
> -                gemu_log(format, scnames[i].name, arg1, arg2, arg3, arg4,
> -                         arg5, arg6);
> +                }
> +                gemu_log(format, scnames[i].name, arg1, arg2, arg3, arg4, arg5,
> +                        arg6);
>              }
>              return;
>          }
> +    }

A lot of this (and below) is just coding style fixes. Please make
sure you keep those entirely in their own patches, not mixed
in with functionality changes -- it's much easier to review
that way.

thanks
-- PMM

  reply	other threads:[~2014-06-05 17:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-05 17:27 [Qemu-devel] [PATCH 0/3] FreeBSD-user, breakout the BSDs Sean Bruno
2014-06-05 17:27 ` [Qemu-devel] [PATCH 1/3] bsd-user: refresh freebsd system call numbers Sean Bruno
2014-06-05 17:27 ` [Qemu-devel] [PATCH 2/3] bsd-user: add HOST_VARIANT_DIR for various *BSD dependent code Sean Bruno
2014-06-05 17:27 ` [Qemu-devel] [PATCH 3/3] bsd-user: move strace OS/arch dependent code to host/arch dirs Sean Bruno
2014-06-05 17:35   ` Peter Maydell [this message]
2014-06-05 19:07 ` [Qemu-devel] [PATCH 0/3] FreeBSD-user, breakout the BSDs Peter Maydell

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='CAFEAcA8g5cwDya7rorwtZ2=zEsge__nc3W6tSi+bT95PHAx-Cw@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sbruno@freebsd.org \
    --cc=sson@freebsd.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).