btrfs.c: fix BTRFS_IOC_TREE_SEARCH_V2 output

* btrfs.c (btrfs_ioctl): Fix BTRFS_IOC_TREE_SEARCH_V2 output
in case of EOVERFLOW and failed umove.
This commit is contained in:
Дмитрий Левин 2016-05-24 01:10:53 +00:00
parent 6638a5d132
commit d67b2173a1

View File

@ -1154,9 +1154,10 @@ btrfs_ioctl(struct tcb *tcp, const unsigned int code, const long arg)
tprints(", ");
else if (syserror(tcp)) {
if (tcp->u_error == EOVERFLOW) {
tprints(" => ");
tcp->u_error = 0;
if (!umove_or_printaddr(tcp, arg, &args))
tprintf(" => {buf_size=%" PRIu64 "}",
tprintf("{buf_size=%" PRIu64 "}",
(uint64_t)args.buf_size);
tcp->u_error = EOVERFLOW;
}