/** Return the exited flag, which indicates if fuse_exit() has been
called */
-int fuse_exited(struct fuse* f);
+int fuse_exited(struct fuse *f);
/** Set function which can be used to get the current context */
void fuse_set_getcontext_func(struct fuse_context *(*func)(void));
+/** Returns the lowlevel FUSE object */
+struct fuse_ll *fuse_get_lowlevel(struct fuse *f);
+
/* ----------------------------------------------------------- *
* Compatibility stuff *
* ----------------------------------------------------------- */
#include "fuse_common.h"
+#include <utime.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/statfs.h>
-#include <utime.h>
#ifdef __cplusplus
extern "C" {
fuse_lowlevel_mt.c \
helper.c \
mount.c \
- fuse_i.h \
fuse_lowlevel_i.h
libfuse_la_LDFLAGS = -lpthread -version-number 2:3:1 \
See the file COPYING.LIB
*/
-#include "fuse_i.h"
+
+/* For pthread_rwlock_t */
+#define _GNU_SOURCE
+
+#include "fuse.h"
+#include "fuse_lowlevel.h"
#include "fuse_compat.h"
#include <stdio.h>
#include <errno.h>
#include <assert.h>
#include <stdint.h>
+#include <pthread.h>
#include <sys/param.h>
#include <sys/uio.h>
#define ENTRY_REVALIDATE_TIME 1.0 /* sec */
#define ATTR_REVALIDATE_TIME 1.0 /* sec */
+struct fuse {
+ struct fuse_ll *fll;
+ int flags;
+ struct fuse_operations op;
+ int compat;
+ struct node **name_table;
+ size_t name_table_size;
+ struct node **id_table;
+ size_t id_table_size;
+ fuse_ino_t ctr;
+ unsigned int generation;
+ unsigned int hidectr;
+ pthread_mutex_t lock;
+ pthread_rwlock_t tree_lock;
+ void *user_data;
+ uid_t uid;
+ gid_t gid;
+ mode_t umask;
+};
+
struct node {
struct node *name_next;
struct node *id_next;
fuse_getcontext = func;
}
+struct fuse_ll *fuse_get_lowlevel(struct fuse *f)
+{
+ return f->fll;
+}
+
static int begins_with(const char *s, const char *beg)
{
if (strncmp(s, beg, strlen(beg)) == 0)
+++ /dev/null
-/*
- FUSE: Filesystem in Userspace
- Copyright (C) 2001-2005 Miklos Szeredi <miklos@szeredi.hu>
-
- This program can be distributed under the terms of the GNU LGPL.
- See the file COPYING.LIB.
-*/
-
-/* For pthread_rwlock_t */
-#define _GNU_SOURCE
-
-#include "fuse.h"
-#include "fuse_lowlevel.h"
-#include <pthread.h>
-
-struct fuse {
- struct fuse_ll *fll;
- int flags;
- struct fuse_operations op;
- int compat;
- struct node **name_table;
- size_t name_table_size;
- struct node **id_table;
- size_t id_table_size;
- fuse_ino_t ctr;
- unsigned int generation;
- unsigned int hidectr;
- pthread_mutex_t lock;
- pthread_rwlock_t tree_lock;
- void *user_data;
- uid_t uid;
- gid_t gid;
- mode_t umask;
-};
-
-struct fuse *fuse_new_common(int fd, const char *opts,
- const struct fuse_operations *op,
- size_t op_size, int compat);
See the file COPYING.LIB.
*/
-#include "fuse_i.h"
+#include "fuse.h"
+#include "fuse_lowlevel.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <pthread.h>
static pthread_key_t context_key;
if (mt_create_context_key() != 0)
return -1;
- res = fuse_ll_loop_mt_proc(f->fll, mt_generic_proc, &pd);
+ res = fuse_ll_loop_mt_proc(fuse_get_lowlevel(f), mt_generic_proc, &pd);
mt_delete_context_key();
return res;
if (mt_create_context_key() != 0)
return -1;
- res = fuse_ll_loop_mt(f->fll);
+ res = fuse_ll_loop_mt(fuse_get_lowlevel(f));
mt_delete_context_key();
return res;
See the file COPYING.LIB.
*/
-#include "fuse_i.h"
+#include "fuse.h"
#include "fuse_compat.h"
#include <stdio.h>
#include <limits.h>
#include <signal.h>
+struct fuse *fuse_new_common(int fd, const char *opts,
+ const struct fuse_operations *op,
+ size_t op_size, int compat);
+
static struct fuse *fuse_instance;
static void usage(const char *progname)