[strace PATCH 03/12] print_fields.h: add macro to print hexadecimal array field

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* 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

--
To unsubscribe from this list: send the line "unsubscribe linux-s390" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux