From patchwork Sun May 19 20:37:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 164532 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp4801023ili; Sun, 19 May 2019 14:11:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqz30Nxkl+UMDSS7f2maXDf/7j1H0zPTpIZ4JXhpgXikbgPXEZO7/Qec931Sxw6Kg44CW4rj X-Received: by 2002:a17:906:61c3:: with SMTP id t3mr37009120ejl.273.1558300313573; Sun, 19 May 2019 14:11:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558300313; cv=none; d=google.com; s=arc-20160816; b=l5NeGu/yYcxzwvMlMxNSA1qWEZgCtMNGQ0KRKNj4SR4npyLUBIXYTAbrALmcvYqSGF hY8ggDuQ7i9oeDU+meUff4jrnmnrC6vFdZqzr38ilj8SGqeFBipUPCmLDGOV6Y0/mVf3 Qsojw3F6rBbx4QNl7OZrwHMkkkcldssZSNHTMpZxd8Yb/7cO3SNvupefAeKjBy8a4Ctl dVSaODFcTuisscvASvD328eGmHxxmjaTGOwRSFjYGVock0Xl8F++5HjdpJSL6mCRRXnU B8SVDxPIFySWq0geytYL+OqJq7khZWxGAmWq0/go8vs2Uwr6Y/mtWamSLfjS8zQ7xgTq W9Nw== 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=oFRsgmqF2zgcYNLWzzaBWoMP1N3UdMw/D2eCjGA4dbU=; b=UvD+CAcGddKc7IrxXTGW24gdJJIfsP3w1CT/iyfWwygFRQZDUb7fTzWe5yCKYnCDPC /inHw/ID+Mm4KBwAT/AlFwZHhYugjmWJQ+TBzhtudRzSTVGHkTxkd6Y5j3641JMmz6YJ o+X4RXUjtbW28w31H0uJhY5DBqKB1paB0eyJPBvN06L84ZND5ylqP3yIe3MG6C7KnYfr jJW3Wn0atH1xmMqXy95/4MDknvCpq0m1JF4fldvnnNyHeOwmftpSg+quk2yusz6GFnCS qUIQb44trHhxphv5h5gY/5gQvuP4/+5Jyc2w4NNsAwUKb5ZikkWQCFpxnr1F2rcl0HrY gPMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=HRJ6Ux3g; 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: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id h27si2321398ejc.202.2019.05.19.14.11.53 for (version=TLS1 cipher=AES128-SHA bits=128/128); Sun, 19 May 2019 14:11:53 -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=HRJ6Ux3g; 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]:53609 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hST60-0007DT-Gd for patch@linaro.org; Sun, 19 May 2019 17:11:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50883) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hSSZo-0003op-SP for qemu-devel@nongnu.org; Sun, 19 May 2019 16:38:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hSSZn-0004ee-TD for qemu-devel@nongnu.org; Sun, 19 May 2019 16:38:36 -0400 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:44492) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hSSZn-0004dm-NT for qemu-devel@nongnu.org; Sun, 19 May 2019 16:38:35 -0400 Received: by mail-pf1-x443.google.com with SMTP id g9so6149183pfo.11 for ; Sun, 19 May 2019 13:38:35 -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=oFRsgmqF2zgcYNLWzzaBWoMP1N3UdMw/D2eCjGA4dbU=; b=HRJ6Ux3gg5LIul/AE9nq+zSXlQfOw3QbDX5D8Hwrps9d0CKvLXGTQPUh0lqD3TPzhA KkzrSWknpFoS0uA9nfTnWoOZP5+2rLxnusQMl44kXg8Y8ffsQVBI/JM1LwtL4qAQltaP UAcn/OA3cM7r10zYsPTUtgM0jP+u8TI/tpSbREMYvsBc3oJw057s4rjnfHaNFgikYsHN /lOSfQghorpWtHNEC+G7G+J8ri/2cQTZweGxZaksBrIwc5UWiRC1S+3DX8mh+jk7p05b 0nhF24eYBwnG3qapea/k3jhzs8PSflrUVSM5nlXVbrZ00vt6P+gPmt/1pPU4/dl8+Lt7 +j4Q== 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=oFRsgmqF2zgcYNLWzzaBWoMP1N3UdMw/D2eCjGA4dbU=; b=Tcy6i261W/Z+aJFBtf6GH51lGfVICEeZhjFeevUmZYNCT6oR+8bAjeejyqC1wMC1wB AUDCNooxJFMH4xVevqvlTsay7hC16mM++eztPYkug7Er7/MJszB7UcDtkaSuaBRyZx20 OrWIIUdU7+Xips09S3a2qPwBBvc9wKe/4UfvSvVs7LHq1iIjUL3X/EwWRwESxpEruR0W YwBXMvcLEtxcQAIrWNlSg/T8gS4N7bul+WT6hAFo7ghFGa/QRJ2502suo7kE1TIm+G3Z zGFaeMTCEGo4YclKfVJxyoLM726mGo/7DksPC9XijygG+Z/MnfIWui/MEwAowiqI1lki SNog== X-Gm-Message-State: APjAAAXWcQrG2qhKk8jDe/eqToxs0HcXz9xRNGh8vKHuim7zhpMcJNri KdYxxFcG7yhKfDUcQIm8IEpgsQ00pqw= X-Received: by 2002:a62:4d04:: with SMTP id a4mr4173256pfb.177.1558298314536; Sun, 19 May 2019 13:38:34 -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.38.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 May 2019 13:38:33 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sun, 19 May 2019 13:37:04 -0700 Message-Id: <20190519203726.20729-53-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::443 Subject: [Qemu-devel] [PATCH v7 52/74] linux-user: Split out umask 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: laurent@vivier.eu Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 1 + linux-user/syscall-file.inc.c | 5 +++++ linux-user/syscall.c | 2 -- linux-user/strace.list | 3 --- 4 files changed, 6 insertions(+), 5 deletions(-) -- 2.17.1 diff --git a/linux-user/syscall-defs.h b/linux-user/syscall-defs.h index 6de7b84351..b6538350a3 100644 --- a/linux-user/syscall-defs.h +++ b/linux-user/syscall-defs.h @@ -214,6 +214,7 @@ SYSCALL_DEF(syncfs, ARG_DEC); SYSCALL_DEF(time, ARG_PTR); #endif SYSCALL_DEF(times, ARG_PTR); +SYSCALL_DEF(umask, ARG_OCT); #ifdef TARGET_NR_umount SYSCALL_DEF(umount, ARG_STR); #endif diff --git a/linux-user/syscall-file.inc.c b/linux-user/syscall-file.inc.c index 4080ab250e..cbde6d906f 100644 --- a/linux-user/syscall-file.inc.c +++ b/linux-user/syscall-file.inc.c @@ -1117,6 +1117,11 @@ SYSCALL_IMPL(rmdir) } #endif +SYSCALL_IMPL(umask) +{ + return get_errno(umask(arg1)); +} + SYSCALL_IMPL(unlinkat) { return do_unlinkat(arg1, arg2, arg3); diff --git a/linux-user/syscall.c b/linux-user/syscall.c index dcb35e1228..419edceab2 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -4241,8 +4241,6 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, void *p; switch(num) { - case TARGET_NR_umask: - return get_errno(umask(arg1)); case TARGET_NR_chroot: if (!(p = lock_user_string(arg1))) return -TARGET_EFAULT; diff --git a/linux-user/strace.list b/linux-user/strace.list index 4a527b0c65..61d22ad16b 100644 --- a/linux-user/strace.list +++ b/linux-user/strace.list @@ -1293,9 +1293,6 @@ #ifdef TARGET_NR_ulimit { TARGET_NR_ulimit, "ulimit" , NULL, NULL, NULL }, #endif -#ifdef TARGET_NR_umask -{ TARGET_NR_umask, "umask" , "%s(%#o)", NULL, NULL }, -#endif #ifdef TARGET_NR_uname { TARGET_NR_uname, "uname" , "%s(%p)", NULL, NULL }, #endif