Lines Matching refs:hdr

99   fuse_out_header hdr;  in fuse_reply()  local
100 hdr.len = len + sizeof(hdr); in fuse_reply()
101 hdr.error = 0; in fuse_reply()
102 hdr.unique = unique; in fuse_reply()
105 vec[0].iov_base = &hdr; in fuse_reply()
106 vec[0].iov_len = sizeof(hdr); in fuse_reply()
116 static int handle_init(void* data, fuse_data* fd, const fuse_in_header* hdr) { in handle_init() argument
147 fuse_reply(fd, hdr->unique, &out, fuse_struct_size); in handle_init()
166 static int handle_getattr(void* /* data */, const fuse_data* fd, const fuse_in_header* hdr) { in handle_getattr() argument
170 if (hdr->nodeid == FUSE_ROOT_ID) { in handle_getattr()
171 fill_attr(&(out.attr), fd, hdr->nodeid, 4096, S_IFDIR | 0555); in handle_getattr()
172 } else if (hdr->nodeid == PACKAGE_FILE_ID) { in handle_getattr()
174 } else if (hdr->nodeid == EXIT_FLAG_ID) { in handle_getattr()
180 fuse_reply(fd, hdr->unique, &out, sizeof(out)); in handle_getattr()
181 return (hdr->nodeid == EXIT_FLAG_ID) ? NO_STATUS_EXIT : NO_STATUS; in handle_getattr()
184 static int handle_lookup(void* data, const fuse_data* fd, const fuse_in_header* hdr) { in handle_lookup() argument
204 fuse_reply(fd, hdr->unique, &out, sizeof(out)); in handle_lookup()
208 static int handle_open(void* /* data */, const fuse_data* fd, const fuse_in_header* hdr) { in handle_open() argument
209 if (hdr->nodeid == EXIT_FLAG_ID) return -EPERM; in handle_open()
210 if (hdr->nodeid != PACKAGE_FILE_ID) return -ENOENT; in handle_open()
214 fuse_reply(fd, hdr->unique, &out, sizeof(out)); in handle_open()
279 static int handle_read(void* data, fuse_data* fd, const fuse_in_header* hdr) { in handle_read() argument
280 if (hdr->nodeid != PACKAGE_FILE_ID) return -ENOENT; in handle_read()
297 outhdr.unique = hdr->unique; in handle_read()
431 fuse_in_header* hdr = reinterpret_cast<fuse_in_header*>(request_buffer); in run_fuse_sideload() local
436 switch (hdr->opcode) { in run_fuse_sideload()
438 result = handle_init(data, &fd, hdr); in run_fuse_sideload()
442 result = handle_lookup(data, &fd, hdr); in run_fuse_sideload()
446 result = handle_getattr(data, &fd, hdr); in run_fuse_sideload()
450 result = handle_open(data, &fd, hdr); in run_fuse_sideload()
454 result = handle_read(data, &fd, hdr); in run_fuse_sideload()
458 result = handle_flush(data, &fd, hdr); in run_fuse_sideload()
462 result = handle_release(data, &fd, hdr); in run_fuse_sideload()
466 fprintf(stderr, "unknown fuse request opcode %d\n", hdr->opcode); in run_fuse_sideload()
479 outhdr.unique = hdr->unique; in run_fuse_sideload()