-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrdiff-backup-fs.c
51 lines (38 loc) · 1.04 KB
/
rdiff-backup-fs.c
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
50
51
#include "headers.h"
#include "externs.h"
#include "parse.h"
#include "initialize.h"
char *mount = NULL;
char *tmp_dir = NULL;
char *data_dir = NULL;
int structure = STRUCTURE_NECESSARY;
int layout = LAYOUT_ALL;
int debug = 0;
char *fuse_options = 0;
int fuse_options_size = 0;
struct fuse_operations operations;
struct file_system_info *file_system_info;
int run(int argc, char **argv){
char **args;
int options_count = 0;
file_system_info = single(struct file_system_info);
file_system_info->rev_dir_time = REV_GMT_TIME;
parse(file_system_info, argc, argv);
initialize(file_system_info);
args = calloc(3 + 2, sizeof(char *));
args[0] = argv[0];
args[1] = mount;
options_count = 2;
if (debug){
args[options_count] = "-d";
options_count++;
}
if (fuse_options){
args[options_count] = fuse_options;
options_count++;
}
return fuse_main(options_count, args, &operations, NULL);
};
int main(int argc, char** argv){
return run(argc, argv);
};