int fuse_reply_create(fuse_req_t req, const struct fuse_entry_param *e, const struct fuse_file_info *f) { struct { struct fuse_entry_out e; struct fuse_open_out o; } arg; memset(&arg, 0, sizeof(arg)); fill_entry(&arg.e, e); #ifdef POSIXACLS if (req->f->conn.proto_minor < 12) { fill_open((struct fuse_open_out*) ((char*)&arg + FUSE_COMPAT_ENTRY_OUT_SIZE), f); return send_reply_ok(req, &arg, FUSE_COMPAT_ENTRY_OUT_SIZE + sizeof(struct fuse_open_out)); } else { fill_open(&arg.o, f); return send_reply_ok(req, &arg, sizeof(arg)); } #else fill_open(&arg.o, f); return send_reply_ok(req, &arg, sizeof(arg)); #endif }
int fuse_reply_open(fuse_req_t req, const struct fuse_file_info *f) { struct fuse_open_out arg; memset(&arg, 0, sizeof(arg)); fill_open(&arg, f); return send_reply_ok(req, &arg, sizeof(arg)); }
int fuse_reply_create(fuse_req_t req, const struct fuse_entry_param *e, const struct fuse_file_info *f) { struct { struct fuse_entry_out e; struct fuse_open_out o; } arg; memset(&arg, 0, sizeof(arg)); fill_entry(&arg.e, e); fill_open(&arg.o, f); return send_reply_ok(req, &arg, sizeof(arg)); }
int fuse_reply_create(fuse_req_t req, const struct fuse_entry_param *e, const struct fuse_file_info *f) { char buf[sizeof(struct fuse_entry_out) + sizeof(struct fuse_open_out)]; size_t entrysize = req->f->conn.proto_minor < 9 ? FUSE_COMPAT_ENTRY_OUT_SIZE : sizeof(struct fuse_entry_out); struct fuse_entry_out *earg = (struct fuse_entry_out *) buf; struct fuse_open_out *oarg = (struct fuse_open_out *) (buf + entrysize); memset(buf, 0, sizeof(buf)); fill_entry(earg, e); fill_open(oarg, f); return send_reply_ok(req, buf, entrysize + sizeof(struct fuse_open_out)); }