Lines Matching defs:out

122 	return([=](auto in, auto &out) {
127 out.push_back(std::move(out0));
135 return([=](auto in, auto &out) {
144 out.push_back(std::move(out0));
150 struct mockfs_buf_out &out)> f)
152 return([=](auto& in, auto &out) {
156 out.push_back(std::move(out0));
387 void MockFS::debug_response(const mockfs_buf_out &out) {
393 switch (out.header.error) {
395 name = (const char*)out.body.bytes +
398 out.body.inval_entry.parent, name);
403 out.body.inval_inode.ino,
404 out.body.inval_inode.off,
405 out.body.inval_inode.len);
410 out.body.store.nodeid,
411 out.body.store.offset,
412 out.body.store.size);
754 std::unique_ptr<mockfs_buf_out> out(new mockfs_buf_out);
762 out->header.unique = in->header.unique;
763 out->header.error = 0;
764 out->body.init.major = FUSE_KERNEL_VERSION;
765 out->body.init.minor = m_kernel_minor_version;;
766 out->body.init.flags = in->body.init.flags & flags;
767 out->body.init.max_write = m_maxwrite;
768 out->body.init.max_readahead = m_maxreadahead;
771 SET_OUT_HEADER_LEN(*out, init_7_22);
773 out->body.init.time_gran = m_time_gran;
774 SET_OUT_HEADER_LEN(*out, init);
777 write(m_fuse_fd, out.get(), out->header.len);
792 std::vector<std::unique_ptr<mockfs_buf_out>> out;
807 process(*in, out);
817 process_default(*in, out);
819 for (auto &it: out)
821 out.clear();
827 std::unique_ptr<mockfs_buf_out> out(new mockfs_buf_out);
829 out->header.unique = 0; /* 0 means asynchronous notification */
830 out->header.error = FUSE_NOTIFY_INVAL_ENTRY;
831 out->body.inval_entry.parent = parent;
832 out->body.inval_entry.namelen = namelen;
833 strlcpy((char*)&out->body.bytes + sizeof(out->body.inval_entry),
834 name, sizeof(out->body.bytes) - sizeof(out->body.inval_entry));
835 out->header.len = sizeof(out->header) + sizeof(out->body.inval_entry) +
837 debug_response(*out);
838 write_response(*out);
844 std::unique_ptr<mockfs_buf_out> out(new mockfs_buf_out);
846 out->header.unique = 0; /* 0 means asynchronous notification */
847 out->header.error = FUSE_NOTIFY_INVAL_INODE;
848 out->body.inval_inode.ino = ino;
849 out->body.inval_inode.off = off;
850 out->body.inval_inode.len = len;
851 out->header.len = sizeof(out->header) + sizeof(out->body.inval_inode);
852 debug_response(*out);
853 write_response(*out);
859 std::unique_ptr<mockfs_buf_out> out(new mockfs_buf_out);
861 out->header.unique = 0; /* 0 means asynchronous notification */
862 out->header.error = FUSE_NOTIFY_STORE;
863 out->body.store.nodeid = ino;
864 out->body.store.offset = off;
865 out->body.store.size = size;
866 bcopy(data, (char*)&out->body.bytes + sizeof(out->body.store), size);
867 out->header.len = sizeof(out->header) + sizeof(out->body.store) + size;
868 debug_response(*out);
869 write_response(*out);
897 std::vector<std::unique_ptr<mockfs_buf_out>> &out)
903 out.push_back(std::move(out0));
988 void MockFS::write_response(const mockfs_buf_out &out) {
1032 r = write(m_fuse_fd, &out, out.header.len);
1033 if (out.expected_errno) {
1035 ASSERT_EQ(out.expected_errno, errno) << strerror(errno);
1039 ":\n", out.header.unique);