Message ID | 20190519203726.20729-7-richard.henderson@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp4779825ili; Sun, 19 May 2019 13:40:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqxk+XbddFVeOdrfVTXomUvwNBo1vzOqnn3hOBtpYq9kj+vr/cxlQVyTYYvkNg3GyUKo0X77 X-Received: by 2002:a50:929a:: with SMTP id k26mr29618957eda.52.1558298458396; Sun, 19 May 2019 13:40:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558298458; cv=none; d=google.com; s=arc-20160816; b=PHq+gvNmLUpfRf0ekK5U5GtqWQCYmB8ZrELV2HMkfNgNVXqOn0uO0PzSNb7sJaggPm l+bczRoiXukqPwVFW/3W0ybB/ZwCNI+uKIkeMx3pfyUKdIoG6e0eVoSWtGE1mkNWJdR0 sP2vKgwpQfzB+EadUeawx4o8OvGhnrJJM+QsSHvPyNg1U9NEvhQiG4aIjU1UrKcO5eB7 Qz+xgVMldl5jPLteJ9hv4TXgTBA/UFpOjvg3Ljw0V9TxKupYX3ZGMphlYE93+5vJhGEk vWx4dX8NDPqfHFud0GPF9nGbaDB2Vasbyssgsbnyu/SRKPPbxRNwW0ODloyYlsBEk/Wy vsdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=WUYfVdZEVtBk9MHhOPPZhUCKLb9+xv1voeQk5PhUfpc=; b=wnhaDGhuL29xDNj6OSFBcRPvCD0p0raQBNze52bdHvWvfYqLMfzXTgkF0gGCHwwZXb TCwEy9bIMPU6EjnLOOJG+x0sqZ2D3ZZgBeecyZ6UFcqAYwBGm4ps3RoloLyIeYkzJPIz dmjQL2JRjO/wa4zyoDkbdxYQSiu9JEUQg1lK9rhBgQYYDFCXJaRwLLBvx3NslPglUpFo D/+ir3rtpoKcQ6APTyO3tQi3QWllAai8oaqYKY7gH9iYEZUVRlW3//pOmpKO0f4ydXdu ug7C6+eL0bfY4hVqe1ZeGSlptFMl3fxPPQdBRMpGr/LUMmF65jOt3EA4NZRNL81pvlbM 2PiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=njAw4p97; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id qh3si1408711ejb.193.2019.05.19.13.40.58 for <patch@linaro.org> (version=TLS1 cipher=AES128-SHA bits=128/128); Sun, 19 May 2019 13:40:58 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=njAw4p97; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:53161 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1hSSc5-0005dN-9z for patch@linaro.org; Sun, 19 May 2019 16:40:57 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50133) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1hSSYs-0002mB-T6 for qemu-devel@nongnu.org; Sun, 19 May 2019 16:37:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1hSSYr-0003Sw-RR for qemu-devel@nongnu.org; Sun, 19 May 2019 16:37:38 -0400 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]:45406) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1hSSYr-0003SL-Lt for qemu-devel@nongnu.org; Sun, 19 May 2019 16:37:37 -0400 Received: by mail-pf1-x441.google.com with SMTP id s11so6148107pfm.12 for <qemu-devel@nongnu.org>; Sun, 19 May 2019 13:37:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=WUYfVdZEVtBk9MHhOPPZhUCKLb9+xv1voeQk5PhUfpc=; b=njAw4p9772b+h3oN2yLFzA7FLillXnb1Lf8lnMJU7VLCfwlmHjFfRH6wFrzE35r7Of Eoc20tumRaLO5akv+ql0lZ4wfyFgYP1E8Uk78KAd27eOQBN4+4pUHNi7m7BW8Nxr6yh/ VXu/svjD30BIoMBlbxEAAP+RM12LYDxTnXif+91CRueKAQEduLGggAm4xsTpzeqY2XeV kwH2hvrXXXr+erMPWjc9X/V4QwnB8owZ87llebOz3vxIGRJ9qydnaAR4VisuyC+lQEKH /Lw6hJAhuHJ6U2O9hkI+VqlBirXbyGEndi0jUiYRg1dhn1VpoimyrB50XrZfdZPKojZm MhIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=WUYfVdZEVtBk9MHhOPPZhUCKLb9+xv1voeQk5PhUfpc=; b=uL7Xiwj+O/Zh9bmkfDdMduDrtGWdPMQCGPGn3CsKwGJF+qHsZGDib9eRiOaC1bpj0k XVf1NYSMWL7E+UUxexgNDUq7bB3KDGQLXAzMkFf9t69CKQ4uOTOjAznO+DIecj6lRDPu wBAg67b4HPq9RPl4ZkHZsXxag2zANQsMHqSAeMhKKskNCOU9H4IeBjiVytUlGHwNZ++R WyZZK65tkg9ysvv58P0PXqs5CnfLEyMJspzqBhqWKLLW4TPWxtoCQsmQeGcvgqjSRlnz ClyNfovA3b3Qm03mQlNiG7fvbTq/9LiEG73frIeDDVBFtHNV89nM50IaNsxREvLwsh+i 6rbQ== X-Gm-Message-State: APjAAAV1lT1jzBzUV5pdriC0SIYpw8IPBJNM70FH/xIcjMq5EwEAzgg+ ZNpgGjRNxSU8QI6l7nf4ivpJpCkYPwI= X-Received: by 2002:a63:1316:: with SMTP id i22mr71592462pgl.274.1558298256356; Sun, 19 May 2019 13:37:36 -0700 (PDT) Received: from localhost.localdomain (97-113-13-231.tukw.qwest.net. [97.113.13.231]) by smtp.gmail.com with ESMTPSA id i7sm11397448pfo.19.2019.05.19.13.37.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 May 2019 13:37:35 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Date: Sun, 19 May 2019 13:36:18 -0700 Message-Id: <20190519203726.20729-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190519203726.20729-1-richard.henderson@linaro.org> References: <20190519203726.20729-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::441 Subject: [Qemu-devel] [PATCH v7 06/74] linux-user: Split out close X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: laurent@vivier.eu Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
linux-user: Split do_syscall
|
expand
|
diff --git a/linux-user/syscall-defs.h b/linux-user/syscall-defs.h index d1a6c6fa3c..797426ae6f 100644 --- a/linux-user/syscall-defs.h +++ b/linux-user/syscall-defs.h @@ -16,6 +16,7 @@ * along with this program; if not, see <http://www.gnu.org/licenses/>. */ +SYSCALL_DEF(close, ARG_DEC); #ifdef TARGET_NR_open SYSCALL_DEF(open, ARG_STR, ARG_OPENFLAG, ARG_MODEFLAG); #endif diff --git a/linux-user/syscall-file.inc.c b/linux-user/syscall-file.inc.c index 4ef0be2c6f..d9b09c2cd2 100644 --- a/linux-user/syscall-file.inc.c +++ b/linux-user/syscall-file.inc.c @@ -16,6 +16,14 @@ * along with this program; if not, see <http://www.gnu.org/licenses/>. */ +SYSCALL_IMPL(close) +{ + int fd = arg1; + + fd_trans_unregister(fd); + return get_errno(close(fd)); +} + /* * Helpers for do_openat, manipulating /proc/self/foo. */ diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 53fb211f16..d2b1bb76c4 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -6827,10 +6827,6 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, fd_trans_unregister(ret); return ret; #endif - case TARGET_NR_close: - fd_trans_unregister(arg1); - return get_errno(close(arg1)); - case TARGET_NR_brk: return do_brk(arg1); #ifdef TARGET_NR_fork diff --git a/linux-user/strace.list b/linux-user/strace.list index 53cee3db92..43d3088669 100644 --- a/linux-user/strace.list +++ b/linux-user/strace.list @@ -97,9 +97,6 @@ #ifdef TARGET_NR_clone { TARGET_NR_clone, "clone" , NULL, print_clone, NULL }, #endif -#ifdef TARGET_NR_close -{ TARGET_NR_close, "close" , "%s(%d)", NULL, NULL }, -#endif #ifdef TARGET_NR_connect { TARGET_NR_connect, "connect" , "%s(%d,%#x,%d)", NULL, NULL }, #endif
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- linux-user/syscall-defs.h | 1 + linux-user/syscall-file.inc.c | 8 ++++++++ linux-user/syscall.c | 4 ---- linux-user/strace.list | 3 --- 4 files changed, 9 insertions(+), 7 deletions(-) -- 2.17.1