From nobody Fri Nov 7 12:35:14 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.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 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1539211172054202.08486080149896; Wed, 10 Oct 2018 15:39:32 -0700 (PDT) Received: from localhost ([::1]:59433 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAN8T-0003nh-EL for importer@patchew.org; Wed, 10 Oct 2018 18:39:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38754) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAN6K-0002df-LS for qemu-devel@nongnu.org; Wed, 10 Oct 2018 18:37:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gAN6I-0000JX-Hx for qemu-devel@nongnu.org; Wed, 10 Oct 2018 18:37:08 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:42847) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gAN6H-0000Id-SS for qemu-devel@nongnu.org; Wed, 10 Oct 2018 18:37:06 -0400 Received: by mail-wr1-x42c.google.com with SMTP id g15-v6so7444690wru.9 for ; Wed, 10 Oct 2018 15:37:05 -0700 (PDT) Received: from x1.local (26.red-83-32-208.dynamicip.rima-tde.net. [83.32.208.26]) by smtp.gmail.com with ESMTPSA id q77-v6sm10344886wmd.33.2018.10.10.15.37.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Oct 2018 15:37:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ogKL/TXLX/jLCwe+X43K+U+zYiSlou+fzYLs4QPUzns=; b=qD3MDspP3MpofjJoUyL2ixPS4rd3X9JAlOfhHzeAKToTQIH6iFeNFhLMZbib27os6n 5rqrYoz/XxY5GVkigUKmGBzwe7YR8R6M1eHPZzmAAoopvfsm9zddCgLiN+qNu7zIoOEC GpwnWyC877epwCgHAKyAoYSK1OWMNQVL8g5SMoLjcnzTRuM1AuKP1HA6H//HT6dxrpN4 HPtmIhHnN6kvYRRiZsNgHLr3bx5Wtn05fvRmYIO90T/jZF4jChCjpyGuXyhI6+gztVY+ dMcbC8xPLHAR6vIe5YCtN1RO/lo/wfs9FIaj2fvem1SF0gWMyaXrP7AIYfYZm6q/QUXL JNcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=ogKL/TXLX/jLCwe+X43K+U+zYiSlou+fzYLs4QPUzns=; b=I/VvfNrLNo/R77WTW4QKu0PSbKgtF8d/qjQlNOr6IMMDWv7e92DytY9+bHs1Gm2HBb l/Ry5EeBxjUgLGykGcZZVZtsXMeaOTTzW/8UE7ADIJi6luFtQWUI59kBWGcpjer7v4Ez LAj/O9NFIq7k9oLdV5h/L8to3LxuDigBgFHs37waAv2bZcMUvL5FFcvUqcVfgiDKYryX 1QEZxPVVQ3Xhl3hVtK0C4xijpHPcvQgdlRfmmzFeTpxGPqMKHwNOZoQCSq6tQjdevHgU +3J7KlKfudaS1dg1SJ47rXmsVG4fS38OmdKB6mDFGNYsHG5TyV6ZQ5hnIdwqWN9a3GMG h6VQ== X-Gm-Message-State: ABuFfojiVzTWjKRd82t7G7sO1r6dv6Mq3rF2eo0HdCbDsVdvvXtYnPzJ k9wMk6dAqGQSxL+nW0H5aJk= X-Google-Smtp-Source: ACcGV60VQpjrxXHksT3VFf+DPj/vq5kiSMj7XKGSPd8YQ/49/pvlDxYwTtJhOwN+zB/PbXFSQv13mw== X-Received: by 2002:adf:90ee:: with SMTP id i101-v6mr24535174wri.181.1539211024309; Wed, 10 Oct 2018 15:37:04 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Laurent Vivier Date: Thu, 11 Oct 2018 00:36:49 +0200 Message-Id: <20181010223656.31632-4-f4bug@amsat.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181010223656.31632-1-f4bug@amsat.org> References: <20181010223656.31632-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42c Subject: [Qemu-devel] [PATCH v5 03/10] linux-user/strace: Add print_timezone() 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: =?UTF-8?q?Guido=20G=C3=BCnther?= , Riku Voipio , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Suggested-by: Laurent Vivier Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- linux-user/strace.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/linux-user/strace.c b/linux-user/strace.c index c95557bf83..10ae22263c 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -63,6 +63,7 @@ UNUSED static void print_string(abi_long, int); UNUSED static void print_buf(abi_long addr, abi_long len, int last); UNUSED static void print_raw_param(const char *, abi_long, int); UNUSED static void print_timeval(abi_ulong, int); +UNUSED static void print_timezone(abi_ulong, int); UNUSED static void print_number(abi_long, int); UNUSED static void print_signal(abi_ulong, int); UNUSED static void print_sockaddr(abi_ulong addr, abi_long addrlen); @@ -1184,6 +1185,26 @@ print_timeval(abi_ulong tv_addr, int last) gemu_log("NULL%s", get_comma(last)); } =20 +static void +print_timezone(abi_ulong tz_addr, int last) +{ + if (tz_addr) { + struct target_timezone *tz; + + tz =3D lock_user(VERIFY_READ, tz_addr, sizeof(*tz), 1); + if (!tz) { + print_pointer(tz_addr, last); + return; + } + gemu_log("{" TARGET_ABI_FMT_ld "," TARGET_ABI_FMT_ld "}%s", + tswapal(tz->tz_minuteswest), tswapal(tz->tz_dsttime), + get_comma(last)); + unlock_user(tz, tz_addr, 0); + } else { + gemu_log("NULL%s", get_comma(last)); + } +} + #undef UNUSED =20 #ifdef TARGET_NR_accept --=20 2.19.1