blob: c28e2e899d2db89440652c834a222135550329db [file] [log] [blame]
Miklos Szeredi85c74fc2001-10-28 19:44:14 +00001/*
2 FUSE: Filesystem in Userspace
3 Copyright (C) 2001 Miklos Szeredi (mszeredi@inf.bme.hu)
4
5 This program can be distributed under the terms of the GNU GPL.
6 See the file COPYING.
7*/
8
9#include "fuse.h"
10#include <glib.h>
11#include <stdio.h>
Miklos Szeredia181e612001-11-06 12:03:23 +000012#include <pthread.h>
Miklos Szeredi85c74fc2001-10-28 19:44:14 +000013
14#define FUSE_DEV "/proc/fs/fuse/dev"
15
16typedef unsigned long fino_t;
17
18struct node {
19 char *name;
20 fino_t parent;
Miklos Szeredi5e183482001-10-31 14:52:35 +000021 int mode;
Miklos Szeredia181e612001-11-06 12:03:23 +000022 int rdev;
23 int version;
Miklos Szeredi85c74fc2001-10-28 19:44:14 +000024};
25
26struct fuse {
Miklos Szeredia181e612001-11-06 12:03:23 +000027 int flags;
Miklos Szeredi85c74fc2001-10-28 19:44:14 +000028 char *dir;
29 int fd;
30 struct fuse_operations op;
31 GHashTable *nametab;
Miklos Szeredia181e612001-11-06 12:03:23 +000032 pthread_mutex_t lock;
Miklos Szeredi85c74fc2001-10-28 19:44:14 +000033};
34
Miklos Szeredia181e612001-11-06 12:03:23 +000035struct fuse_dirhandle {
Miklos Szeredi85c74fc2001-10-28 19:44:14 +000036 struct fuse *fuse;
37 fino_t dir;
38 FILE *fp;
39};