From 057a40463753a55f48007d6eb21ed1afb0439208 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kjetil=20=C3=98rbekk?= Date: Tue, 25 Dec 2007 01:06:12 +0100 Subject: - Added *basic* option parsing. (So we can play with a source dir) --- src/mp3fs.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/mp3fs.c') 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 #include #include + #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)); } -- cgit v1.2.3