if (entering(tcp)) {
switch (code) {
case DM_TABLE_LOAD:
- tprintf(", target_count=%" PRIu32,
- ioc->target_count);
+ PRINT_FIELD_U(", ", *ioc, target_count);
break;
case DM_DEV_SUSPEND:
if (ioc->flags & DM_SUSPEND_FLAG)
case DM_DEV_RENAME:
case DM_DEV_REMOVE:
case DM_DEV_WAIT:
- tprintf(", event_nr=%" PRIu32,
- ioc->event_nr);
+ PRINT_FIELD_U(", ", *ioc, event_nr);
break;
}
} else if (!syserror(tcp)) {
case DM_TABLE_DEPS:
case DM_TABLE_STATUS:
case DM_TARGET_MSG:
- tprintf(", target_count=%" PRIu32,
- ioc->target_count);
- tprintf(", open_count=%" PRIu32,
- ioc->open_count);
- tprintf(", event_nr=%" PRIu32,
- ioc->event_nr);
+ PRINT_FIELD_U(", ", *ioc, target_count);
+ PRINT_FIELD_U(", ", *ioc, open_count);
+ PRINT_FIELD_U(", ", *ioc, event_nr);
break;
}
}
static void
dm_decode_flags(const struct dm_ioctl *ioc)
{
- tprints(", flags=");
- printflags(dm_flags, ioc->flags, "DM_???");
+ PRINT_FIELD_FLAGS(", ", *ioc, flags, dm_flags, "DM_???");
}
static void
if (umove_or_printaddr(tcp, addr + offset, &s))
break;
- tprintf("{sector_start=%" PRI__u64 ", length=%" PRI__u64,
- s.sector_start, s.length);
+ PRINT_FIELD_U("{", s, sector_start);
+ PRINT_FIELD_U(", ", s, length);
if (exiting(tcp))
- tprintf(", status=%" PRId32, s.status);
+ PRINT_FIELD_D(", ", s, status);
PRINT_FIELD_CSTRING(", ", s, target_type);
if (s.count > space)
goto misplaced;
- tprintf("{count=%u, deps=", s.count);
+ PRINT_FIELD_U("{", s, count);
+ tprints(", deps=");
print_array(tcp, addr + offset_end, s.count, &dev_buf, sizeof(dev_buf),
umoven_or_printaddr, dm_print_dev, NULL);
if (umove_or_printaddr(tcp, addr + offset, &s))
return;
- tprintf("{sector=%" PRI__u64 ", message=", s.sector);
+ PRINT_FIELD_U("{", s, sector);
+ tprints(", message=");
printstr_ex(tcp, addr + offset_end, ioc->data_size - offset_end,
QUOTE_0_TERMINATED);
tprints("}");
goto skip;
}
- tprintf(", data_size=%u", ioc->data_size);
+ PRINT_FIELD_U(", ", *ioc, data_size);
if (ioc->data_size < offsetof(struct dm_ioctl, data)) {
tprints_comment("data_size too small");
}
if (dm_ioctl_has_params(code))
- tprintf(", data_start=%u", ioc->data_start);
+ PRINT_FIELD_U(", ", *ioc, data_start);
dm_decode_device(code, ioc);
dm_decode_values(tcp, code, ioc);