fuse_opt.h
Go to the documentation of this file.
/*
FUSE: Filesystem in Userspace
Copyright (C) 2001-2007 Miklos Szeredi <miklos@szeredi.hu>
This program can be distributed under the terms of the GNU LGPLv2.
See the file COPYING.LIB.
*/
#ifndef FUSE_OPT_H_
#define FUSE_OPT_H_
#ifdef __cplusplus
extern "C" {
#endif
struct fuse_opt {
const char *templ;
unsigned long offset;
int value;
};
#define FUSE_OPT_KEY(templ, key) { templ, -1U, key }
#define FUSE_OPT_END { NULL, 0, 0 }
struct fuse_args {
int argc;
char **argv;
int allocated;
};
#define FUSE_ARGS_INIT(argc, argv) { argc, argv, 0 }
#define FUSE_OPT_KEY_OPT -1
#define FUSE_OPT_KEY_NONOPT -2
#define FUSE_OPT_KEY_KEEP -3
#define FUSE_OPT_KEY_DISCARD -4
typedef int (*fuse_opt_proc_t)(void *data, const char *arg, int key,
struct fuse_args *outargs);
int fuse_opt_parse(struct fuse_args *args, void *data,
const struct fuse_opt opts[], fuse_opt_proc_t proc);
int fuse_opt_add_opt(char **opts, const char *opt);
int fuse_opt_add_opt_escaped(char **opts, const char *opt);
int fuse_opt_add_arg(struct fuse_args *args, const char *arg);
int fuse_opt_insert_arg(struct fuse_args *args, int pos, const char *arg);
void fuse_opt_free_args(struct fuse_args *args);
int fuse_opt_match(const struct fuse_opt opts[], const char *opt);
#ifdef __cplusplus
}
#endif
#endif /* FUSE_OPT_H_ */
fuse_opt_add_opt_escaped
int fuse_opt_add_opt_escaped(char **opts, const char *opt)
Definition: fuse_opt.c:143
fuse_args::argc
int argc
Definition: fuse_opt.h:111
fuse_opt::offset
unsigned long offset
Definition: fuse_opt.h:85
fuse_opt_parse
int fuse_opt_parse(struct fuse_args *args, void *data, const struct fuse_opt opts[], fuse_opt_proc_t proc)
Definition: fuse_opt.c:397
fuse_args::allocated
int allocated
Definition: fuse_opt.h:117
fuse_opt::value
int value
Definition: fuse_opt.h:91
fuse_opt_match
int fuse_opt_match(const struct fuse_opt opts[], const char *opt)
fuse_opt::templ
const char * templ
Definition: fuse_opt.h:79
fuse_opt_add_arg
int fuse_opt_add_arg(struct fuse_args *args, const char *arg)
Definition: fuse_opt.c:54
fuse_opt_free_args
void fuse_opt_free_args(struct fuse_args *args)
Definition: fuse_opt.c:33
fuse_opt_add_opt
int fuse_opt_add_opt(char **opts, const char *opt)
Definition: fuse_opt.c:138
fuse_opt_insert_arg
int fuse_opt_insert_arg(struct fuse_args *args, int pos, const char *arg)
Definition: fuse_opt.c:94
fuse_args::argv
char ** argv
Definition: fuse_opt.h:114
fuse_opt
Definition: fuse_opt.h:77
fuse_args
Definition: fuse_opt.h:109
fuse_opt_proc_t
int(* fuse_opt_proc_t)(void *data, const char *arg, int key, struct fuse_args *outargs)
Definition: fuse_opt.h:180