Lines Matching refs:hdr

99     struct fuse_out_header hdr;  in fuse_reply()  local
103 hdr.len = len + sizeof(hdr); in fuse_reply()
104 hdr.error = 0; in fuse_reply()
105 hdr.unique = unique; in fuse_reply()
107 vec[0].iov_base = &hdr; in fuse_reply()
108 vec[0].iov_len = sizeof(hdr); in fuse_reply()
118 static int handle_init(void* data, struct fuse_data* fd, const struct fuse_in_header* hdr) { in handle_init() argument
154 fuse_reply(fd, hdr->unique, &out, fuse_struct_size); in handle_init()
173 static int handle_getattr(void* data, struct fuse_data* fd, const struct fuse_in_header* hdr) { in handle_getattr() argument
179 if (hdr->nodeid == FUSE_ROOT_ID) { in handle_getattr()
180 fill_attr(&(out.attr), fd, hdr->nodeid, 4096, S_IFDIR | 0555); in handle_getattr()
181 } else if (hdr->nodeid == PACKAGE_FILE_ID) { in handle_getattr()
183 } else if (hdr->nodeid == EXIT_FLAG_ID) { in handle_getattr()
189 fuse_reply(fd, hdr->unique, &out, sizeof(out)); in handle_getattr()
190 return (hdr->nodeid == EXIT_FLAG_ID) ? NO_STATUS_EXIT : NO_STATUS; in handle_getattr()
194 const struct fuse_in_header* hdr) { in handle_lookup() argument
214 fuse_reply(fd, hdr->unique, &out, sizeof(out)); in handle_lookup()
218 static int handle_open(void* data, struct fuse_data* fd, const struct fuse_in_header* hdr) { in handle_open() argument
221 if (hdr->nodeid == EXIT_FLAG_ID) return -EPERM; in handle_open()
222 if (hdr->nodeid != PACKAGE_FILE_ID) return -ENOENT; in handle_open()
227 fuse_reply(fd, hdr->unique, &out, sizeof(out)); in handle_open()
231 static int handle_flush(void* data, struct fuse_data* fd, const struct fuse_in_header* hdr) { in handle_flush() argument
235 static int handle_release(void* data, struct fuse_data* fd, const struct fuse_in_header* hdr) { in handle_release() argument
294 static int handle_read(void* data, struct fuse_data* fd, const struct fuse_in_header* hdr) { in handle_read() argument
301 if (hdr->nodeid != PACKAGE_FILE_ID) return -ENOENT; in handle_read()
319 outhdr.unique = hdr->unique; in handle_read()
460 struct fuse_in_header* hdr = (struct fuse_in_header*) request_buffer; in run_fuse_sideload() local
465 switch (hdr->opcode) { in run_fuse_sideload()
467 result = handle_init(data, &fd, hdr); in run_fuse_sideload()
471 result = handle_lookup(data, &fd, hdr); in run_fuse_sideload()
475 result = handle_getattr(data, &fd, hdr); in run_fuse_sideload()
479 result = handle_open(data, &fd, hdr); in run_fuse_sideload()
483 result = handle_read(data, &fd, hdr); in run_fuse_sideload()
487 result = handle_flush(data, &fd, hdr); in run_fuse_sideload()
491 result = handle_release(data, &fd, hdr); in run_fuse_sideload()
495 fprintf(stderr, "unknown fuse request opcode %d\n", hdr->opcode); in run_fuse_sideload()
508 outhdr.unique = hdr->unique; in run_fuse_sideload()