Overview
Comment: | Updated to create a Tcl interpreter at startup before starting FUSE loop to catch Tcl errors early |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | tcl-ops |
Files: | files | file ages | folders |
SHA1: |
3c900017015165d4bbe10e188fa67c7b |
User & Date: | rkeene on 2014-11-09 02:09:55 |
Other Links: | branch diff | manifest | tags |
Context
2014-11-09
| ||
02:13 | Updated to create directory to store local file check-in: f2d710b7dc user: rkeene tags: tcl-ops | |
02:09 | Updated to create a Tcl interpreter at startup before starting FUSE loop to catch Tcl errors early check-in: 3c90001701 user: rkeene tags: tcl-ops | |
2014-11-08
| ||
19:33 | Removed SQLite dependency check-in: d74c945fc0 user: rkeene tags: tcl-ops | |
Changes
Modified appfsd.c from [c5ca9c2598] to [ade95f924e].
︙ | |||
80 81 82 83 84 85 86 | 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 | - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | } symlink; } typeinfo; }; /* * Create a new Tcl interpreter and completely initialize it */ |
︙ | |||
187 188 189 190 191 192 193 | 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 | - + | */ static Tcl_Interp *appfs_TclInterp(void) { Tcl_Interp *interp; int pthread_ret; interp = pthread_getspecific(interpKey); if (interp == NULL) { |
︙ | |||
730 731 732 733 734 735 736 | 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 | - + | * SQLite3 mode: Execute raw SQL and return success or failure */ static int appfs_sqlite3(const char *sql) { Tcl_Interp *interp; const char *sql_ret; int tcl_ret; |
︙ | |||
761 762 763 764 765 766 767 | 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 | - + | * Tcl mode: Execute raw Tcl and return success or failure */ static int appfs_tcl(const char *tcl) { Tcl_Interp *interp; const char *tcl_result; int tcl_ret; |
︙ | |||
837 838 839 840 841 842 843 844 845 846 847 848 849 850 | 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 | + + | return(1); } /* * Entry point into this program. */ int main(int argc, char **argv) { Tcl_Interp *test_interp; char *test_interp_error; struct fuse_args args = FUSE_ARGS_INIT(argc, argv); int pthread_ret; /* * Skip passed program name */ if (argc == 0 || argv == NULL) { |
︙ | |||
920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 | 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 | + + + + + + + + + + + + + + + + + | fuse_opt_add_arg(&args, "-odefault_permissions,fsname=appfs,subtype=appfsd,use_ino,kernel_cache,entry_timeout=60,attr_timeout=3600,intr,big_writes"); if (getuid() == 0) { fuse_opt_parse(&args, NULL, NULL, NULL); fuse_opt_add_arg(&args, "-oallow_other"); } /* * Create a Tcl interpreter just to verify that things are in working * order before we become a daemon. */ test_interp = appfs_create_TclInterp(&test_interp_error); if (test_interp == NULL) { if (test_interp_error == NULL) { test_interp_error = "Unknown error"; } fprintf(stderr, "Unable to initialize Tcl interpreter for AppFSd:\n"); fprintf(stderr, "%s", test_interp_error); return(1); } Tcl_DeleteInterp(test_interp); /* * Enter the FUSE main loop -- this will process any arguments * and start servicing requests. */ appfs_fuse_started = 1; return(fuse_main(args.argc, args.argv, &appfs_operations, NULL)); } |