aboutsummaryrefslogtreecommitdiff
path: root/lib/fuse_i.h
blob: 263ebe25383f011796c0049054715a20d8e0b1b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
    FUSE: Filesystem in Userspace
    Copyright (C) 2001  Miklos Szeredi (mszeredi@inf.bme.hu)

    This program can be distributed under the terms of the GNU GPL.
    See the file COPYING.
*/

#include "fuse.h"
#include <stdio.h>
#include <pthread.h>

#define FUSE_DEV "/proc/fs/fuse/dev"

typedef unsigned long fino_t;

struct node {
    struct node *name_next;
    struct node *ino_next;
    fino_t ino;
    fino_t parent;
    char *name;
    int mode;
    int rdev;
    int version;
};

struct fuse {
    int flags;
    char *mnt;
    mode_t rootmode;
    int fd;
    struct fuse_operations op;
    struct node **name_table;
    size_t name_table_size;
    struct node **ino_table;
    size_t ino_table_size;
    fino_t ctr;
    pthread_mutex_t lock;
};

struct fuse_dirhandle {
    struct fuse *fuse;
    fino_t dir;
    FILE *fp;
};