From patchwork Thu Sep 22 16:56:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 9346319 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9545A601C2 for ; Thu, 22 Sep 2016 18:10:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8EFA62AA8B for ; Thu, 22 Sep 2016 18:10:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 83B442AC17; Thu, 22 Sep 2016 18:10:35 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1B9112AA8B for ; Thu, 22 Sep 2016 18:10:35 +0000 (UTC) Received: from localhost ([::1]:55759 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bn8SA-0006FC-4P for patchwork-qemu-devel@patchwork.kernel.org; Thu, 22 Sep 2016 14:10:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58860) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bn7KW-0000pC-Hk for qemu-devel@nongnu.org; Thu, 22 Sep 2016 12:58:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bn7KR-0006Zv-R4 for qemu-devel@nongnu.org; Thu, 22 Sep 2016 12:58:35 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:32963 helo=mail.rt-rk.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bn7KR-0006Yt-K4 for qemu-devel@nongnu.org; Thu, 22 Sep 2016 12:58:31 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id B87C71A22B7; Thu, 22 Sep 2016 18:58:30 +0200 (CEST) X-Virus-Scanned: amavisd-new at rt-rk.com Received: from mcs19.domain.local (mcs19.domain.local [10.10.13.51]) by mail.rt-rk.com (Postfix) with ESMTPSA id 9DBFC1A1FAB; Thu, 22 Sep 2016 18:58:30 +0200 (CEST) From: Aleksandar Markovic To: qemu-devel@nongnu.org, riku.voipio@iki.fi, laurent@vivier.eu, peter.maydell@linaro.org, petar.jovanovic@imgtec.com, miodrag.dinic@imgtec.com, aleksandar.rikalo@imgtec.com, aleksandar.markovic@imgtec.com Date: Thu, 22 Sep 2016 18:56:52 +0200 Message-Id: <20160922165712.79809-4-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20160922165712.79809-1-aleksandar.markovic@rt-rk.com> References: <20160922165712.79809-1-aleksandar.markovic@rt-rk.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 89.216.37.149 Subject: [Qemu-devel] [PATCH v7 03/10] linux-user: Add support for syncfs() 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: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Aleksandar Markovic This patch implements syncfs() syscall support. The implementation consists of a straightforward invocation of host's syncfs() only. Signed-off-by: Aleksandar Markovic --- linux-user/syscall.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 9f11ca2..1af3e10 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -8069,6 +8069,11 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, sync(); ret = 0; break; +#if defined(TARGET_NR_syncfs) + case TARGET_NR_syncfs: + ret = get_errno(syncfs(arg1)); + break; +#endif case TARGET_NR_kill: ret = get_errno(safe_kill(arg1, target_to_host_signal(arg2))); break;