#include DEF_MPERS_TYPE(struct_btrfs_ioctl_dev_replace_args)
#include DEF_MPERS_TYPE(struct_btrfs_ioctl_send_args)
#include DEF_MPERS_TYPE(struct_btrfs_ioctl_received_subvol_args)
+#include DEF_MPERS_TYPE(struct_btrfs_ioctl_vol_args_v2)
# include <linux/btrfs.h>
struct_btrfs_ioctl_send_args;
typedef struct btrfs_ioctl_received_subvol_args
struct_btrfs_ioctl_received_subvol_args;
+typedef struct btrfs_ioctl_vol_args_v2
+ struct_btrfs_ioctl_vol_args_v2;
#endif /* HAVE_LINUX_BTRFS_H */
}
static void
-btrfs_print_qgroup_inherit(struct tcb *tcp, const uint64_t qgi_addr)
+btrfs_print_qgroup_inherit(struct tcb *tcp, const unsigned long qgi_addr)
{
struct btrfs_qgroup_inherit inherit;
if (umove_or_printaddr(tcp, qgi_addr, &inherit))
return;
- tprintf("{flags=");
+ tprints("{flags=");
printflags64(btrfs_qgroup_inherit_flags, inherit.flags,
"BTRFS_QGROUP_INHERIT_???");
tprintf(", num_qgroups=%" PRI__u64 ", num_ref_copies=%" PRI__u64
uint64_t buf_addr, uint64_t buf_size, bool print_size)
{
if (entering(tcp)) {
- tprintf("{key={tree_id=");
+ tprints("{key={tree_id=");
btrfs_print_objectid(key->tree_id);
if (key->min_objectid != BTRFS_FIRST_FREE_OBJECTID ||
tprintf("{start=%" PRIu64 ", len=", (uint64_t)args.start);
- tprintf("%" PRIu64, args.len);
+ tprintf("%" PRIu64, (uint64_t) args.len);
if (args.len == UINT64_MAX)
tprints(" /* UINT64_MAX */");
sectorsize = args.sectorsize,
clone_alignment = args.clone_alignment;
#else
- reserved32 = (__u32 *)args.reserved;
+ reserved32 = (__u32 *) (void *) args.reserved;
nodesize = reserved32[0];
sectorsize = reserved32[1];
clone_alignment = reserved32[2];
if (entering(tcp)) {
/* Use subvolume id of the containing root */
if (args.treeid == 0)
- /* abuse of auxstr to retain state */
- tcp->auxstr = (void *)1;
- else
- tcp->auxstr = NULL;
+ set_tcb_priv_ulong(tcp, 1);
tprints("{treeid=");
btrfs_print_objectid(args.treeid);
}
tprints("{");
- if (tcp->auxstr) {
- tcp->auxstr = NULL;
+ if (get_tcb_priv_ulong(tcp)) {
tprints("treeid=");
btrfs_print_objectid(args.treeid);
tprints(", ");
tprints("...");
else {
uint64_t record;
- print_array(tcp, (unsigned long) args.clone_sources,
+ print_array(tcp, (kernel_ureg_t) args.clone_sources,
args.clone_sources_count,
&record, sizeof(record),
umoven_or_printaddr,
case BTRFS_IOC_SNAP_CREATE_V2:
case BTRFS_IOC_SUBVOL_CREATE_V2: { /* code is W, but is actually RW */
- struct btrfs_ioctl_vol_args_v2 args;
+ struct_btrfs_ioctl_vol_args_v2 args;
if (entering(tcp))
tprints(", ");
printflags64(btrfs_snap_flags_v2, args.flags,
"BTRFS_SUBVOL_???");
if (args.flags & BTRFS_SUBVOL_QGROUP_INHERIT) {
- tprintf(", size=%" PRI__u64 ", qgroup_inherit=",
- args.size);
+ tprintf(", size=%" PRIu64 ", qgroup_inherit=",
+ (uint64_t) args.size);
btrfs_print_qgroup_inherit(tcp,
- (unsigned long)args.qgroup_inherit);
+ (kernel_ureg_t) args.qgroup_inherit);
}
- tprintf(", name=");
+ tprints(", name=");
print_quoted_string(args.name, sizeof(args.name),
QUOTE_0_TERMINATED);
tprints("}");
return 0;
}
- tprintf("{transid=%" PRI__u64 "}", args.transid);
+ tprintf("{transid=%" PRIu64 "}", (uint64_t) args.transid);
break;
}