Lines Matching defs:hdr
98 struct fuse_out_header hdr;
102 hdr.len = len + sizeof(hdr);
103 hdr.error = 0;
104 hdr.unique = unique;
106 vec[0].iov_base = &hdr;
107 vec[0].iov_len = sizeof(hdr);
117 static int handle_init(void* data, struct fuse_data* fd, const struct fuse_in_header* hdr) {
128 fuse_reply(fd, hdr->unique, &out, sizeof(out));
147 static int handle_getattr(void* data, struct fuse_data* fd, const struct fuse_in_header* hdr) {
153 if (hdr->nodeid == FUSE_ROOT_ID) {
154 fill_attr(&(out.attr), fd, hdr->nodeid, 4096, S_IFDIR | 0555);
155 } else if (hdr->nodeid == PACKAGE_FILE_ID) {
157 } else if (hdr->nodeid == EXIT_FLAG_ID) {
163 fuse_reply(fd, hdr->unique, &out, sizeof(out));
164 return (hdr->nodeid == EXIT_FLAG_ID) ? NO_STATUS_EXIT : NO_STATUS;
168 const struct fuse_in_header* hdr) {
188 fuse_reply(fd, hdr->unique, &out, sizeof(out));
192 static int handle_open(void* data, struct fuse_data* fd, const struct fuse_in_header* hdr) {
195 if (hdr->nodeid == EXIT_FLAG_ID) return -EPERM;
196 if (hdr->nodeid != PACKAGE_FILE_ID) return -ENOENT;
201 fuse_reply(fd, hdr->unique, &out, sizeof(out));
205 static int handle_flush(void* data, struct fuse_data* fd, const struct fuse_in_header* hdr) {
209 static int handle_release(void* data, struct fuse_data* fd, const struct fuse_in_header* hdr) {
268 static int handle_read(void* data, struct fuse_data* fd, const struct fuse_in_header* hdr) {
275 if (hdr->nodeid != PACKAGE_FILE_ID) return -ENOENT;
293 outhdr.unique = hdr->unique;
436 struct fuse_in_header* hdr = (struct fuse_in_header*) request_buffer;
441 switch (hdr->opcode) {
443 result = handle_init(data, &fd, hdr);
447 result = handle_lookup(data, &fd, hdr);
451 result = handle_getattr(data, &fd, hdr);
455 result = handle_open(data, &fd, hdr);
459 result = handle_read(data, &fd, hdr);
463 result = handle_flush(data, &fd, hdr);
467 result = handle_release(data, &fd, hdr);
471 fprintf(stderr, "unknown fuse request opcode %d\n", hdr->opcode);
484 outhdr.unique = hdr->unique;