- return;
- }
- tprintf("{key={nr_items=%u}", key->nr_items);
- if (print_size)
- tprintf(", buf_size=%" PRIu64, buf_size);
- tprints(", buf=");
- if (abbrev(tcp))
- tprints("...");
- else {
- uint64_t i;
- uint64_t off = 0;
- tprints("[");
- for (i = 0; i < key->nr_items; i++) {
- struct btrfs_ioctl_search_header sh;
- uint64_t addr = buf_addr + off;
- if (i)
- tprints(", ");
- if (i > max_strlen ||
- umove(tcp, addr, &sh)) {
- tprints("...");
- break;
+ } else {
+ tprintf("{key={nr_items=%u}", key->nr_items);
+ if (print_size)
+ tprintf(", buf_size=%" PRIu64, buf_size);
+ tprints(", buf=");
+ if (abbrev(tcp))
+ tprints("...");
+ else {
+ uint64_t i;
+ uint64_t off = 0;
+ tprints("[");
+ for (i = 0; i < key->nr_items; i++) {
+ struct btrfs_ioctl_search_header sh;
+ uint64_t addr = buf_addr + off;
+ if (i)
+ tprints(", ");
+ if (i > max_strlen ||
+ umove(tcp, addr, &sh)) {
+ tprints("...");
+ break;
+ }
+ tprintf("{transid=%" PRI__u64 ", objectid=",
+ sh.transid);
+ btrfs_print_objectid(sh.objectid);
+ tprintf(", offset=%" PRI__u64 ", type=", sh.offset);
+ btrfs_print_key_type(sh.type);
+ tprintf(", len=%u}", sh.len);
+ off += sizeof(sh) + sh.len;
+