bool dumper(int fd);
-#if BOOST_VERSION < 104100
- bool dumper_ret;
-#endif
-
void do_send(u64 parent_root_id, const vector<u64>& clone_sources);
};
{
y2err("btrfs_read_and_process_send_stream failed " << r);
-#if BOOST_VERSION < 104100
- dumper_ret = false;
-#endif
-
return false;
}
if (r)
{
-#if BOOST_VERSION < 104100
- dumper_ret = true;
-#endif
-
return true;
}
io_send.parent_root = parent_root_id;
io_send.flags = BTRFS_SEND_FLAG_NO_FILE_DATA;
-#if BOOST_VERSION >= 104100
-
boost::packaged_task<bool> pt(boost::bind(&StreamProcessor::dumper, this, pipefd[0]));
boost::unique_future<bool> uf = pt.get_future();
{
SN_THROW(BtrfsSendReceiveException());
}
-
-#else
-
- boost::thread dumper_thread(boost::bind(&StreamProcessor::dumper, this, pipefd[0]));
-
- fd0_closer.reset();
-
- int r2 = ioctl(dir2.fd(), BTRFS_IOC_SEND, &io_send);
- if (r2 < 0)
- {
- y2err("send ioctl failed errno:" << errno << " (" << stringerror(errno) << ")");
- }
-
- fd1_closer.close();
-
- dumper_thread.join();
-
- if (r2 < 0 || !dumper_ret)
- {
- SN_THROW(BtrfsSendReceiveException());
- }
-
-#endif
}