libfuse
fuse_opt.h
Go to the documentation of this file.
1/*
2 FUSE: Filesystem in Userspace
3 Copyright (C) 2001-2007 Miklos Szeredi <miklos@szeredi.hu>
4
5 This program can be distributed under the terms of the GNU LGPLv2.
6 See the file COPYING.LIB.
7*/
8
9#ifndef FUSE_OPT_H_
10#define FUSE_OPT_H_
11
17#ifdef __cplusplus
18extern "C" {
19#endif
20
77struct fuse_opt {
79 const char *templ;
80
85 unsigned long offset;
86
91 int value;
92};
93
98#define FUSE_OPT_KEY(templ, key) { templ, -1U, key }
99
104#define FUSE_OPT_END { NULL, 0, 0 }
105
109struct fuse_args {
111 int argc;
112
114 char **argv;
115
118};
119
123#define FUSE_ARGS_INIT(argc, argv) { argc, argv, 0 }
124
129#define FUSE_OPT_KEY_OPT -1
130
137#define FUSE_OPT_KEY_NONOPT -2
138
145#define FUSE_OPT_KEY_KEEP -3
146
153#define FUSE_OPT_KEY_DISCARD -4
154
180typedef int (*fuse_opt_proc_t)(void *data, const char *arg, int key,
181 struct fuse_args *outargs);
182
203int fuse_opt_parse(struct fuse_args *args, void *data,
204 const struct fuse_opt opts[], fuse_opt_proc_t proc);
205
213int fuse_opt_add_opt(char **opts, const char *opt);
214
222int fuse_opt_add_opt_escaped(char **opts, const char *opt);
223
231int fuse_opt_add_arg(struct fuse_args *args, const char *arg);
232
246int fuse_opt_insert_arg(struct fuse_args *args, int pos, const char *arg);
247
255void fuse_opt_free_args(struct fuse_args *args);
256
257
265int fuse_opt_match(const struct fuse_opt opts[], const char *opt);
266
267#ifdef __cplusplus
268}
269#endif
270
271#endif /* FUSE_OPT_H_ */
int fuse_opt_add_arg(struct fuse_args *args, const char *arg)
Definition: fuse_opt.c:55
void fuse_opt_free_args(struct fuse_args *args)
Definition: fuse_opt.c:34
int(* fuse_opt_proc_t)(void *data, const char *arg, int key, struct fuse_args *outargs)
Definition: fuse_opt.h:180
int fuse_opt_add_opt_escaped(char **opts, const char *opt)
Definition: fuse_opt.c:144
int fuse_opt_parse(struct fuse_args *args, void *data, const struct fuse_opt opts[], fuse_opt_proc_t proc)
Definition: fuse_opt.c:398
int fuse_opt_add_opt(char **opts, const char *opt)
Definition: fuse_opt.c:139
int fuse_opt_insert_arg(struct fuse_args *args, int pos, const char *arg)
Definition: fuse_opt.c:95
int fuse_opt_match(const struct fuse_opt opts[], const char *opt)
int allocated
Definition: fuse_opt.h:117
int argc
Definition: fuse_opt.h:111
char ** argv
Definition: fuse_opt.h:114
const char * templ
Definition: fuse_opt.h:79
unsigned long offset
Definition: fuse_opt.h:85
int value
Definition: fuse_opt.h:91