Check-in [a7e9dac6ce]
Overview
Comment:Added start of supplying default options
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tcl-ops
Files: files | file ages | folders
SHA1: a7e9dac6ce2fe460d5987029755bd7b53e419444
User & Date: rkeene on 2014-11-07 06:47:34
Other Links: branch diff | manifest | tags
Context
2014-11-07
06:48
More work towards adding support for automatic options check-in: 317348f60e user: rkeene tags: tcl-ops
06:47
Added start of supplying default options check-in: a7e9dac6ce user: rkeene tags: tcl-ops
06:14
Added comments check-in: 83dcb7cd52 user: rkeene tags: tcl-ops
Changes

Modified appfsd.c from [616c3164a5] to [71ddae3095].

714
715
716
717
718
719
720
721

722
723
724
725
726
727
728
729
730
731
732
733

734
735
736
737
738
739
740
714
715
716
717
718
719
720

721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741







-
+












+








	return(TCL_OK);
}

/*
 * FUSE operations structure
 */
static struct fuse_operations appfs_oper = {
static struct fuse_operations appfs_operations = {
	.getattr   = appfs_fuse_getattr,
	.readdir   = appfs_fuse_readdir,
	.readlink  = appfs_fuse_readlink,
	.open      = appfs_fuse_open,
	.release   = appfs_fuse_close,
	.read      = appfs_fuse_read
};

/*
 * Entry point into this program.
 */
int main(int argc, char **argv) {
	struct fuse_args args = FUSE_ARGS_INIT(argc, argv);
	const char *cachedir = APPFS_CACHEDIR;
	int pthread_ret;

	/*
	 * Set global variables, these should be configuration options.
	 */
	globalThread.cachedir = cachedir;
777
778
779
780
781
782
783






784
785
786
787
788

789
790
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794

795
796
797







+
+
+
+
+
+




-
+


	 * Tcl mode, for running raw Tcl in the same environment AppFSd would
	 * run code.
	 */
	if (argc == 3 && strcmp(argv[1], "-tcl") == 0) {
		return(appfs_tcl(argv[2]));
	}

	/*
	 * Add FUSE arguments which we always supply
	 */
	fuse_opt_parse(&args, NULL, NULL, NULL);
	fuse_opt_add_arg(&args, "-odefault_permissions,fsname=appfs,use_ino,kernel_cache,entry_timeout=60,attr_timeout=3600,intr,big_writes");

	/*
	 * Enter the FUSE main loop -- this will process any arguments
	 * and start servicing requests.
	 */
	return(fuse_main(argc, argv, &appfs_oper, NULL));
	return(fuse_main(args.argc, args.argv, &appfs_operations, NULL));
}