From patchwork Sun May 19 20:36:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 164536 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp4802685ili; Sun, 19 May 2019 14:14:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqydysp60PqkBPsI6frCxYLQw4RG2nHpAVp9xEPe3G2va+Z2qGJvo0aNIzY9lm9M1O95MVb7 X-Received: by 2002:a17:906:7b58:: with SMTP id n24mr55657724ejo.224.1558300445863; Sun, 19 May 2019 14:14:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558300445; cv=none; d=google.com; s=arc-20160816; b=K5qE3J07JCCBM4qemPvBfRJH9Mpr0JrbkvNg4p63RtD9sfdt6M/o8MYHEYXiypHH3H BRF9ZA9GictwsiQIfjDccK0dh/qhjCXcInJAT9CL7tGsSiysBskUrqxbhtCDeZr13Vp3 SygDTXtaSX0DM88BQS8idV3gf2wmku5GXvFPy4ekvUXzh+YwS5vVbur1iOhbNCC1L2va 8AH2FiHFkP/BC+jO3eqDulQq0g2uKkuY+dDZjP6DyAN2h5elUyNRb3dfSH3H7IzMawIa GSVCjtSxBgk+hN1M+wsk9tSzHmrGjOOQdMPMfFLX7aYA6/FKy7Nhv8VRpGtDfQGUJqFL rXMQ== 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=+9S8A+10b/scYDuW511dsngcQtz7czOu50I+GmgaCmA=; b=pc3mogd5t2rh1SOGkHJjJDpd43Q8qDZhbqZtOKWv8HfWVNCHgZuTK31+lpgaSRKM4g 9evHqDe7HDdsxilMxeUXozJfB5yxs+pvfb07o0k5IIQx9BFFh0uOq5X8CBXy4Tz2eeQj pawt0oZxMCrpuMka8IL36TQWjceSnhrmzmWbC+bVOZcbweP7wdJxuUgOYMlK3zmnDj7K C+86KdRo4a8AD8msJESpKArz+/6mx1Ev3W0MFzutHs4SknpW7NckYNh41fiGTdvn0Kcj xyX2OW3yc/DerppHDVu7PoCam/vX9gvGZv0VvFNP1M8iTXTsWZ4Gtb2j8kxZZFjXk/9w c+mQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=YO4yH7DU; 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 w31si1943515eda.349.2019.05.19.14.14.05 for (version=TLS1 cipher=AES128-SHA bits=128/128); Sun, 19 May 2019 14:14:05 -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=YO4yH7DU; 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]:53630 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hST88-0000db-P7 for patch@linaro.org; Sun, 19 May 2019 17:14:04 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50594) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hSSZX-0003X5-9b for qemu-devel@nongnu.org; Sun, 19 May 2019 16:38:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hSSZV-0004GD-Ej for qemu-devel@nongnu.org; Sun, 19 May 2019 16:38:19 -0400 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]:36602) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hSSZS-00049v-MS for qemu-devel@nongnu.org; Sun, 19 May 2019 16:38:15 -0400 Received: by mail-pl1-x642.google.com with SMTP id d21so5723866plr.3 for ; Sun, 19 May 2019 13:38:13 -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=+9S8A+10b/scYDuW511dsngcQtz7czOu50I+GmgaCmA=; b=YO4yH7DU920V0heupxU9QywCSVUahP0gLIg7yLjjMPtbyThCfZU8jFR412OquWGB1o mWMCzJCXEGzqo2g5woL+FAc9Cqt9Y22wJKtEu6Sb3p8/Du+FwbQpOKHxowxmyH7ArVNm QIT3yYDNRJ1J3nB1MGdm9Jd55YAdAt6pnuXT/ZK63meevKYeEmKHXJf4WyObb34NRFoL V3/hUUX1HF7k2JjzRCiNk5fjxpl6gzFuPE7swOTOuUP6oFKwU0t7Vk9+S2j7LANRMWoa JaM6Flp4wSqrPZyCFNUpIfaixcUoP3gZGdunaU1PLQ8qzwdor49EOvJxI6O46vPhod4t jY6w== 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=+9S8A+10b/scYDuW511dsngcQtz7czOu50I+GmgaCmA=; b=tLCuBPSZitNurlMwOTzpkUzDe3QL71Z3K8nDgxiT068TkmFf9uXglheUkHJgmVf9ib dWCntov0p6vIoXKxiwfi0kzTaOtOx41oZMJF9jrJTegdH5XgIaUI3oXOwZgiZrFeIUdR j70aFs5D436DRenR9Szyiogxk/wdhuitl0fwKxoO2sJmA6+jFROWaBazR6F4EOLisxFa MS5OT6zBAo9CzTbCENSv800kpJhAJ274zusw0mbcTgyz6IFBPyult9qyYFxWZq12IWWw eJi6aaioDMxk4q4GhL/agxzk7FlW2H5G5vuOwOwpoutjBQVeSYx/IiDkvmsiyGVGg+Tt hvaw== X-Gm-Message-State: APjAAAU1f+W4rAWw0v6qjBDKwb0KziCGnCN5cDyOBwnWxj+wRD5IyO6B jd97q+FMExxXGtcEkFWBluv3YnQHpTU= X-Received: by 2002:a17:902:8b8a:: with SMTP id ay10mr63346806plb.74.1558298292191; Sun, 19 May 2019 13:38:12 -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.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 May 2019 13:38:11 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sun, 19 May 2019 13:36:45 -0700 Message-Id: <20190519203726.20729-34-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::642 Subject: [Qemu-devel] [PATCH v7 33/74] linux-user: Split out stime 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 | 3 +++ linux-user/syscall-time.inc.c | 12 ++++++++++++ linux-user/syscall.c | 9 --------- linux-user/strace.list | 3 --- 4 files changed, 15 insertions(+), 12 deletions(-) -- 2.17.1 diff --git a/linux-user/syscall-defs.h b/linux-user/syscall-defs.h index 0d8da0c6d6..6ca82af397 100644 --- a/linux-user/syscall-defs.h +++ b/linux-user/syscall-defs.h @@ -152,6 +152,9 @@ SYSCALL_DEF(shmdt, ARG_PTR); #if !defined(SYSCALL_TABLE) || defined(TARGET_NR_shmget) SYSCALL_DEF(shmget, ARG_DEC, ARG_DEC, ARG_HEX); #endif +#ifdef TARGET_NR_stime +SYSCALL_DEF(stime, ARG_PTR); +#endif #ifdef TARGET_NR_time SYSCALL_DEF(time, ARG_PTR); #endif diff --git a/linux-user/syscall-time.inc.c b/linux-user/syscall-time.inc.c index 14fec88e47..d1fb72bde0 100644 --- a/linux-user/syscall-time.inc.c +++ b/linux-user/syscall-time.inc.c @@ -16,6 +16,18 @@ * along with this program; if not, see . */ +#ifdef TARGET_NR_stime +SYSCALL_IMPL(stime) +{ + time_t host_time; + + if (get_user_sal(host_time, arg1)) { + return -TARGET_EFAULT; + } + return get_errno(stime(&host_time)); +} +#endif + #ifdef TARGET_NR_time SYSCALL_IMPL(time) { diff --git a/linux-user/syscall.c b/linux-user/syscall.c index f3e03f535d..ae56ecbbc7 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -5380,15 +5380,6 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, void *p; switch(num) { -#ifdef TARGET_NR_stime /* not on alpha */ - case TARGET_NR_stime: - { - time_t host_time; - if (get_user_sal(host_time, arg1)) - return -TARGET_EFAULT; - return get_errno(stime(&host_time)); - } -#endif #ifdef TARGET_NR_alarm /* not on alpha */ case TARGET_NR_alarm: return alarm(arg1); diff --git a/linux-user/strace.list b/linux-user/strace.list index 973a4c9209..d0646b9424 100644 --- a/linux-user/strace.list +++ b/linux-user/strace.list @@ -1254,9 +1254,6 @@ #ifdef TARGET_NR_statfs64 { TARGET_NR_statfs64, "statfs64" , NULL, print_statfs64, NULL }, #endif -#ifdef TARGET_NR_stime -{ TARGET_NR_stime, "stime" , NULL, NULL, NULL }, -#endif #ifdef TARGET_NR_streams1 { TARGET_NR_streams1, "streams1" , NULL, NULL, NULL }, #endif