From patchwork Thu Mar 7 10:06:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 10842629 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B22311515 for ; Thu, 7 Mar 2019 10:17:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9C4BF2E376 for ; Thu, 7 Mar 2019 10:17:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8F1AF2ECAE; Thu, 7 Mar 2019 10:17:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A88A62E376 for ; Thu, 7 Mar 2019 10:17:20 +0000 (UTC) Received: from localhost ([127.0.0.1]:48643 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1q5Y-0004V4-2P for patchwork-qemu-devel@patchwork.kernel.org; Thu, 07 Mar 2019 05:17:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43995) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1pvo-00043I-Ie for qemu-devel@nongnu.org; Thu, 07 Mar 2019 05:07:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h1pvn-0007U0-Co for qemu-devel@nongnu.org; Thu, 07 Mar 2019 05:07:16 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:47513) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h1pvm-0007Sx-TG for qemu-devel@nongnu.org; Thu, 07 Mar 2019 05:07:15 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1M3lkT-1h2f8r0Hyt-000qZB; Thu, 07 Mar 2019 11:07:06 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Thu, 7 Mar 2019 11:06:55 +0100 Message-Id: <20190307100656.14044-9-laurent@vivier.eu> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190307100656.14044-1-laurent@vivier.eu> References: <20190307100656.14044-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:IAYYqtQ9ZTbOUzUTn4eEnJ2VOiXumOjW2nweCVv8w/CccbM5FmQ gWdNT9jYEeo2uGmhd67z2xLvjDwCcecmAwh2ymQxhQnRHlZA8iB+BvZiGWDRdUZFMLuWkzg Kdln++xNNELwxDjE8D3RI+6S/avE0fXSgVZ3ACuPtwBMXrCwq0NUBWNv52NvjGRPeMfzdBn fJ+NbJRF/ftr/CpNwe8uw== X-UI-Out-Filterresults: notjunk:1;V03:K0:eMBwgurccIQ=:YT+MSyc+fRV2f4BF929uai mZdqeNJO4k0WTIEgbWetZinC3YN8elNqt6saHLTvOli/vU5tir2g48feH2qf8w5U+pv8vAqBN 46uFbGOzQdESl8wKwpW9QNe3d9lkMoKFNOFLS26PLdwV09Lc5ZGTFYupO8b8mV/BliH4n96RC T8vWVEtNi/cXS0fSXdJLMTBb2cf/V3r6ZpQzyYRMS+znA/jUpoLxn4HpCWr1tEtq/O3KLD177 n04WH7/gVzNJWLjx7/boC5ChkPzWtnGI95yycJ5bdTpjiAmIsC/SU4RODb8aUawo5l6JB/HUN D6BO0fmx1a0ANOJYcw33SuFT9W9MpT5kuuD9kCFDK0UBcTijGUl8n4H/y3rIDPyDvfylXP53O qZ0Ht+eSdCimq7LIw/GHqqtklcUVdHZjTrA1K6rZ/suZQ0cw8oLrN5LZCXAQNTJTgsxprSf5+ ZRJ0YRpEK/vD1hgf9Fc5O0DaBKncT8wcyODuTpQAmGb7a6xNS/iBJ1+y5O1FjLOvUyNkM5jWM VEf1uTrJA7LaoFhIDwbEWDXw4lN/YTxp0v4L7Gxz2U3p6smTba4P5/P82tYiQ/iPxdF2khmso WdL19VFoA4dm4RhzkVsWzw+MBPCHIqyf+/t92scTHQMfDHb/WKljdtFJ/vJQUTMUHP0/vzZC9 WOhQL27hTghSInluMhj6vcGSUxrpeqkf2x0UGxEO5NQhhKpPO1MDASorBcCGiQ5zLJyLxvL3d wZ43Y/DbA29/g0M1ZzOnZl1kzfYlWwuHk+6tsw== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 217.72.192.75 Subject: [Qemu-devel] [PULL 8/9] linux-user: Nicer strace output of chroot() syscall X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Helge Deller , Riku Voipio , Laurent Vivier Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Helge Deller Signed-off-by: Helge Deller Reviewed-by: Laurent Vivier Message-Id: <20190227191115.GA20163@ls3530.dellerweb.de> Signed-off-by: Laurent Vivier --- linux-user/strace.c | 12 ++++++++++++ linux-user/strace.list | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index 7318392e571c..6f72a74c0918 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -1235,6 +1235,18 @@ print_chdir(const struct syscallname *name, } #endif +#ifdef TARGET_NR_chroot +static void +print_chroot(const struct syscallname *name, + abi_long arg0, abi_long arg1, abi_long arg2, + abi_long arg3, abi_long arg4, abi_long arg5) +{ + print_syscall_prologue(name); + print_string(arg0, 1); + print_syscall_epilogue(name); +} +#endif + #ifdef TARGET_NR_chmod static void print_chmod(const struct syscallname *name, diff --git a/linux-user/strace.list b/linux-user/strace.list index ff8bb19f5fac..db21ce41779f 100644 --- a/linux-user/strace.list +++ b/linux-user/strace.list @@ -77,7 +77,7 @@ { TARGET_NR_chown32, "chown32" , NULL, NULL, NULL }, #endif #ifdef TARGET_NR_chroot -{ TARGET_NR_chroot, "chroot" , NULL, NULL, NULL }, +{ TARGET_NR_chroot, "chroot" , NULL, print_chroot, NULL }, #endif #ifdef TARGET_NR_clock_adjtime { TARGET_NR_clock_adjtime, "clock_adjtime" , NULL, print_clock_adjtime, NULL },