From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42695) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsbZn-0002F9-CF for qemu-devel@nongnu.org; Thu, 05 Jun 2014 13:35:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WsbZe-0006ie-ME for qemu-devel@nongnu.org; Thu, 05 Jun 2014 13:35:42 -0400 Received: from mail-lb0-f177.google.com ([209.85.217.177]:38922) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsbZe-0006iT-FL for qemu-devel@nongnu.org; Thu, 05 Jun 2014 13:35:34 -0400 Received: by mail-lb0-f177.google.com with SMTP id s7so774606lbd.22 for ; Thu, 05 Jun 2014 10:35:33 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1401989261-42050-4-git-send-email-sbruno@freebsd.org> References: <1401989261-42050-1-git-send-email-sbruno@freebsd.org> <1401989261-42050-4-git-send-email-sbruno@freebsd.org> From: Peter Maydell Date: Thu, 5 Jun 2014 18:35:13 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH 3/3] bsd-user: move strace OS/arch dependent code to host/arch dirs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sean Bruno Cc: Stacey Son , QEMU Developers On 5 June 2014 18:27, Sean Bruno wrote: > From: Stacey Son > > 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