}
#undef FIELD
-#define FIELD(type, name) \
- #type, #name, offsetof(typeof(field), name), sizeof(field.name)
+#define FIELD(type, name) \
+ #type, #name, (unsigned int)offsetof(typeof(field), name), \
+ (unsigned int)sizeof(field.name)
static int trace_write_header(struct trace_seq *s)
{
/* struct trace_entry */
return trace_seq_printf(s,
- "\tfield:%s %s;\toffset:%lu;\tsize:%lu;\n"
- "\tfield:%s %s;\toffset:%lu;\tsize:%lu;\n"
- "\tfield:%s %s;\toffset:%lu;\tsize:%lu;\n"
- "\tfield:%s %s;\toffset:%lu;\tsize:%lu;\n"
- "\tfield:%s %s;\toffset:%lu;\tsize:%lu;\n"
+ "\tfield:%s %s;\toffset:%u;\tsize:%u;\n"
+ "\tfield:%s %s;\toffset:%u;\tsize:%u;\n"
+ "\tfield:%s %s;\toffset:%u;\tsize:%u;\n"
+ "\tfield:%s %s;\toffset:%u;\tsize:%u;\n"
+ "\tfield:%s %s;\toffset:%u;\tsize:%u;\n"
"\n",
FIELD(unsigned char, type),
FIELD(unsigned char, flags),
#include "trace_format.h"
#undef TRACE_FIELD_ZERO_CHAR
-#define TRACE_FIELD_ZERO_CHAR(item) \
- ret = trace_seq_printf(s, "\tfield: char " #item ";\t" \
- "offset:%lu;\tsize:0;\n", \
- offsetof(typeof(field), item)); \
- if (!ret) \
+#define TRACE_FIELD_ZERO_CHAR(item) \
+ ret = trace_seq_printf(s, "\tfield: char " #item ";\t" \
+ "offset:%u;\tsize:0;\n", \
+ (unsigned int)offsetof(typeof(field), item)); \
+ if (!ret) \
return 0;
#undef TRACE_FIELD
#define TRACE_FIELD(type, item, assign) \
ret = trace_seq_printf(s, "\tfield:" #type " " #item ";\t" \
- "offset:%lu;\tsize:%lu;\n", \
- offsetof(typeof(field), item), \
- sizeof(field.item)); \
+ "offset:%u;\tsize:%u;\n", \
+ (unsigned int)offsetof(typeof(field), item), \
+ (unsigned int)sizeof(field.item)); \
if (!ret) \
return 0;
#undef TRACE_FIELD_SPECIAL
#define TRACE_FIELD_SPECIAL(type_item, item, cmd) \
ret = trace_seq_printf(s, "\tfield special:" #type_item ";\t" \
- "offset:%lu;\tsize:%lu;\n", \
- offsetof(typeof(field), item), \
- sizeof(field.item)); \
+ "offset:%u;\tsize:%u;\n", \
+ (unsigned int)offsetof(typeof(field), item), \
+ (unsigned int)sizeof(field.item)); \
if (!ret) \
return 0;