forked from piuma/limit-fs
-
Notifications
You must be signed in to change notification settings - Fork 2
/
logfs_functions.h
49 lines (30 loc) · 1.5 KB
/
logfs_functions.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
43
44
45
46
47
48
49
#ifndef LOGFS_LOGFS_FUNCTIONS_H
#define LOGFS_LOGFS_FUNCTIONS_H
#include "logfs_structures.h"
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <assert.h>
#include <stdlib.h>
#include <zconf.h>
static void *logfs_init(struct fuse_conn_info *conn, struct fuse_config *cfg);
static int logfs_access(const char *path, int mask);
static int logfs_getattr(const char *path, struct stat *stbuf, struct fuse_file_info *fi);
static int logfs_readdir(const char *path, void *buf, fuse_fill_dir_t filler,off_t offset,
struct fuse_file_info *fi, enum fuse_readdir_flags flags);
static int logfs_rmdir(const char *path);
static int logfs_unlink(const char *path);
DIR *openDirAt(int dirFileDescriptor,char const *path,int extraFlags);
static int logfs_opendir(const char *path,struct fuse_file_info *fi);
static int logfs_mkdir(const char *path, mode_t mode);
static int logfs_open(const char *path, struct fuse_file_info *fi);
static int logfs_read_buf(const char *path, struct fuse_bufvec **bufpointer,
size_t size, off_t offset, struct fuse_file_info *fi);
static int logfs_create(const char *path, mode_t mode, struct fuse_file_info *fi);
static int logfs_write_buf(const char *path, struct fuse_bufvec *buf,
off_t offset, struct fuse_file_info *fi);
static void showHelp(const char *progname);
static void show_version(const char *progname);
void logfs_log_to_file(int operationID, const char *operand, char filePath[]);
#endif //LOGFS_LOGFS_FUNCTIONS_H