From nobody Fri Nov 7 12:04:52 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1547848856913150.0825047728997; Fri, 18 Jan 2019 14:00:56 -0800 (PST) Received: from localhost ([127.0.0.1]:47805 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gkcC5-0003UQ-Ib for importer@patchew.org; Fri, 18 Jan 2019 17:00:53 -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) 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) 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-Google-Smtp-Source: ALg8bN7u9qrYoDgofhEXhsIVLFASAEfsLX/ITDHSCEigjqhZ5IR3kgAFF3F+G5J1hqZ/wtHZVPjyjQ== X-Received: by 2002:a63:4948:: with SMTP id y8mr19385894pgk.32.1547847166479; Fri, 18 Jan 2019 13:32:46 -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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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(-) 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 . */ =20 +#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; =20 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 --=20 2.17.2