From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: qemu-devel@nongnu.org
Cc: "Guido Günther" <agx@sigxcpu.org>,
"Riku Voipio" <riku.voipio@iki.fi>,
"Laurent Vivier" <laurent@vivier.eu>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: [Qemu-devel] [PATCH v6 2/8] linux-user/strace: Add print_timezone()
Date: Sun, 8 Sep 2019 08:15:37 +0200 [thread overview]
Message-ID: <20190908061543.25136-3-f4bug@amsat.org> (raw)
In-Reply-To: <20190908061543.25136-1-f4bug@amsat.org>
Suggested-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
checkpatch error:
ERROR: storage class should be at the beginning of the declaration
---
linux-user/strace.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/linux-user/strace.c b/linux-user/strace.c
index f326c357a2..5ee9d62c25 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);
@@ -1254,6 +1255,26 @@ print_timeval(abi_ulong tv_addr, int last)
gemu_log("NULL%s", get_comma(last));
}
+static void
+print_timezone(abi_ulong tz_addr, int last)
+{
+ if (tz_addr) {
+ struct target_timezone *tz;
+
+ tz = 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
#ifdef TARGET_NR_accept
--
2.20.1
next prev parent reply other threads:[~2019-09-08 6:17 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-08 6:15 [Qemu-devel] [PATCH v6 0/8] linux-user: strace improvements Philippe Mathieu-Daudé
2019-09-08 6:15 ` [Qemu-devel] [PATCH v6 1/8] linux-user/strace: Display invalid pointer in print_timeval() Philippe Mathieu-Daudé
2019-09-08 6:15 ` Philippe Mathieu-Daudé [this message]
2019-09-10 8:51 ` [Qemu-devel] [PATCH v6 2/8] linux-user/strace: Add print_timezone() Laurent Vivier
2019-09-08 6:15 ` [Qemu-devel] [PATCH v6 3/8] linux-user/strace: Improve settimeofday() Philippe Mathieu-Daudé
2019-09-10 8:30 ` Laurent Vivier
2019-09-10 8:52 ` Laurent Vivier
2019-09-08 6:15 ` [Qemu-devel] [PATCH v6 4/8] linux-user/syscall: Introduce target_sockaddr_nl Philippe Mathieu-Daudé
2019-09-09 14:22 ` Laurent Vivier
2019-09-11 19:34 ` Philippe Mathieu-Daudé
2019-09-12 17:05 ` Laurent Vivier
2019-09-08 6:15 ` [Qemu-devel] [PATCH v6 5/8] linux-user/strace: Dump AF_NETLINK sockaddr content Philippe Mathieu-Daudé
2019-09-08 6:15 ` [Qemu-devel] [PATCH v6 6/8] linux-user/strace: Add print_sockfd() Philippe Mathieu-Daudé
2019-09-08 6:15 ` [Qemu-devel] [PATCH v6 7/8] linux-user/strace: Improve bind() output Philippe Mathieu-Daudé
2019-09-08 6:15 ` [Qemu-devel] [PATCH v6 8/8] linux-user/strace: Let print_sockaddr() have a 'last' argument Philippe Mathieu-Daudé
2019-09-08 6:28 ` [Qemu-devel] [PATCH v6 0/8] linux-user: strace improvements no-reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190908061543.25136-3-f4bug@amsat.org \
--to=f4bug@amsat.org \
--cc=agx@sigxcpu.org \
--cc=laurent@vivier.eu \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).