From patchwork Fri Jan 18 21:31:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 156082 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3747956jaa; Fri, 18 Jan 2019 14:01:40 -0800 (PST) X-Google-Smtp-Source: ALg8bN4fU25SPNGnlcVDcMf6INMeS88gIjeR2/ieBQ61JDmIBfADLN0wkiOTuq5Fxt+e64iX+qq3 X-Received: by 2002:a5d:4a8e:: with SMTP id o14mr17434155wrq.159.1547848900540; Fri, 18 Jan 2019 14:01:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547848900; cv=none; d=google.com; s=arc-20160816; b=WNdgMBq++JGVkFlcgLBTMKMvie/n55IHTYBUWu7AoI2nG9tzzXk45np9dQ8Pc68Fjh d0lsHyWTOh0WmzkpeM7Y091MTJVdleh5ozkA6Rugb421Uy6pKImCOCbhM264f+XP9m0R XvkhGlnjLInJwUgraygjhhxdrqDFI7eVUqbwRh7R77K0Jl6kqtBLGEV41DvGGhlAQ5sb L60jFhpItpoUyICr9K94kS8Obkkbxh4L+lgHm4kw0iz/NNAt7DY65EWBu3JSrhpR0Kf4 f9DTfT5NNBYXoCrwQlh4gkxDiADGHYE95BMyHfTK6elrSjaF9+VwbnFhCMOYMql72MMm djWA== 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=mwzNcDdyudRZjt1ZvriB7bmoUmG2mLJC7b5JwOaLK+g=; b=dBjRrnyy29RXdo7SEp5cx/81VsX5WAsVcv/NCduWKZKSXSty9BDt9hOoBZa8eV5Zd7 J95H9DZ57nj38gR/6jebaeGhevaUrDxCjaj+euIlbdi6R9KOF2czwjgX887Uo9phcXBG E0D8muvapBma7RpsH4l91JChr+WioYMOh4SmUUmN39N7NBMDz7kNiAWgfrk1SZgBY0Ms 89LNLjImwJUYVr9CKCv8TKM9XK2Wxx08a8szhW1bJ7SIl3BCI0VoAyq3dbM+MLlTLi9m xoy8a7h37d7vhtT4/zqw1/gF4FfPdlJvu7vzaCoxNBK4AAPrhjc7ZvQMd5fqVa9/hFY8 lXKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=g20s13ad; 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 s26si65069063wrs.72.2019.01.18.14.01.40 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 18 Jan 2019 14:01:40 -0800 (PST) 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=g20s13ad; 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]:47805 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gkcCp-0003UQ-Ha for patch@linaro.org; Fri, 18 Jan 2019 17:01:39 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56243) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gkbkz-0005ar-6u for qemu-devel@nongnu.org; Fri, 18 Jan 2019 16:32:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gkbkx-0005CD-J5 for qemu-devel@nongnu.org; Fri, 18 Jan 2019 16:32:53 -0500 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:33621) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gkbkx-00058Z-8R for qemu-devel@nongnu.org; Fri, 18 Jan 2019 16:32:51 -0500 Received: by mail-pf1-x443.google.com with SMTP id c123so7221377pfb.0 for ; Fri, 18 Jan 2019 13:32:47 -0800 (PST) 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=mwzNcDdyudRZjt1ZvriB7bmoUmG2mLJC7b5JwOaLK+g=; b=g20s13adrxEG9ADUEGos/yDsmuuRNL9j5a5ZoPihjm5sC1Ze4quGPGBndfS/GSbXrP XFV2+6kYO7+IyDNx1llGNgEwSzEDKj2qI6pVkPhDvo1Om6jtpRER/crYCR9kYpQ5E4mX Gz+0alfGUhCZQjGIlAymJyFp4ykdkeEOWPImw= 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=mwzNcDdyudRZjt1ZvriB7bmoUmG2mLJC7b5JwOaLK+g=; b=a2FTo8tgP9QIXwmTHCR6etQggD3FB2Q9vWFmxULLg/NwRkSdPp7TTyl+XnoUw7re0B PYTW9idWB7JZuyuTFdTsiqy5Wd5kyRgUULWjWPqy6es4Q9WIY6s1/Yfevykv6qaHE/Qg FTipqyTHoGBCCqmNnhSKOsRWGhLygRON6/VTgnCPt1PURGwpmAw5zPNQ+0eCzc8/v34b b6PMcbR8K/mVKzY9AofdKMONIIjPYSddWknFy7RJNWuu8llmaDh0+0OsLGzq0oasc3Eh LdyX3RtBu/NIuk3350tnCwuz9XPih7IZm+IAfUO618qQ4shrgBYejwh/j4kH1TnLBlQg cGDQ== X-Gm-Message-State: AJcUukcEprDUYxi2pJMxAAJXclVDjyjOFNyWTFK0W72ucxa7eXHzAyEC ytjOX+4MpzCz1HhdmB4kV56xpVreIv8= X-Received: by 2002:a63:4948:: with SMTP id y8mr19385894pgk.32.1547847166479; Fri, 18 Jan 2019 13:32:46 -0800 (PST) Received: from cloudburst.twiddle.net ([2001:8000:10e0:a000:c673:a6b6:fdef:1933]) by smtp.gmail.com with ESMTPSA id v12sm5833667pgg.41.2019.01.18.13.32.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 18 Jan 2019 13:32:45 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sat, 19 Jan 2019 08:31:07 +1100 Message-Id: <20190118213122.22865-34-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20190118213122.22865-1-richard.henderson@linaro.org> References: <20190118213122.22865-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 v6 34/49] 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.2 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 b35d84794f..c0ce4068b6 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -5327,15 +5327,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 0f32c456cd..a5f308c497 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