Lines 1-138
Link Here
|
1 |
--- ../fuse-2.7.0/include/fuse_common.h Mon Jul 2 13:32:15 2007 |
|
|
2 |
+++ include/fuse_common.h Wed Apr 25 18:14:26 2007 |
3 |
@@ -160,20 +160,8 @@ |
4 |
int fuse_parse_cmdline(struct fuse_args *args, char **mountpoint, |
5 |
int *multithreaded, int *foreground); |
6 |
|
7 |
-/** |
8 |
- * Go into the background |
9 |
- * |
10 |
- * @param foreground if true, stay in the foreground |
11 |
- * @return 0 on success, -1 on failure |
12 |
- */ |
13 |
-int fuse_daemonize(int foreground); |
14 |
|
15 |
-/** |
16 |
- * Get the version of the library |
17 |
- * |
18 |
- * @return the version |
19 |
- */ |
20 |
-int fuse_version(void); |
21 |
+int fuse_daemonize(int foreground); |
22 |
|
23 |
/* ----------------------------------------------------------- * |
24 |
* Signal handling * |
25 |
--- ../fuse-2.7.0/lib/helper.c Mon Jul 2 13:32:17 2007 |
26 |
+++ lib/helper.c Wed Apr 25 18:14:26 2007 |
27 |
@@ -29,7 +29,7 @@ |
28 |
struct helper_opts { |
29 |
int singlethread; |
30 |
int foreground; |
31 |
- int nodefault_subtype; |
32 |
+ int fsname; |
33 |
char *mountpoint; |
34 |
}; |
35 |
|
36 |
@@ -40,8 +40,7 @@ |
37 |
FUSE_HELPER_OPT("debug", foreground), |
38 |
FUSE_HELPER_OPT("-f", foreground), |
39 |
FUSE_HELPER_OPT("-s", singlethread), |
40 |
- FUSE_HELPER_OPT("fsname=", nodefault_subtype), |
41 |
- FUSE_HELPER_OPT("subtype=", nodefault_subtype), |
42 |
+ FUSE_HELPER_OPT("fsname=", fsname), |
43 |
|
44 |
FUSE_OPT_KEY("-h", KEY_HELP), |
45 |
FUSE_OPT_KEY("--help", KEY_HELP), |
46 |
@@ -51,7 +50,6 @@ |
47 |
FUSE_OPT_KEY("-d", FUSE_OPT_KEY_KEEP), |
48 |
FUSE_OPT_KEY("debug", FUSE_OPT_KEY_KEEP), |
49 |
FUSE_OPT_KEY("fsname=", FUSE_OPT_KEY_KEEP), |
50 |
- FUSE_OPT_KEY("subtype=", FUSE_OPT_KEY_KEEP), |
51 |
FUSE_OPT_END |
52 |
}; |
53 |
|
54 |
@@ -119,24 +117,24 @@ |
55 |
} |
56 |
} |
57 |
|
58 |
-static int add_default_subtype(const char *progname, struct fuse_args *args) |
59 |
+static int add_default_fsname(const char *progname, struct fuse_args *args) |
60 |
{ |
61 |
int res; |
62 |
- char *subtype_opt; |
63 |
+ char *fsname_opt; |
64 |
const char *basename = strrchr(progname, '/'); |
65 |
if (basename == NULL) |
66 |
basename = progname; |
67 |
else if (basename[1] != '\0') |
68 |
basename++; |
69 |
|
70 |
- subtype_opt = (char *) malloc(strlen(basename) + 64); |
71 |
- if (subtype_opt == NULL) { |
72 |
+ fsname_opt = (char *) malloc(strlen(basename) + 64); |
73 |
+ if (fsname_opt == NULL) { |
74 |
fprintf(stderr, "fuse: memory allocation failed\n"); |
75 |
return -1; |
76 |
} |
77 |
- sprintf(subtype_opt, "-osubtype=%s", basename); |
78 |
- res = fuse_opt_add_arg(args, subtype_opt); |
79 |
- free(subtype_opt); |
80 |
+ sprintf(fsname_opt, "-ofsname=%s", basename); |
81 |
+ res = fuse_opt_add_arg(args, fsname_opt); |
82 |
+ free(fsname_opt); |
83 |
return res; |
84 |
} |
85 |
|
86 |
@@ -151,8 +149,8 @@ |
87 |
if (res == -1) |
88 |
return -1; |
89 |
|
90 |
- if (!hopts.nodefault_subtype) { |
91 |
- res = add_default_subtype(args->argv[0], args); |
92 |
+ if (!hopts.fsname) { |
93 |
+ res = add_default_fsname(args->argv[0], args); |
94 |
if (res == -1) |
95 |
goto err; |
96 |
} |
97 |
@@ -331,11 +329,6 @@ |
98 |
{ |
99 |
fprintf(stderr, "fuse_main(): This function does not exist\n"); |
100 |
return -1; |
101 |
-} |
102 |
- |
103 |
-int fuse_version(void) |
104 |
-{ |
105 |
- return FUSE_VERSION; |
106 |
} |
107 |
|
108 |
#include "fuse_compat.h" |
109 |
--- ../fuse-2.7.0/lib/mount_util.c Mon Jul 2 13:32:17 2007 |
110 |
+++ lib/mount_util.c Thu May 3 13:56:37 2007 |
111 |
@@ -193,20 +193,3 @@ |
112 |
} |
113 |
return 0; |
114 |
} |
115 |
- |
116 |
-int fuse_mnt_check_fuseblk(void) |
117 |
-{ |
118 |
- char buf[256]; |
119 |
- FILE *f = fopen("/proc/filesystems", "r"); |
120 |
- if (!f) |
121 |
- return 1; |
122 |
- |
123 |
- while (fgets(buf, sizeof(buf), f)) |
124 |
- if (strstr(buf, "fuseblk\n")) { |
125 |
- fclose(f); |
126 |
- return 1; |
127 |
- } |
128 |
- |
129 |
- fclose(f); |
130 |
- return 0; |
131 |
-} |
132 |
--- ../fuse-2.7.0/lib/mount_util.h Mon Jul 2 13:32:17 2007 |
133 |
+++ lib/mount_util.h Wed May 2 16:34:03 2007 |
134 |
@@ -14,4 +14,3 @@ |
135 |
char *fuse_mnt_resolve_path(const char *progname, const char *orig); |
136 |
int fuse_mnt_check_empty(const char *progname, const char *mnt, |
137 |
mode_t rootmode, off_t rootsize); |
138 |
-int fuse_mnt_check_fuseblk(void); |