Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 316 lines (279 sloc) 10.892 kb
4d4d90b3 »
2012-09-23 o More legalese
1 // Folve - A fuse filesystem that convolves audio files on-the-fly.
2 //
98a57256 »
2012-09-08 o Start implementation. Just a basic forwarding filesystem for
3 // Copyright (C) 2012 Henner Zeller <h.zeller@acm.org>
1bce6345 »
2012-09-24 o Remove some trailing whitespaces
4 //
98a57256 »
2012-09-08 o Start implementation. Just a basic forwarding filesystem for
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18 // Use latest version.
19 #define FUSE_USE_VERSION 26
49a4cd94 »
2012-09-25 o Provide an INSTALL.md that explains how to compile on older systems.
20 #include <fuse/fuse.h>
a9d3e538 »
2012-09-15 o Found a project name: "Folve". Some renamings because of that.
21
98a57256 »
2012-09-08 o Start implementation. Just a basic forwarding filesystem for
22 #include <dirent.h>
23 #include <errno.h>
b6988530 »
2012-09-15 o README updates.
24 #include <fcntl.h>
98a57256 »
2012-09-08 o Start implementation. Just a basic forwarding filesystem for
25 #include <limits.h>
b6988530 »
2012-09-15 o README updates.
26 #include <stdio.h>
98a57256 »
2012-09-08 o Start implementation. Just a basic forwarding filesystem for
27 #include <stdlib.h>
b6988530 »
2012-09-15 o README updates.
28 #include <string.h>
29 #include <sys/stat.h>
30 #include <sys/time.h>
49eca7f9 »
2012-09-16 o add syslog as preparation for parameter handling.
31 #include <syslog.h>
b6988530 »
2012-09-15 o README updates.
32 #include <unistd.h>
ec3ae891 »
2012-10-05 o Print out version string of used libraries.
33 #include <sndfile.h> // for sf_version_string
98a57256 »
2012-09-08 o Start implementation. Just a basic forwarding filesystem for
34
a9d3e538 »
2012-09-15 o Found a project name: "Folve". Some renamings because of that.
35 #include "folve-filesystem.h"
8d1fbe7c »
2012-09-13 o Move fuse-convolve.c to fuse-convolve.cc. Make filter-interface
36 #include "status-server.h"
7689c9a8 »
2012-09-22 o preparation to extract classes from folve-filesystem into their
37 #include "util.h"
e9c07dd6 »
2012-09-08 o add documentation
38
6c6dedb8 »
2012-09-16 o Some readme tweaks and readability improvements.
39 // Compilation unit variables to communicate with the fuse callbacks.
27c44cd1 »
2012-09-17 o Use fuse option handling to extract our flags and options.
40 static struct FolveRuntime {
a372a03d »
2012-09-22 o Make meta-refresh configurable.
41 FolveRuntime() : fs(NULL), mount_point(NULL),
fa525eec »
2012-09-22 o If we find problems in the options, complain and exit.
42 status_port(-1), refresh_time(10), parameter_error(false) {}
0330f769 »
2012-09-16 o Only start status server after we're daemonized, otherwise
43 FolveFilesystem *fs;
27c44cd1 »
2012-09-17 o Use fuse option handling to extract our flags and options.
44 const char *mount_point;
0330f769 »
2012-09-16 o Only start status server after we're daemonized, otherwise
45 int status_port;
a372a03d »
2012-09-22 o Make meta-refresh configurable.
46 int refresh_time;
fa525eec »
2012-09-22 o If we find problems in the options, complain and exit.
47 bool parameter_error;
ee675fea »
2012-09-17 o Provide a way to select between different filter diretories.
48 } folve_rt;
98a57256 »
2012-09-08 o Start implementation. Just a basic forwarding filesystem for
49
7c7bda6f »
2012-09-10 o attempt to create a sndfile for every file, if that fails, fall
50 static char *concat_path(char *buf, const char *a, const char *b) {
51 strcpy(buf, a);
52 strcat(buf, b);
53 return buf;
54 }
55
98a57256 »
2012-09-08 o Start implementation. Just a basic forwarding filesystem for
56 // Given a relative path from the root of the mounted file-system, get the
57 // original file from the source filesystem.
58 static const char *assemble_orig_path(char *buf, const char *path) {
08bbf282 »
2012-09-21 o First shot at gapless. Works pretty well for my test-case.
59 return concat_path(buf, folve_rt.fs->underlying_dir().c_str(), path);
98a57256 »
2012-09-08 o Start implementation. Just a basic forwarding filesystem for
60 }
61
7c7bda6f »
2012-09-10 o attempt to create a sndfile for every file, if that fails, fall
62 // Essentially lstat(). Just forward to the original filesystem (this
73093dcf »
2012-09-08 o Keep open file-descriptor.
63 // will by lying: our convolved files are of different size...)
0330f769 »
2012-09-16 o Only start status server after we're daemonized, otherwise
64 static int folve_getattr(const char *path, struct stat *stbuf) {
9a8ea565 »
2012-09-12 o add infrastructure to provide Stat() output of currently open
65 // If this is a currently open filename, we might be able to output a better
66 // estimate.
ee675fea »
2012-09-17 o Provide a way to select between different filter diretories.
67 int result = folve_rt.fs->StatByFilename(path, stbuf);
369a0a71 »
2012-09-20 o Writing is not possible. Show permissions as readonly.
68 if (result != 0) {
69 char path_buf[PATH_MAX];
70 result = lstat(assemble_orig_path(path_buf, path), stbuf);
71 if (result == -1)
72 return -errno;
73 }
74 // Whatever write mode was there before: now things are readonly.
75 stbuf->st_mode &= ~(S_IWUSR | S_IWGRP | S_IWOTH);
98a57256 »
2012-09-08 o Start implementation. Just a basic forwarding filesystem for
76 return 0;
77 }
78
73093dcf »
2012-09-08 o Keep open file-descriptor.
79 // readdir(). Just forward to original filesystem.
0330f769 »
2012-09-16 o Only start status server after we're daemonized, otherwise
80 static int folve_readdir(const char *path, void *buf, fuse_fill_dir_t filler,
81 off_t offset, struct fuse_file_info *fi) {
98a57256 »
2012-09-08 o Start implementation. Just a basic forwarding filesystem for
82 DIR *dp;
83 struct dirent *de;
84 char path_buf[PATH_MAX];
85
86 dp = opendir(assemble_orig_path(path_buf, path));
87 if (dp == NULL)
88 return -errno;
89
bf030afb »
2012-09-29 o use readdir_r() - looks like readdir is indeed not really multi-thread
90 // Entry size is a bit shaky to calculate, but this should be the upper bound.
91 const size_t entry_size = sizeof(struct dirent) + PATH_MAX;
92 struct dirent *entry_buf = (struct dirent *) malloc(entry_size);
93
94 while (readdir_r(dp, entry_buf, &de) == 0 && de != NULL) {
98a57256 »
2012-09-08 o Start implementation. Just a basic forwarding filesystem for
95 struct stat st;
96 memset(&st, 0, sizeof(st));
97 st.st_ino = de->d_ino;
98 st.st_mode = de->d_type << 12;
7c7bda6f »
2012-09-10 o attempt to create a sndfile for every file, if that fails, fall
99 const char *entry_name = de->d_name;
100 if (filler(buf, entry_name, &st, 0))
98a57256 »
2012-09-08 o Start implementation. Just a basic forwarding filesystem for
101 break;
102 }
bf030afb »
2012-09-29 o use readdir_r() - looks like readdir is indeed not really multi-thread
103 free(entry_buf);
98a57256 »
2012-09-08 o Start implementation. Just a basic forwarding filesystem for
104
105 closedir(dp);
106 return 0;
107 }
108
73093dcf »
2012-09-08 o Keep open file-descriptor.
109 // readlink(): forward to original filesystem.
0330f769 »
2012-09-16 o Only start status server after we're daemonized, otherwise
110 static int folve_readlink(const char *path, char *buf, size_t size) {
98a57256 »
2012-09-08 o Start implementation. Just a basic forwarding filesystem for
111 char path_buf[PATH_MAX];
112 const int result = readlink(assemble_orig_path(path_buf, path),
113 buf, size - 1);
114 if (result == -1)
115 return -errno;
116
117 buf[result] = '\0';
118 return 0;
119 }
120
0330f769 »
2012-09-16 o Only start status server after we're daemonized, otherwise
121 static int folve_open(const char *path, struct fuse_file_info *fi) {
8b18938f »
2012-09-09 o some comment changes. Ready to do some flac handling.
122 // We want to be allowed to only return part of the requested data in read().
123 // That way, we can separate reading the ID3-tags from
124 // decoding of the music stream - that way indexing should be fast.
125 // Setting the flag 'direct_io' allows us to return partial results.
126 fi->direct_io = 1;
127
e9c07dd6 »
2012-09-08 o add documentation
128 // The file-handle has the neat property to be 64 bit - so we can actually
b6988530 »
2012-09-15 o README updates.
129 // stuff a pointer to our file handler object in there :)
8b18938f »
2012-09-09 o some comment changes. Ready to do some flac handling.
130 // (Yay, someone was thinking while developing that API).
08bbf282 »
2012-09-21 o First shot at gapless. Works pretty well for my test-case.
131 FileHandler *handler = folve_rt.fs->GetOrCreateHandler(path);
680f5909 »
2012-09-13 o report opening error.
132 if (handler == NULL)
133 return -errno;
134 fi->fh = (uint64_t) handler;
135 return 0;
98a57256 »
2012-09-08 o Start implementation. Just a basic forwarding filesystem for
136 }
137
0330f769 »
2012-09-16 o Only start status server after we're daemonized, otherwise
138 static int folve_read(const char *path, char *buf, size_t size, off_t offset,
139 struct fuse_file_info *fi) {
8d1fbe7c »
2012-09-13 o Move fuse-convolve.c to fuse-convolve.cc. Make filter-interface
140 return reinterpret_cast<FileHandler *>(fi->fh)->Read(buf, size, offset);
98a57256 »
2012-09-08 o Start implementation. Just a basic forwarding filesystem for
141 }
142
0330f769 »
2012-09-16 o Only start status server after we're daemonized, otherwise
143 static int folve_release(const char *path, struct fuse_file_info *fi) {
ee675fea »
2012-09-17 o Provide a way to select between different filter diretories.
144 folve_rt.fs->Close(path, reinterpret_cast<FileHandler *>(fi->fh));
8d1fbe7c »
2012-09-13 o Move fuse-convolve.c to fuse-convolve.cc. Make filter-interface
145 return 0;
9a8ea565 »
2012-09-12 o add infrastructure to provide Stat() output of currently open
146 }
147
0330f769 »
2012-09-16 o Only start status server after we're daemonized, otherwise
148 static int folve_fgetattr(const char *path, struct stat *result,
149 struct fuse_file_info *fi) {
8d1fbe7c »
2012-09-13 o Move fuse-convolve.c to fuse-convolve.cc. Make filter-interface
150 return reinterpret_cast<FileHandler *>(fi->fh)->Stat(result);
73093dcf »
2012-09-08 o Keep open file-descriptor.
151 }
98a57256 »
2012-09-08 o Start implementation. Just a basic forwarding filesystem for
152
0330f769 »
2012-09-16 o Only start status server after we're daemonized, otherwise
153 static void *folve_init(struct fuse_conn_info *conn) {
154 const int ident_len = 20;
155 char *ident = (char*) malloc(ident_len); // openlog() keeps reference. Leaks.
27c44cd1 »
2012-09-17 o Use fuse option handling to extract our flags and options.
156 snprintf(ident, ident_len, "folve[%d]", getpid());
0330f769 »
2012-09-16 o Only start status server after we're daemonized, otherwise
157 openlog(ident, LOG_CONS|LOG_PERROR, LOG_USER);
ec3ae891 »
2012-10-05 o Print out version string of used libraries.
158 syslog(LOG_INFO, "Version " FOLVE_VERSION " started "
159 "(with fuse=%d.%d; sndfile=%s). ",
160 FUSE_MAJOR_VERSION, FUSE_MINOR_VERSION, sf_version_string());
161 syslog(LOG_INFO, "Serving '%s' on mount point '%s'",
ee675fea »
2012-09-17 o Provide a way to select between different filter diretories.
162 folve_rt.fs->underlying_dir().c_str(), folve_rt.mount_point);
7689c9a8 »
2012-09-22 o preparation to extract classes from folve-filesystem into their
163 if (folve::IsDebugLogEnabled()) {
5830c5a6 »
2012-09-17 o Switch logging to syslog()
164 syslog(LOG_INFO, "Debug logging enabled (-D)");
165 }
0330f769 »
2012-09-16 o Only start status server after we're daemonized, otherwise
166
ee675fea »
2012-09-17 o Provide a way to select between different filter diretories.
167 if (folve_rt.status_port > 0) {
0330f769 »
2012-09-16 o Only start status server after we're daemonized, otherwise
168 // Need to start status server after we're daemonized.
ee675fea »
2012-09-17 o Provide a way to select between different filter diretories.
169 StatusServer *status_server = new StatusServer(folve_rt.fs);
170 if (status_server->Start(folve_rt.status_port)) {
a372a03d »
2012-09-22 o Make meta-refresh configurable.
171 syslog(LOG_INFO, "HTTP status server on port %d; refresh=%d",
172 folve_rt.status_port, folve_rt.refresh_time);
173 status_server->set_meta_refresh(folve_rt.refresh_time);
0330f769 »
2012-09-16 o Only start status server after we're daemonized, otherwise
174 } else {
175 syslog(LOG_ERR, "Couldn't start HTTP server on port %d\n",
ee675fea »
2012-09-17 o Provide a way to select between different filter diretories.
176 folve_rt.status_port);
0330f769 »
2012-09-16 o Only start status server after we're daemonized, otherwise
177 }
178 }
ee675fea »
2012-09-17 o Provide a way to select between different filter diretories.
179
a90d9224 »
2012-10-04 o Separate sanitizing of config subdirectories.
180 folve_rt.fs->SetupInitialConfig();
0330f769 »
2012-09-16 o Only start status server after we're daemonized, otherwise
181 return NULL;
182 }
98a57256 »
2012-09-08 o Start implementation. Just a basic forwarding filesystem for
183
0a3400db »
2012-09-16 o Write when we're exiting.
184 static void folve_destroy(void *) {
db66f7df »
2012-09-17 o print which directory is serviced.
185 syslog(LOG_INFO, "Exiting.");
0a3400db »
2012-09-16 o Write when we're exiting.
186 }
187
b6988530 »
2012-09-15 o README updates.
188 static int usage(const char *prg) {
8fb28ec7 »
2012-09-24 Making README.md more readable thanks to wordsmithing input from
189 printf("usage: %s [options] <original-dir> <mount-point-dir>\n", prg);
5830c5a6 »
2012-09-17 o Switch logging to syslog()
190 printf("Options: (in sequence of usefulness)\n"
31096bbf »
2012-10-04 o remove option -c and add -C: give a base directory for all filters.
191 "\t-C <cfg-dir> : Convolver base configuration directory.\n"
192 "\t Sub-directories name the different filters.\n"
1971a4a2 »
2012-09-23 o No more radio buttons.
193 "\t Select on the HTTP status page.\n"
5830c5a6 »
2012-09-17 o Switch logging to syslog()
194 "\t-p <port> : Port to run the HTTP status server on.\n"
436f57d8 »
2012-09-22 o Have a default refresh time of 10 seconds.
195 "\t-r <refresh> : Seconds between refresh of status page;\n"
196 "\t Default is %d seconds; switch off with -1.\n"
f9b9bc9d »
2012-09-21 o gapless not experimental anymore.
197 "\t-g : Gapless convolving alphabetically adjacent files.\n"
20e139ca »
2012-09-24 o Less cluttered output in UI if -D is not set.
198 "\t-D : Moderate volume Folve debug messages to syslog,\n"
199 "\t and some more detailed configuration info in UI\n"
5830c5a6 »
2012-09-17 o Switch logging to syslog()
200 "\t-f : Operate in foreground; useful for debugging.\n"
8fb28ec7 »
2012-09-24 Making README.md more readable thanks to wordsmithing input from
201 "\t-o <mnt-opt> : other generic mount parameters passed to FUSE.\n"
202 "\t-d : High volume FUSE debug log. Implies -f.\n",
436f57d8 »
2012-09-22 o Have a default refresh time of 10 seconds.
203 folve_rt.refresh_time);
8b18938f »
2012-09-09 o some comment changes. Ready to do some flac handling.
204 return 1;
98a57256 »
2012-09-08 o Start implementation. Just a basic forwarding filesystem for
205 }
206
27c44cd1 »
2012-09-17 o Use fuse option handling to extract our flags and options.
207 struct FolveConfig {
208 FolveConfig() : base_dir(NULL), config_dir(NULL), port(-1) {}
209 const char *base_dir;
210 const char *mount_point;
211 const char *config_dir;
212 int port;
213 };
214
215 enum {
216 FOLVE_OPT_PORT = 42,
a372a03d »
2012-09-22 o Make meta-refresh configurable.
217 FOLVE_OPT_REFRESH_TIME,
27c44cd1 »
2012-09-17 o Use fuse option handling to extract our flags and options.
218 FOLVE_OPT_CONFIG,
5830c5a6 »
2012-09-17 o Switch logging to syslog()
219 FOLVE_OPT_DEBUG,
08bbf282 »
2012-09-21 o First shot at gapless. Works pretty well for my test-case.
220 FOLVE_OPT_GAPLESS,
27c44cd1 »
2012-09-17 o Use fuse option handling to extract our flags and options.
221 };
222
223 int FolveOptionHandling(void *data, const char *arg, int key,
224 struct fuse_args *outargs) {
df18f637 »
2012-09-22 o Make path-names to filters and base-directory absolute
225 char realpath_buf[PATH_MAX]; // running as daemon, need absolute names.
ee675fea »
2012-09-17 o Provide a way to select between different filter diretories.
226 FolveRuntime *rt = (FolveRuntime*) data;
27c44cd1 »
2012-09-17 o Use fuse option handling to extract our flags and options.
227 switch (key) {
228 case FUSE_OPT_KEY_NONOPT:
ee675fea »
2012-09-17 o Provide a way to select between different filter diretories.
229 // First non-opt: our underlying dir.
230 if (rt->fs->underlying_dir().empty()) {
cf1b0e09 »
2012-09-22 o README demo tweaking
231 const char *base_dir = realpath(arg, realpath_buf);
232 if (base_dir != NULL) {
233 rt->fs->set_underlying_dir(base_dir);
234 } else {
235 fprintf(stderr, "Invalid base path '%s': %s\n",
236 arg, strerror(errno));
fa525eec »
2012-09-22 o If we find problems in the options, complain and exit.
237 rt->parameter_error = true;
cf1b0e09 »
2012-09-22 o README demo tweaking
238 }
ee675fea »
2012-09-17 o Provide a way to select between different filter diretories.
239 return 0; // we consumed this.
27c44cd1 »
2012-09-17 o Use fuse option handling to extract our flags and options.
240 } else {
ee675fea »
2012-09-17 o Provide a way to select between different filter diretories.
241 rt->mount_point = strdup(arg); // remmber as FYI
242 return 1; // .. but leave it to fuse
27c44cd1 »
2012-09-17 o Use fuse option handling to extract our flags and options.
243 }
244 case FOLVE_OPT_PORT:
ee675fea »
2012-09-17 o Provide a way to select between different filter diretories.
245 rt->status_port = atoi(arg + 2); // strip "-p"
27c44cd1 »
2012-09-17 o Use fuse option handling to extract our flags and options.
246 return 0;
a372a03d »
2012-09-22 o Make meta-refresh configurable.
247 case FOLVE_OPT_REFRESH_TIME:
248 rt->refresh_time = atoi(arg + 2); // strip "-r"
249 return 0;
cf1b0e09 »
2012-09-22 o README demo tweaking
250 case FOLVE_OPT_CONFIG: {
31096bbf »
2012-10-04 o remove option -c and add -C: give a base directory for all filters.
251 const char *config_dir = realpath(arg + 2, realpath_buf); // strip "-C"
cf1b0e09 »
2012-09-22 o README demo tweaking
252 if (config_dir != NULL) {
31096bbf »
2012-10-04 o remove option -c and add -C: give a base directory for all filters.
253 rt->fs->SetBaseConfigDir(config_dir);
cf1b0e09 »
2012-09-22 o README demo tweaking
254 } else {
255 fprintf(stderr, "Invalid config dir '%s': %s\n",
256 arg + 2, strerror(errno));
fa525eec »
2012-09-22 o If we find problems in the options, complain and exit.
257 rt->parameter_error = true;
cf1b0e09 »
2012-09-22 o README demo tweaking
258 }
27c44cd1 »
2012-09-17 o Use fuse option handling to extract our flags and options.
259 return 0;
cf1b0e09 »
2012-09-22 o README demo tweaking
260 }
5830c5a6 »
2012-09-17 o Switch logging to syslog()
261 case FOLVE_OPT_DEBUG:
537e34b8 »
2012-09-23 o cleanup UI: no radio buttons anymore, just simple links.
262 // rt->fs->set_debug_ui_enabled(true); // Disabled in status-server.
7689c9a8 »
2012-09-22 o preparation to extract classes from folve-filesystem into their
263 folve::EnableDebugLog(true);
5830c5a6 »
2012-09-17 o Switch logging to syslog()
264 return 0;
08bbf282 »
2012-09-21 o First shot at gapless. Works pretty well for my test-case.
265 case FOLVE_OPT_GAPLESS:
266 rt->fs->set_gapless_processing(true);
267 return 0;
27c44cd1 »
2012-09-17 o Use fuse option handling to extract our flags and options.
268 }
269 return 1;
270 }
271
98a57256 »
2012-09-08 o Start implementation. Just a basic forwarding filesystem for
272 int main(int argc, char *argv[]) {
1e9ff217 »
2012-09-15 o main: report if parameters are not directories.
273 const char *progname = argv[0];
8b18938f »
2012-09-09 o some comment changes. Ready to do some flac handling.
274 if (argc < 4) {
1e9ff217 »
2012-09-15 o main: report if parameters are not directories.
275 return usage(progname);
98a57256 »
2012-09-08 o Start implementation. Just a basic forwarding filesystem for
276 }
49eca7f9 »
2012-09-16 o add syslog as preparation for parameter handling.
277
ee675fea »
2012-09-17 o Provide a way to select between different filter diretories.
278 folve_rt.fs = new FolveFilesystem();
279
27c44cd1 »
2012-09-17 o Use fuse option handling to extract our flags and options.
280 static struct fuse_opt folve_options[] = {
5830c5a6 »
2012-09-17 o Switch logging to syslog()
281 FUSE_OPT_KEY("-p ", FOLVE_OPT_PORT),
a372a03d »
2012-09-22 o Make meta-refresh configurable.
282 FUSE_OPT_KEY("-r ", FOLVE_OPT_REFRESH_TIME),
31096bbf »
2012-10-04 o remove option -c and add -C: give a base directory for all filters.
283 FUSE_OPT_KEY("-C ", FOLVE_OPT_CONFIG),
5830c5a6 »
2012-09-17 o Switch logging to syslog()
284 FUSE_OPT_KEY("-D", FOLVE_OPT_DEBUG),
08bbf282 »
2012-09-21 o First shot at gapless. Works pretty well for my test-case.
285 FUSE_OPT_KEY("-g", FOLVE_OPT_GAPLESS),
cca212e5 »
2012-09-24 o document compile error with old version of fuse.
286 FUSE_OPT_END // This fails to compile for fuse <= 2.8.1; get >= 2.8.4
27c44cd1 »
2012-09-17 o Use fuse option handling to extract our flags and options.
287 };
288 struct fuse_args args = FUSE_ARGS_INIT(argc, argv);
ee675fea »
2012-09-17 o Provide a way to select between different filter diretories.
289 fuse_opt_parse(&args, &folve_rt, folve_options, FolveOptionHandling);
27c44cd1 »
2012-09-17 o Use fuse option handling to extract our flags and options.
290
fa525eec »
2012-09-22 o If we find problems in the options, complain and exit.
291 if (folve_rt.parameter_error || !folve_rt.fs->CheckInitialized()) {
1e9ff217 »
2012-09-15 o main: report if parameters are not directories.
292 return usage(progname);
293 }
0330f769 »
2012-09-16 o Only start status server after we're daemonized, otherwise
294
295 struct fuse_operations folve_operations;
296 memset(&folve_operations, 0, sizeof(folve_operations));
8d1fbe7c »
2012-09-13 o Move fuse-convolve.c to fuse-convolve.cc. Make filter-interface
297
0a3400db »
2012-09-16 o Write when we're exiting.
298 // Start/stop. Will write to syslog and start auxiliary http service.
0330f769 »
2012-09-16 o Only start status server after we're daemonized, otherwise
299 folve_operations.init = folve_init;
0a3400db »
2012-09-16 o Write when we're exiting.
300 folve_operations.destroy = folve_destroy;
8d1fbe7c »
2012-09-13 o Move fuse-convolve.c to fuse-convolve.cc. Make filter-interface
301
302 // Basic operations to make navigation work.
0330f769 »
2012-09-16 o Only start status server after we're daemonized, otherwise
303 folve_operations.readdir = folve_readdir;
304 folve_operations.readlink = folve_readlink;
8d1fbe7c »
2012-09-13 o Move fuse-convolve.c to fuse-convolve.cc. Make filter-interface
305
306 // open() and close() file.
38cdeb1a »
2012-09-20 o whitespace changes.
307 folve_operations.open = folve_open;
0330f769 »
2012-09-16 o Only start status server after we're daemonized, otherwise
308 folve_operations.release = folve_release;
8d1fbe7c »
2012-09-13 o Move fuse-convolve.c to fuse-convolve.cc. Make filter-interface
309
310 // Actual workhorse: reading a file and returning predicted file-size
0330f769 »
2012-09-16 o Only start status server after we're daemonized, otherwise
311 folve_operations.read = folve_read;
312 folve_operations.fgetattr = folve_fgetattr;
313 folve_operations.getattr = folve_getattr;
98a57256 »
2012-09-08 o Start implementation. Just a basic forwarding filesystem for
314
27c44cd1 »
2012-09-17 o Use fuse option handling to extract our flags and options.
315 return fuse_main(args.argc, args.argv, &folve_operations, NULL);
98a57256 »
2012-09-08 o Start implementation. Just a basic forwarding filesystem for
316 }
Something went wrong with that request. Please try again.