From: Eugene Syromyatnikov <evgsyr@gmail.com>
To: linux-s390@vger.kernel.org, strace@vger.kernel.org
Subject: [strace PATCH 03/12] print_fields.h: add macro to print hexadecimal array field
Date: Thu, 18 Jan 2018 06:16:41 +0000 [thread overview]
Message-ID: <20180118061641.GA28845@asgard.redhat.com> (raw)
* print_fields.h (PRINT_FIELD_HEX_ARRAY): New macro, prints target
array with QUOTE_FORCE_HEX.
---
print_fields.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/print_fields.h b/print_fields.h
index 0af087a..b2c6a30 100644
--- a/print_fields.h
+++ b/print_fields.h
@@ -107,6 +107,15 @@
sizeof((where_).field_)); \
} while (0)
+#define PRINT_FIELD_HEX_ARRAY(prefix_, where_, field_) \
+ do { \
+ STRACE_PRINTF("%s%s=", (prefix_), #field_); \
+ print_quoted_string((const char *)(where_).field_, \
+ sizeof((where_).field_) + \
+ MUST_BE_ARRAY((where_).field_), \
+ QUOTE_FORCE_HEX); \
+ } while (0)
+
#define PRINT_FIELD_INET_ADDR(prefix_, where_, field_, af_) \
do { \
STRACE_PRINTF(prefix_); \
--
2.1.4
reply other threads:[~2018-01-18 6:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20180118061641.GA28845@asgard.redhat.com \
--to=evgsyr@gmail.com \
--cc=linux-s390@vger.kernel.org \
--cc=strace@vger.kernel.org \
/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