-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmfs-mount.h
42 lines (33 loc) · 1.08 KB
/
mfs-mount.h
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
#ifndef MOCKFS_MFS_MOUNT_H_H
#define MOCKFS_MFS_MOUNT_H_H
#define FUSE_USE_VERSION 26
#define _XOPEN_SOURCE 500
#include <fuse.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <sqlite3.h>
#endif //MOCKFS_MFS_MOUNT_H_H
struct inode lookup_inode(char *dir, struct inode *parent_inode);
struct inode get_inode_from_path(const char *path);
static int mfs_fuse_getattr(const char *path, struct stat *stbuf);
static int mfs_fuse_readdir(const char *path, void *buf, fuse_fill_dir_t filler,
off_t offset, struct fuse_file_info *fi);
static int mfs_fuse_open(const char *path, struct fuse_file_info *fi);
static int mfs_fuse_read(const char *path, char *buf, size_t size, off_t offset,
struct fuse_file_info *fi);
void get_inodes_from_dir(struct inode *items, __ino_t id);
struct inode {
__ino_t id;
__ino_t pid;
char name[255];
__mode_t st_mode;
__uid_t st_uid;
__gid_t st_gid;
__off_t st_size;
__time_t st_atime;
__time_t st_mtime;
__time_t st_ctime;
};