add missing argument check in ulockmgr.c
[fuse.git] / lib / fuse_i.h
blob020633608aa78f1292bde165d3190a1146f5d555
1 /*
2 FUSE: Filesystem in Userspace
3 Copyright (C) 2001-2007 Miklos Szeredi <miklos@szeredi.hu>
5 This program can be distributed under the terms of the GNU LGPLv2.
6 See the file COPYING.LIB
7 */
9 #include "fuse.h"
10 #include "fuse_lowlevel.h"
12 struct fuse_chan;
13 struct fuse_ll;
15 struct fuse_session {
16 struct fuse_session_ops op;
18 void *data;
20 volatile int exited;
22 struct fuse_chan *ch;
25 struct fuse_req {
26 struct fuse_ll *f;
27 uint64_t unique;
28 int ctr;
29 pthread_mutex_t lock;
30 struct fuse_ctx ctx;
31 struct fuse_chan *ch;
32 int interrupted;
33 union {
34 struct {
35 uint64_t unique;
36 } i;
37 struct {
38 fuse_interrupt_func_t func;
39 void *data;
40 } ni;
41 } u;
42 struct fuse_req *next;
43 struct fuse_req *prev;
46 struct fuse_ll {
47 int debug;
48 int allow_root;
49 int atomic_o_trunc;
50 int no_remote_lock;
51 int big_writes;
52 int no_splice_write;
53 int no_splice_move;
54 struct fuse_lowlevel_ops op;
55 int got_init;
56 struct cuse_data *cuse_data;
57 void *userdata;
58 uid_t owner;
59 struct fuse_conn_info conn;
60 struct fuse_req list;
61 struct fuse_req interrupts;
62 pthread_mutex_t lock;
63 int got_destroy;
64 pthread_key_t pipe_key;
65 int broken_splice_nonblock;
68 struct fuse_cmd {
69 char *buf;
70 size_t buflen;
71 struct fuse_chan *ch;
74 struct fuse *fuse_new_common(struct fuse_chan *ch, struct fuse_args *args,
75 const struct fuse_operations *op,
76 size_t op_size, void *user_data, int compat);
78 int fuse_sync_compat_args(struct fuse_args *args);
80 struct fuse_chan *fuse_kern_chan_new(int fd);
82 struct fuse_session *fuse_lowlevel_new_common(struct fuse_args *args,
83 const struct fuse_lowlevel_ops *op,
84 size_t op_size, void *userdata);
86 void fuse_kern_unmount_compat22(const char *mountpoint);
87 void fuse_kern_unmount(const char *mountpoint, int fd);
88 int fuse_kern_mount(const char *mountpoint, struct fuse_args *args);
90 int fuse_send_reply_iov_nofree(fuse_req_t req, int error, struct iovec *iov,
91 int count);
92 void fuse_free_req(fuse_req_t req);
95 struct fuse *fuse_setup_common(int argc, char *argv[],
96 const struct fuse_operations *op,
97 size_t op_size,
98 char **mountpoint,
99 int *multithreaded,
100 int *fd,
101 void *user_data,
102 int compat);
104 void cuse_lowlevel_init(fuse_req_t req, fuse_ino_t nodeide, const void *inarg);