summaryrefslogtreecommitdiff
path: root/src/mp3fs.c
diff options
context:
space:
mode:
authorKjetil Ørbekk <orbekk@pvv.ntnu.no>2007-12-25 01:06:12 +0100
committerKjetil Ørbekk <orbekk@pvv.ntnu.no>2007-12-25 01:06:12 +0100
commit057a40463753a55f48007d6eb21ed1afb0439208 (patch)
tree364bfd2318dc764819cd3ad5b74f6f9da7cbbcee /src/mp3fs.c
parentcdc6a068f2e8a320f8beeee5b2b950b57645325b (diff)
- Added *basic* option parsing. (So we can play with a source dir)
Diffstat (limited to 'src/mp3fs.c')
-rwxr-xr-xsrc/mp3fs.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/mp3fs.c b/src/mp3fs.c
index 1a46841..f8e4cba 100755
--- a/src/mp3fs.c
+++ b/src/mp3fs.c
@@ -1,16 +1,27 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
#define FUSE_USE_VERSION 26
+#include <stdlib.h>
#include <stdio.h>
#include <fuse.h>
+
#include "mp3_vnops.c"
+#include "mp3_opt_parse.c"
/* static struct fuse_module mp3_mod { */
/* .name = "MP3FS" */
/* }; */
+/* Just for testing the argument parsing. TODO: fix something better */
+char *sourcedir = NULL;
+
int
main(int argc, char **argv)
{
- return fuse_main (argc, argv, &mp3_oper);
+ struct fuse_args args = FUSE_ARGS_INIT (argc, argv);
+
+ if (fuse_opt_parse(&args, NULL, NULL, mp3fs_opt_proc) != 0)
+ exit (1);
+
+ return (fuse_main (args.argc, args.argv, &mp3_oper, NULL));
}